Skip to content
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

Change STACK_OVERFLOW_CHECK to 1 by default, and not 2. #11989

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Change STACK_OVERFLOW_CHECK to 1 by default, and not 2. #11989

merged 2 commits into from
Aug 21, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented Aug 21, 2020

Change the default value of STACK_OVERFLOW_CHECK in builds with ASSERTIONS
from 2 to 1. This means that plain debug builds (-O0, which enables
ASSERTIONS) do not have the most expensive stack checks on by default. You
can still add them with -s STACK_OVERFLOW_CHECK=2.

The most expensive checks seem excessive to run by default. I don't think any
platform does them. However, there is slightly more risk in wasm since we don't
have memory protection to give a guarantee of a trap. But the default stack
protections can be enough to detect that in most cases.

(The default protection, 1, writes a cookie and asserts the cookie is not overwritten
at various times. The expensive checks modify the wasm to make every stack
allocation check the limit.)

See #3043, this removes some work we were doing by default after link, so it
makes the link stage simpler.

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@kripken kripken merged commit 6426177 into master Aug 21, 2020
@kripken kripken deleted the sc2 branch August 21, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants