Skip to content

Enable and improve test_stack_overflow_check #12095

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

Merged
merged 7 commits into from
Sep 3, 2020
Merged

Enable and improve test_stack_overflow_check #12095

merged 7 commits into from
Sep 3, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 1, 2020

Depends on WebAssembly/binaryen#3091

This both enables the check, and adds a mode that checks many small
allocations instead of one huge one. That ensures we check both the lower
and upper limits of the stack region, and so are safe from the overflow
issue mentioned in #9039 (comment)

Also fix when the initialization happened - it was in callMain but that
didn't help cases without main, or using minimal runtime.

Also fix the skipping in test_core.py which looked for the old option.
With that fixed, wasm2ss (the test mode that runs with full stack
checks) all passes.

Fixes #9039

@kripken kripken requested a review from sbc100 September 1, 2020 17:43
@kripken kripken merged commit d4870ac into master Sep 3, 2020
@kripken kripken deleted the stack1 branch September 3, 2020 13:28
kripken added a commit that referenced this pull request Sep 3, 2020
Followup to #12095, a trivial fix for pthreads as well, which fixes
current breakage on master.
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.

Add stack overflow checks in wasm backend?
2 participants