runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[RyuJIT/ARM32] Assertion failed '(node->gtLsraInfo.dstCount == 0) || node->IsValue()' for all tests

Open hqueue opened this issue 9 years ago • 8 comments

With the latest commit (79c97d9d008e7ffc5208e0932c878357b3013ebd), all tests fails with a following assertion in Checked build.

FAILED   - [   0][   4s]JIT/CodeGenBringUpTests/Add1/Add1.sh
               BEGIN EXECUTION
               /mnt/albireo/mywork/device/rpi3/unittests/coreoverlays/coreoverlay.test20170830.Checked.debugging/corerun Add1.exe
               
               Assert failure(PID 21232 [0x000052f0], Thread: 21232 [0x52f0]): Assertion failed '(node->gtLsraInfo.dstCount == 0) || node->IsValue()' in 'System.String:InternalSubString(int,int):ref:this' (IL size 114)
               
                   File: /opt/code/github/hqueue/coreclr/src/jit/lower.cpp Line: 4858
                   Image: /mnt/albireo/mywork/device/rpi3/unittests/coreoverlays/coreoverlay.test20170830.Checked.debugging/corerun
               
               ./Add1.sh: line 243: 21232 Aborted                 (core dumped) $_DebuggerFullPath "$CORE_ROOT/corerun" $ExePath $CLRTestExecutionArguments
               Expected: 100
               Actual: 134
               END EXECUTION - FAILED

hqueue avatar Aug 30 '17 01:08 hqueue

Although this assertion fails, we can pass most of the test in Release build without problem except 2X tests.

Location of the assertion is just after calling m_lsra->TreeNodeInfoInit(node); at https://github.com/dotnet/coreclr/blob/master/src/jit/lower.cpp#L4855-L4858

@CarolEidt Is it a known issue ?

/cc: @dotnet/arm32-contrib

hqueue avatar Aug 30 '17 01:08 hqueue

Is it a known issue ?

It is not known to me, and it is unclear to me how that commit would have caused this.

CarolEidt avatar Aug 30 '17 01:08 CarolEidt

and it is unclear to me how that commit would have caused this.

@CarolEidt I just mentioned the commit to refer the latest master branch and does not mean the commit caused this assertion. I'm also investigating this.

hqueue avatar Aug 30 '17 01:08 hqueue

It is related with lsra & codegen for GT_NULLCHECK. GT_NULLCHECK is defined as GTK_NOVALUE (no target register), but only ARM32, GT_NULLCHECK use one target register.

hseok-oh avatar Aug 30 '17 01:08 hseok-oh

One solution: not define GTK_NOVALUE in ARM32 only Other solution: change codegen & lsra initialization for GT_NULLCHECK.

hseok-oh avatar Aug 30 '17 01:08 hseok-oh

Or I think we can make it use an internal register instead of dst register at lsra initialiation. It seems that the GT_NULLCHECK just tryto raise a trap using ldr. @hseok-oh what do you think of it?

hqueue avatar Aug 30 '17 01:08 hqueue

@hqueue I also think so.

hseok-oh avatar Aug 30 '17 01:08 hseok-oh

I've confirmed that it works well when we set internal reg count as 1 and use this instead of target register.

hseok-oh avatar Aug 30 '17 02:08 hseok-oh