Add support for reporting byrefs to RVA static fields of collectible assemblies ...
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 5 Aug 2020 19:54:45 +0000 (12:54 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Aug 2020 19:54:45 +0000 (12:54 -0700)
commit69b91f94cef1ae22f435fd132672b60ab5c8bd74
treee2522800ee0b90f7d1e56dbf09a4e5d3164a7557
parent04e86c3b8a8925b5ecb8c16a78281b4f412b533e
Add support for reporting byrefs to RVA static fields of collectible assemblies (#40346)

- Keep track of all RVA static field locations
  - For assemblies loaded from PE files, use a range that is the entire PE range
  - For assemblies dynamically created, use piecemeal ranges for each individual RVA static field
- Report byref references via the GcReportLoaderAllocator mechanism in PromoteCarefully

- Add a test to cover this scenario, and thread statics
  - disable test on Mono, as it doesn't pass there yet
14 files changed:
src/coreclr/src/vm/assembly.cpp
src/coreclr/src/vm/commodule.cpp
src/coreclr/src/vm/loaderallocator.cpp
src/coreclr/src/vm/loaderallocator.hpp
src/coreclr/src/vm/lockedrangelist.h [new file with mode: 0644]
src/coreclr/src/vm/siginfo.cpp
src/coreclr/src/vm/stubmgr.h
src/coreclr/tests/issues.targets
src/tests/Loader/CollectibleAssemblies/ByRefLocals/ByRefLocals.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/ByRefLocals/ByRefLocals.csproj [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/ByRefLocals/SpanAccessor.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/ByRefLocals/SpanAccessor.csproj [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/ByRefLocals/Unloaded.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/ByRefLocals/Unloaded.csproj [new file with mode: 0644]