Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/runtime/src/traphandlers/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,14 @@ pub fn lazy_per_thread_init() {

/// The size of the sigaltstack (not including the guard, which will be
/// added). Make this large enough to run our signal handlers.
const MIN_STACK_SIZE: usize = 16 * 4096;
///
/// The main current requirement of the signal handler in terms of stack
/// space is that `malloc`/`realloc` are called to create a `Backtrace` of
/// wasm frames.
///
/// Historically this was 16k. Turns out jemalloc requires more than 16k of
/// stack space in debug mode, so this was bumped to 64k.
const MIN_STACK_SIZE: usize = 64 * 4096;

struct Stack {
mmap_ptr: *mut libc::c_void,
Expand Down