-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win32: Fix SEH frame sentinel #43570
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. It was supposed to follow this line, which now your fix does:
https://github.com/dlang/druntime/blob/master/src/core/thread/fiber.d#L1269
I noticed that Example failure: https://build.julialang.org/#/builders/42/builds/697/steps/5/logs/stdio |
No, this is win64 only |
@@ -71,7 +71,7 @@ void jl_makecontext(win32_ucontext_t *ucp, void (*func)(void)) | |||
jmpbuf->Rip = (unsigned long long)func; | |||
jmpbuf->Rsp = (unsigned long long)stack_top; | |||
jmpbuf->Rbp = 0; | |||
jmpbuf->Frame = 0; // SEH frame | |||
jmpbuf->Frame = ~0L; // SEH frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't long
32bit on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L
is long long in recent standards versions, but I guess we should just spell this out as ~(uint64_t)0
.
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)
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)
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 JuliaLang#43569.
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 JuliaLang#43569.
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)
The last entry sentinel for Win64 SEH is
~0L
not NULL. Apparentlythis 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.