Skip to content

Commit 6619d65

Browse files
KenoKristofferC
authored andcommitted
win32: Fix SEH frame sentinel (#43570)
The last entry sentinel for Win64 SEH is `~0L` not NULL. Apparently this doesn't cause issues on windows proper, but does crash wine. Arguably if Windows doesn't have issues then we should just fix this in wine, but since we control the source and nobody else ever seems to have run into this, let's just fix it and save the good Wine folks some headache. Fixes #43569. (cherry picked from commit 722f9d4)
1 parent e13f8bf commit 6619d65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/support/win32_ucontext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void jl_makecontext(win32_ucontext_t *ucp, void (*func)(void))
7373
jmpbuf->Rip = (unsigned long long)func;
7474
jmpbuf->Rsp = (unsigned long long)stack_top;
7575
jmpbuf->Rbp = 0;
76-
jmpbuf->Frame = 0; // SEH frame
76+
jmpbuf->Frame = ~0L; // SEH frame
7777
#elif defined(_CPU_X86_)
7878
jmpbuf->Eip = (unsigned long)func;
7979
jmpbuf->Esp = (unsigned long)stack_top;

0 commit comments

Comments
 (0)