Fix GCRefMap for generic method calls via Unboxing stub (#1304)
authorJan Vorlicek <janvorli@microsoft.com>
Sun, 5 Jan 2020 17:52:44 +0000 (18:52 +0100)
committerGitHub <noreply@github.com>
Sun, 5 Jan 2020 17:52:44 +0000 (18:52 +0100)
commit0025f375f0d5486f479f01c4301d7f5ebde7e66a
treecd3f516561391362fb49724ee9d88f46764e9dc1
parenta751093cec8534667e281bf19204590cd2baf564
Fix GCRefMap for generic method calls via Unboxing stub (#1304)

Crossgen2 was generating GCRefMap for calls to generic methods via
unboxing stubs incorrectly. With unboxing stub, the caller doesn't pass
in an extra generic parameter since the reference to the boxed value
type passed to the stub serves that purpose. But the GetCallRefMap method
was generating GCRefMap entry for the extra generic argument, which was
leading to a crash when GC was scanning the arguments.
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapNode.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/MethodFixupSignature.cs