ntdll: Stop unwinding on access violation.
Unwinding should stop on access violation. This matches windows behavior.
Below is a test that demonstrates the problem:
#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.
Edited by Dylan Donnell