-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Default to STACK_OVERFLOW_CHECK=2 in debug builds #18040
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
Conversation
b802c8a to
a072a74
Compare
Previously we defaulted to 1 in this case, but we want to improve the error reporting around stack overflow in preparation for lowering the default stack size. See #14177 I ran the benchmark test suite under node and could not measure any significant effect:
a072a74 to
650e8c6
Compare
|
Are the benchmarks comparing |
kripken
left a comment
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.
I think this probably makes sense to do, since performance in debug builds isn't critical, and it looks like this is not a significant regression there anyhow.
| if self.get_setting('MEMORY64') == 2: | ||
| self.skipTest('MEMORY64=2 always requires module re-writing') | ||
| self.set_setting('WASM_BIGINT') | ||
| self.set_setting('STACK_OVERFLOW_CHECK', 1) |
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.
Are these just to add more test coverage? Or is it necessary for some reason? Please add a comment.
| required_flags = ['-sWASM_BIGINT'] | ||
| # -O0 with BigInt support (to avoid the need for legalization) and STACK_OVERFLOW_CHECK=1 (to | ||
| # avoid the need for the stack check pass). | ||
| required_flags = ['-sWASM_BIGINT', '-sSTACK_OVERFLOW_CHECK=1'] |
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.
Hmm, this means the default build will still do wasm changes after link even after we default to wasm-bigint. Maybe it makes sense though.
Please add to this test. We want to emit a good error message in this case, that is, ERROR_ON_WASM_CHANGES_AFTER_LINK should do like it does with WASM_BIGINT - if it's not set right, suggest the proper value.
These benchmarks are actually from |
|
Are those flags on top of |
I think they are on top of
I think the EmscriptenBenchmarker injects |
|
Yes, that sounds right. |
Previously we defaulted to 1 in this case, but we want to improve the error reporting around stack overflow in preparation for lowering the default stack size. See #14177
Benchmark results: