runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[RyuJIT/arm32] LinearScan::unassignPhysReg segmentation fault

Open mskvortsov opened this issue 9 years ago • 6 comments

Thread 1 "corerun" received signal SIGSEGV, Segmentation fault.
0xb0d37d8a in LinearScan::unassignPhysReg (this=0x196f44, regRec=0x1973d4, spillRefPosition=0x0) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:6464
(gdb) bt
#0  0xb0d37d8a in LinearScan::unassignPhysReg (this=0x196f44, regRec=0x1973d4, spillRefPosition=0x0) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:6464
dotnet/coreclr#1  0xb0d3975c in LinearScan::freeRegister (this=0x196f44, physRegRecord=0x1973d4) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:6993
dotnet/coreclr#2  0xb0d39816 in LinearScan::freeRegisters (this=0x196f44, regsToFree=0) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:7012
dotnet/coreclr#3  0xb0d2fdfe in LinearScan::allocateRegisters (this=0x196f44) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:7143
dotnet/coreclr#4  0xb0d2d990 in LinearScan::doLinearScan (this=0x196f44) at /home/mskvortsov/git/coreclr/src/jit/lsra.cpp:1773
JIT/Methodical/fp/exgen/10w5d_cs_do
JIT/Methodical/fp/exgen/10w5d_cs_r
JIT/Methodical/fp/exgen/200w1d-02_cs_do
JIT/Methodical/fp/exgen/200w1d-02_cs_ro
JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b48614/b48614
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b59782/b59782
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b63726/b63726
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69225/b69225
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69227/b69227
JIT/Regression/JitBlue/DevDiv_283795/DevDiv_283795

cc @dotnet/arm32-contrib

mskvortsov avatar May 22 '17 12:05 mskvortsov

cc @CarolEidt

BruceForstall avatar May 22 '17 14:05 BruceForstall

If no one is looking into this yet, I will take a look from tomorrow.

hqueue avatar May 22 '17 14:05 hqueue

In Debug build, with COMPlus_AltJit=* COMPlus_AltJitAssertOnNYI=0

// Segmentation fault
JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b48614/b48614
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b63726/b63726
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69225/b69225
JIT/Regression/JitBlue/DevDiv_283795/DevDiv_283795

// LegacyJIT assertion
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b59782/b59782

               Assert failure(PID 20761 [0x00005119], Thread: 20761 [0x5119]): Assertion failed '(op1->gtOper != GT_CNS_INT && op1->gtOper != GT_CNS_LNG && op1->gtOper != GT_CNS_DBL) || tree->gtOverflow() || (op1->gtOper == GT_CNS_DBL && !_finite(op1->gtDblCon.gtDconVal)) || !compiler->opts.OptEnabled(CLFLG_CONSTANTFOLD)' in 'ILGEN_0x372a9ae6:Method_0xdc6ff1a4(byte,byte,int,int,char,double,long,long):int' (IL size 11052)

                   File: /opt/code/github/hqueue/coreclr/src/jit/codegenlegacy.cpp Line: 10627

// Other assertion
JIT/Methodical/fp/exgen/10w5d_cs_do
JIT/Methodical/fp/exgen/10w5d_cs_r

               Assert failure(PID 20661 [0x000050b5], Thread: 20661 [0x50b5]): Assertion failed 'spillTempSize <= lvaGetMaxSpillTempSize()' in 'testout1:Func_0_4_3_4_5():float' (IL size 231)

                   File: /opt/code/github/hqueue/coreclr/src/jit/lclvars.cpp Line: 6395

// PASSED

JIT/Methodical/fp/exgen/200w1d-02_cs_do
JIT/Methodical/fp/exgen/200w1d-02_cs_ro
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69227/b69227

In Checked build, with COMPlus_AltJit=* COMPlus_AltJitAssertOnNYI=0

// Segmentation fault
JIT/Methodical/fp/exgen/10w5d_cs_do
JIT/Methodical/fp/exgen/200w1d-02_cs_do
JIT/Methodical/fp/exgen/200w1d-02_cs_ro
JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b48614/b48614
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b59782/b59782
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b63726/b63726
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69225/b69225
JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b69227/b69227
JIT/Regression/JitBlue/DevDiv_283795/DevDiv_283795

// Other assertion
JIT/Methodical/fp/exgen/10w5d_cs_r

               Assert failure(PID 23377 [0x00005b51], Thread: 23377 [0x5b51]): Assertion failed 'spillTempSize <= lvaGetMaxSpillTempSize()' in 'testout1:Func_0_4_3_4_5():float' (IL size 231)

                   File: /opt/code/github/hqueue/coreclr/src/jit/lclvars.cpp Line: 6408
                   Image: /mnt/albireo/mywork/device/rpi3/unittests/coreoverlays/coreoverlay.test20170523.checked/corerun

hqueue avatar May 23 '17 11:05 hqueue

@BruceForstall Please assign this to me.

hqueue avatar May 24 '17 05:05 hqueue

Segmentation fault in JIT/Regression/JitBlue/DevDiv_283795/DevDiv_283795 is from other place (see dotnet/coreclr#11958).

hqueue avatar May 29 '17 11:05 hqueue

The reason of segmentation fault is due to uninitialized nextRegRec. The fix will initialize nextRegRec when necessary and update condition for restoring TYP_DOUBLE interval.

hqueue avatar May 29 '17 13:05 hqueue