runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Assert failure in clr at CORECLR! GenTree::TypeGet

Open richardlford opened this issue 10 years ago • 5 comments

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.

richardlford avatar Dec 18 '15 23:12 richardlford

My guess is that these are most likely bad tests.

sivarv avatar Jan 05 '16 01:01 sivarv

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 }

htyu avatar Jan 08 '16 21:01 htyu

Though IL is bad, we should not still crash. Given the root cause, this can be moved to RTM, IMO

sivarv avatar Jan 08 '16 22:01 sivarv

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
...
...

sejongoh avatar Apr 04 '16 22:04 sejongoh

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

sejongoh avatar Apr 06 '16 08:04 sejongoh