20 Oct
2025
20 Oct
'25
3:02 p.m.
Yes I have a test that crashes under wine but not windows, on windows it returns 0 so I replicated that in my mr: ```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; } ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9218#note_119071