Fix handling of collectible thread statics and GC (#40671)
authorDavid Wrighton <davidwr@microsoft.com>
Tue, 11 Aug 2020 21:54:08 +0000 (14:54 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Aug 2020 21:54:08 +0000 (14:54 -0700)
commitc47a92d88c22cee081c053d864cac5e2edabca4b
tree4afff2a637a308483fdd50e8af19d5cf1c71d116
parentead2cd50799ecc523e23f50e50b54d8a30d0aa4f
Fix handling of collectible thread statics and GC (#40671)

- NonGc Thread statics helper returns a ByRef, not a pointer for collectible statics
- Add test coverage for collectible statics
- Remove test coverage for converting thread static variable into byref and using that to keep alive the static data as it wasn't fully safe itself
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/tests/issues.targets
src/tests/Loader/CollectibleAssemblies/ByRefLocals/ByRefLocals.cs
src/tests/Loader/CollectibleAssemblies/ByRefLocals/Unloaded.cs
src/tests/Loader/CollectibleAssemblies/Statics/Accessor.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/Statics/Accessor.csproj [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/Statics/CollectibleStatics.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/Statics/CollectibleStatics.csproj [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/Statics/Unloaded.cs [new file with mode: 0644]
src/tests/Loader/CollectibleAssemblies/Statics/Unloaded.csproj [new file with mode: 0644]