Unwinding should stop on access violation. This matches windows behavior. Below is a test that demonstrates the problem: ```c #include <windows.h> #include <stdio.h> int main() { void *retaddr = __builtin_extract_return_addr(__builtin_return_address(0)); DWORD64 imagebase; UNWIND_HISTORY_TABLE table; RUNTIME_FUNCTION *rf = RtlLookupFunctionEntry((DWORD64)retaddr, &imagebase, &table); DWORD old; VirtualProtect(rf, 0x100, PAGE_READWRITE, &old); rf->UnwindData = 0x12345678; VirtualProtect(rf, 0x100, old, &old); void *bt[100]; RtlCaptureStackBackTrace(0, 100, bt, NULL); return 0; } ``` This crashes on wine but not on windows. -- v2: ntdll: Stop unwinding on access violation. https://gitlab.winehq.org/wine/wine/-/merge_requests/9218