Skip to content

Increase the sigaltstack stack size#4964

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:increase-stack-size
Sep 26, 2022
Merged

Increase the sigaltstack stack size#4964
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:increase-stack-size

Conversation

@alexcrichton
Copy link
Copy Markdown
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