Assert failure in clr at CORECLR! GenTree::TypeGet
The following tests fail with the
Assert failure in clr at CORECLR! GenTree::TypeGet
- JIT\Directed\coverage\importer\Desktop\badldsfld_il_d\badldsfld_il_d.cmd
- JIT\Directed\coverage\importer\Desktop\badldsfld_il_r\badldsfld_il_r.cmd
on debug win64.
My guess is that these are most likely bad tests.
It looks to me a bad IL test which is loading a non-static field in a static method. This causes the imported to crash.
.field int32 i .method static int32 f() { ldsfld int32 Test::i ret }
Though IL is bad, we should not still crash. Given the root cause, this can be moved to RTM, IMO
I cannot reproduce the problem. ldsfld looks transformed to 'ldc.i4 0x64'
coreclr\bin\Product\Windows_NT.x64.Debug\ilasm.exe badendfinally.il coreclr\bin\Product\Windows_NT.x64.Debug\ildasm.exe badendfinally.exe
.method public static int32 f() cil managed noinlining
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: endfinally
IL_0001: ldc.i4 0x64
IL_0006: ret
} // end of global method f
...
...
Please ignore my previous comment. I was looking into a different testcase in the same directory...
I opened a PR: https://github.com/dotnet/coreclr/pull/4101