-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
fix: correctly support stack overflows across platforms #982
Conversation
The macOS tests fail because AppleClang 13.0.0.13000029 seemingly ignores |
dee3a4a
to
2261b0d
Compare
After rebasing |
This has been quite a revealing exercise. That a runtime approach to the This started as a Windows fix, but since I tried to make the stack overflow tests run on all builds, we also have improvements on Linux and Android. So, renaming the PR and additional change-log entries might be in order. cc: @kahest |
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.
nice! 🎉
Currently, stack overflows on Windows die somewhere in the handler because we run out of stack space. This is the first attempt to fix the situation by reserving stack space before it is exhausted. This is an analog to
sigaltstack()
on Linux, but Windows only provides a "reserved amount" interface, and with that, you have fewer options to shoot yourself in the foot.Fixes #987.
Fixes #977.