Increase the size of the sigaltstack. (#1315)

* Increase the size of the sigaltstack.

Rust's stack overflow handler installs a sigaltstack stack with size
SIGSTKSZ, which is too small for some of the things we do in signal
handlers, and as of this writing lacks a guard page. Install bigger
sigaltstack stacks so that we have enough space, and have a guard page.
This commit is contained in:
Dan Gohman
2020-04-03 14:36:17 -07:00
committed by GitHub
parent 5297466add
commit 9ca3bf532e
2 changed files with 131 additions and 10 deletions

View File

@@ -50,6 +50,9 @@ impl Trap {
wasmtime_runtime::Trap::Wasm { desc, backtrace } => {
Trap::new_with_trace(desc.to_string(), backtrace)
}
wasmtime_runtime::Trap::OOM { backtrace } => {
Trap::new_with_trace("out of memory".to_string(), backtrace)
}
}
}