Skip to content

Commit 722f9d4

Browse files
authored
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.
1 parent 693b447 commit 722f9d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/win32_ucontext.c

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

0 commit comments

Comments
 (0)