-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure MetadataEnumResult is sufficiently updated by MetaDataImport::… #56756
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Enum `MetadataEnumResult` has a fixed inline buffer for returning small results and a pointer to allow it to return larger ones. The indexer for this checks the pointer and if non-null assumes that's the current set of values. But if a `MetadataEnumResult` is re-used within a loop, values written to it by `MetaDataImport::Enum` may bleed from one loop iteration to the next if the iterations first get a large result and then a small one. One case where this could happen was in libraries PGO tests, where PGO data encouraged the jit to inline `MemberInfoCache<T>.PopulateProperties(Filter,...)` into `MemberInfoCache<T>.PopulateProperties(Filter)`. Note this also is a conseqeunce of skipping zero init locals; without that the struct would have been zeroed each loop iteration. Fixes dotnet#56655.
@mangod9 can you suggest somebody to review? cc @dotnet/jit-contrib |
/azp run runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 1 pipeline(s). |
Note there may still be some failures in libraries-pgo even with this fix. |
mangod9
approved these changes
Aug 3, 2021
/cc @davidwrighton |
AaronRobinsonMSFT
approved these changes
Aug 3, 2021
thaystg
added a commit
to thaystg/runtime
that referenced
this pull request
Aug 3, 2021
* origin/main: (64 commits) [wasm][debugger] Create test Inherited Properties (dotnet#56754) Mark new test as incompatible with GC Mark4781_1GcStressIncompatible (dotnet#56739) Ensure MetadataEnumResult is sufficiently updated by MetaDataImport::Enum (dotnet#56756) [mono] Remove gdb xdebug and binary writer support, it hasn't worked in a while. (dotnet#56759) Update windows-requirements.md (dotnet#56476) Update doc and generic parameter name for JsonValue.GetValue (dotnet#56639) [wasm][debugger] Inspect static class (dotnet#56740) Fix stack overflow handling issue in GC stress (dotnet#56733) Use ReflectionOnly as serialization mode in case dynamic code runtime feature is not supported (dotnet#56604) Move Windows Compat pack to NuGet pack task (dotnet#56686) Fix build error when building some packages (dotnet#56767) Simplify JIT shutdown logic in crossgen2 (dotnet#56687) Fix race in crossdac publishing with PGO (dotnet#56762) Add DictionaryKeyPolicy support for EnumConverter [dotnet#47765] (dotnet#54429) Use ComWrappers in some Marshal unit-tests and update platform metadata (dotnet#56595) Set `DisableImplicitNamespaceImports_Dotnet=true` to workaround sdk issue (dotnet#56744) Make sure ServerGCHeapDetails is up to date (dotnet#56056) [libraries] Reenable System.Diagnostics.DiagnosticSorce.Switches.Tests on mobile (dotnet#56737) Disable failing arm64 win10 Graphics.FromHdc tests (dotnet#56732) Match xplat event source conditions (dotnet#56435) ...
thaystg
added a commit
to thaystg/runtime
that referenced
this pull request
Aug 3, 2021
* origin/main: [wasm][debugger] Create test Inherited Properties (dotnet#56754) Mark new test as incompatible with GC Mark4781_1GcStressIncompatible (dotnet#56739) Ensure MetadataEnumResult is sufficiently updated by MetaDataImport::Enum (dotnet#56756)
thaystg
added a commit
to thaystg/runtime
that referenced
this pull request
Aug 4, 2021
…ger_proxy_attribute * origin/main: (340 commits) add RID for Debian 11 (dotnet#56789) [wasm] [debugger] Skip thread static field (dotnet#56749) Fix timeouts in coreroot_determinism test in GC stress mode (dotnet#56770) Use File.OpenHandle in Socket.SendFile directly (dotnet#56777) accept empty realm for digest auth (dotnet#56369) (dotnet#56455) [wasm][debugger] Create test Inherited Properties (dotnet#56754) Mark new test as incompatible with GC Mark4781_1GcStressIncompatible (dotnet#56739) Ensure MetadataEnumResult is sufficiently updated by MetaDataImport::Enum (dotnet#56756) [mono] Remove gdb xdebug and binary writer support, it hasn't worked in a while. (dotnet#56759) Update windows-requirements.md (dotnet#56476) Update doc and generic parameter name for JsonValue.GetValue (dotnet#56639) [wasm][debugger] Inspect static class (dotnet#56740) Fix stack overflow handling issue in GC stress (dotnet#56733) Use ReflectionOnly as serialization mode in case dynamic code runtime feature is not supported (dotnet#56604) Move Windows Compat pack to NuGet pack task (dotnet#56686) Fix build error when building some packages (dotnet#56767) Simplify JIT shutdown logic in crossgen2 (dotnet#56687) Fix race in crossdac publishing with PGO (dotnet#56762) Add DictionaryKeyPolicy support for EnumConverter [dotnet#47765] (dotnet#54429) Use ComWrappers in some Marshal unit-tests and update platform metadata (dotnet#56595) ...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…Enum
MetadataEnumResult
has a fixed inline buffer for returning small resultsand a pointer to allow it to return larger ones. The indexer for this
checks the pointer and if non-null assumes that's the current set of
values.
But if a
MetadataEnumResult
is re-used within a loop, values written to itby
MetaDataImport::Enum
may bleed from one loop iteration to the nextif the iterations first get a large result and then a small one.
One case where this could happen was in libraries PGO tests, where PGO data
encouraged the jit to inline
MemberInfoCache<T>.PopulateProperties(Filter,...)
into
MemberInfoCache<T>.PopulateProperties(Filter)
.Note this also is a conseqeunce of skipping zero init locals; without that
the struct would have been zeroed each loop iteration.
Fixes #56655.