https://bugs.winehq.org/show_bug.cgi?id=49698
--- Comment #1 from Paul Gofman pgofman@codeweavers.com --- Thanks for bringing in handy test case.
I've tested the test.
The regression was triggered solely by ntdll switch to PE and does not interfere with any other patches.
The problem is in dlls/ntdll/signal_x86_64.c:call_consolidate_callback() function. It is supposed to return to the caller (RtlSetThreadContext) in case of normal return but in case if the callback unwinds (which is likely) the unwind should jump directly to the specified context and skip all the functions in between with their unwinds (that is the feature of consolidated unwind which does the unwind for multiple nested frames in one call). The required tricks were implemented with dwarf unwind info but not for PE unwinds, thus it was broken as soon as ntdll.dll is build as PE.
Patches [1], [2] are fixing the issue for me.
1. https://source.winehq.org/patches/data/190692 2. https://source.winehq.org/patches/data/190693