Stream: git-wasmtime

Topic: wasmtime / issue #13703 Stack-switching crash with just e...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 04:53):

alexcrichton added the wasm-proposal:stack-switching label to Issue #13703.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 04:53):

alexcrichton opened issue #13703:

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:57):

cfallin closed issue #13703:

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.


Last updated: Jul 29 2026 at 05:03 UTC