Assertion failed 'op1 != nullptr' in 'TestUtil.TestLog:VerifyOutput():int:this' during 'Morph - Global' (IL size 130) #298
Labels
area-NativeAOT-coreclr
.NET runtime optimized for ahead of time compilation
This is a new failure that started showing up in the Pri-0 test suite.
We're hitting this for code in the shape of:
The problem is that
String.Empty
field is an intrinsic, so we import it specially (as a literal string), and there's super special handling for CoreRT because empty string can be referred to as IAT_VALUE (no need for an indirection like on CoreCLR):runtimelab/src/coreclr/src/jit/gentree.cpp
Lines 6072 to 6086 in ca9bccd
Note we're wrapping the literal in a GT_NOP to prevent constant folding.
We then hit the GT_NOP handling here (because this argument to the Equals method call is the GT_NOP):
runtimelab/src/coreclr/src/jit/gentree.cpp
Lines 8546 to 8552 in dc7b1d2
And end up returning null from
gtGetThisArg
which assertsoptNonNullAssertionProp_Call
.This error mode can probably be simulated on CoreCLR by just whacking
CEEJitInfo::emptyStringLiteral
to returnIAT_VALUE
(it would generate bad code, but the assert is hit before the code finishes generating) and compilingString.Empty.Equals("some other string")
.@sandreenko Would you be able to recommend the best course of action for this?
The text was updated successfully, but these errors were encountered: