Assert Failure (DWORD)(pParam->pExState->GetExceptionRecord()->ExceptionCode) == pParam->pExState->GetExceptionCode() at src/vm/excep.cpp, Line: 3033
Configuration: Debug CoreCLR runtime: coreclr.dll, corerun.exe and mscorlib.dll CoreFX assemblies and CoreFX tests: release
The following test fails with COMPlus_JitStressRegs = 3. System.Net.Requests.Tests
**** MessageBox invoked, title 'corerun - Assert Failure (PID 14612, Thread 14684/0x395c)' ****
(DWORD)(pParam->pExState->GetExceptionRecord()->ExceptionCode) == pParam->pExState->GetExceptionCode()
/home/sejooh/git/ws1/coreclr/src/vm/excep.cpp, Line: 3033
Abort - Kill program
Retry - Debug
Ignore - Keep running
Image:
/home/sejooh/git/ws1/corefx/bin/tests/Linux.AnyCPU.Release/System.Net.Requests.Tests/dnxcore50/corerun
********
error: One or more tests failed while running tests from 'System.Net.Requests.Tests'. Exit code 134.
This issue is caused by a memory corruption due to a bad codegen of the System.Globalization.CompareInfo:Compare(ref,int,int,ref,int,int,int):int:this method when the COMPlus_JitStressRegs=3 is set.
To repro it reliably under the debugger, only a single test from the test suite should be run:
COMPlus_JitStressRegs=3 lldb-3.6 ./corerun xunit.console.netcore.exe System.Net.Requests.Tests.dll -method System.Net.Tests.HttpWebRequestTest.Headers_GetResponseHeaders_ContainsExpectedValue
See the JitDump here: https://gist.github.com/janvorli/09405f91e1d64881357a See this piece of generated code:
IN0052: 000131 mov dword ptr [V00 rbp-18H], eax
IN0053: 000134 mov dword ptr [V00+0x8 rbp-10H], ecx
IN0054: 000137 mov rdi, gword ptr [V00 rbp-18H]
IN0055: 00013B mov ecx, ebx
IN0056: 00013D mov rax, 0x7F6D776199D0
The EAX is written to low 32 bits of a location and then 64 bit RDI is loaded from there. The RDI is an object reference - the System.Globalization.CompareInfo. So the RDI contains a corrupted memory address.
@sivarv Can you please reassign this bug to the right person?
This needs further investigation. From jitdump it looks like tail call stack args aren't properly setup.
With JitStressRegs=3, these tests also failed. System.Net.Primitives.Functional.Tests System.IO.Packaging.Tests
Fixed with PR https://github.com/dotnet/coreclr/pull/2684