runtime: Assert failure: CheckInstrBytePattern(base[offset] & 0xF8, 0x58, base[offset])
runtime-coreclr gcstress-extra: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1027838&view=ms.vss-test-web.build-test-results-tab
set DOTNET_TieredCompilation=0
set DOTNET_GCStress=0xC
set DOTNET_ReadyToRun=0
23:18:11.365 Running test: JIT/Methodical/flowgraph/dev10_bug642944/GCMaskForGSCookie/GCMaskForGSCookie.dll
Assert failure(PID 6256 [0x00001870], Thread: 1688 [0x0698]): CheckInstrBytePattern(base[offset] & 0xF8, 0x58, base[offset])
CORECLR! SKIP_POP_REG + 0x6F (0x71462b1f)
CORECLR! UnwindEbpDoubleAlignFrameEpilog + 0xF6 (0x71462ef6)
CORECLR! UnwindStackFrameX86 + 0x61 (0x714638f1)
CORECLR! EECodeManager::UnwindStackFrame + 0x113 (0x71463843)
CORECLR! DoGcStress + 0x207 (0x71651fce)
CORECLR! OnGcCoverageInterrupt + 0x12D (0x71652594)
CORECLR! IsGcMarker + 0xA8 (0x7147a04c)
CORECLR! CLRVectoredExceptionHandlerShim + 0xB4 (0x7146ef34)
NTDLL! LdrSetAppCompatDllRedirectionCallback + 0x1B825 (0x771cf2e5)
NTDLL! RtlUnwind + 0x1BA (0x7718ea7a)
File: D:\a\_work\1\s\src\coreclr\vm\gc_unwind_x86.inl:2101
Image: C:\h\w\9B4808E2\p\corerun.exe
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (18 by maintainers)
I assume you mean https://github.com/dotnet/runtime/compare/4144fdab16a98dc7bf8509e6850eb691ddede804...77f71dcf88118a22beb8a12aaf9343d88f4236cb (switched the start/end)
Thanks, that’s helpful!
I’ve taken a look at the dump. This is the code of the method that it is unwinding from (the actual location is marked):
It ends up calling
UnwindEbpDoubleAlignFrameEpilogwith theepilogBasepointing to a copy of the code from 0bdf67e7 above, so it looks like this:At that point, it tries to invoke
SKIP_POP_REG, but as you can see, the instruction is lea esp,[ebp-4] and so the assert fails. Looking at the code of theUnwindEbpDoubleAlignFrameEpilogand how it got to the problematic spot: https://github.com/dotnet/runtime/blob/ff5fdabe1fbbec44f856974a93ac5d6fd7277b1b/src/coreclr/vm/gc_unwind_x86.inl#L2500-L2547The relevant
infomembers are set as follows:So due to
info->rawStkSize == sizeof(void*), we get to the branch where we expect a register pop, but there is the lea instead.So it seems to me some change in x86 codegen is probably breaking the unwinding code assumptions. @dotnet/jit-contrib, were there any recent changes in this area?