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

Increase the sigaltstack stack size #4964

Merged

Conversation

alexcrichton
Copy link
Member

This commit updates the MIN_STACK_SIZE constant for Unix platforms when allocating a sigaltstack from 16k to 64k. The signal handler captures a wasm Backtrace which involves memory allocations and it was recently discovered that, at least in debug mode, jemalloc can take up to 16k of stack space for an allocation. To allow running the sigaltstack size is increased here.

This commit updates the `MIN_STACK_SIZE` constant for Unix platforms
when allocating a sigaltstack from 16k to 64k. The signal handler
captures a wasm `Backtrace` which involves memory allocations and it was
recently discovered that, at least in debug mode, jemalloc can take up
to 16k of stack space for an allocation. To allow running the
sigaltstack size is increased here.
@alexcrichton alexcrichton enabled auto-merge (squash) September 26, 2022 22:14
@alexcrichton alexcrichton merged commit 8499420 into bytecodealliance:main Sep 26, 2022
@alexcrichton alexcrichton deleted the increase-stack-size branch September 26, 2022 22:48
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