[JitStress=2] JIT/Regression/JitBlue/devdiv_902271/DevDiv_9202271/DevDiv_902271.exe crashes with JitStress=2
Configuration: Debug Coreclr and Mscorlib.dll Release CoreFx assemblies Release CoreCLR tests OS: Linux
Without COMPlus_JitStress=2 Pass
With COMPlus_JitStress=2 Crashes with Segmentation fault
Investigation reveals that this test has two methods Work1 and Work2 that call each other in mutual recursion. These mutually recursive calls are tail prefixed and depend on tail prefix being honored to pass. Jitstress=2, introduces GS_CHECK which will disable tail call optimization and as a result, it will lead to stack overflow exception.
We should tag this test case to be excluded from Jitstress=2 or tail call stress runs. For now marking this as test issue and moving to future.
@richardlford - Assigning it to you as this test needs work as mentioned above.
We can just mark this as optimization sensitive now, right?
Yes, I think that's correct.
I am not sure that it is doable in Hackathon time frame by somebody who has not worked with CoreCLR before.
To do this issue on Linux machine do:
- build debug CoreCLR(`build.sh x64 debug);
- build release CoreCLR(`build.sh x64 release) ;
- build release version of 'JIT/Regression/JitBlue/devdiv_902271/DevDiv_9202271/DevDiv_902271
(msbuild /p:Configuration=Release /p:Platform=x64 DevDiv_902271.ilproj`), assuming that it is possible to build this test on Linux; - ??? Copy '"coreclr\bin\tests\Linux.x64.Debug\Tests\Core_Root\System.Private.CoreLib.dll" to "coreclr\bin\tests\Linux.x64.Release\Tests\Core_Root";
export Core_Root=coreclr\bin\tests\Linux.x64.Release\Tests\Core_Root;- run
./CoreRun.exe DevDiv_902271.exe, check that it returns `100'; export COMPlus_JitStress=2;- repeat step 6, check that the test fails;
- add
<JitOptimizationSensitive>True</JitOptimizationSensitive>to the test's project file (see example incoreclr\tests\src\JIT\Regression\CLR-x86-JIT\V1.2-Beta1\b103058\b103058.csproj; - rebuild test with
COMPlus_JitStress=2enabled and check that the test doesn't build?
Am I right?
It was marked as JitOptimizationSensitive>True</JitOptimizationSensitive> 2+ years ago in dotnet/coreclr#3659.