This script generates a repro.wast file:
python3 -c 'open("repro.wast","w").write(
"(module\n"
" (type $ft (func (param" + " i32"*600 + ")))\n"
" (type $ct (cont $ft))\n"
" (func $target (type $ft))\n"
" (elem declare func $target)\n"
" (func (export \"run\") (drop (cont.new $ct (ref.func $target))))\n"
")\n"
"(invoke \"run\")\n")'
which runs as:
$ wasmtime wast \
-W stack-switching,function-references,async-stack-size=8192,max-wasm-stack=4096 \
repro.wast
zsh: segmentation fault (core dumped) wasmtime wast repro.wast
This is a consequence of #13662 (cc @SebTardif) where the size being tested looks to include the guard page accidentally, concluding the stack is a bit larger than it actually is.
This script generates a
repro.wastfile:which runs as:
This is a consequence of #13662 (cc @SebTardif) where the size being tested looks to include the guard page accidentally, concluding the stack is a bit larger than it actually is.