diff options
author | Alon Zakai <azakai@google.com> | 2019-07-01 19:23:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 19:23:52 -0700 |
commit | f154364c01603b0b8cfd0055951e8283f20fabd7 (patch) | |
tree | 85e5add66cefc3ce338ef52bb4733b7091cf4dd4 /test/unit/input/bysyncify-stackOverflow.wast | |
parent | c3e45d4e5272486fae1ffb353c56e4d117fe4a21 (diff) | |
download | binaryen-f154364c01603b0b8cfd0055951e8283f20fabd7.tar.gz binaryen-f154364c01603b0b8cfd0055951e8283f20fabd7.tar.bz2 binaryen-f154364c01603b0b8cfd0055951e8283f20fabd7.zip |
Bysyncify: Assertion improvements (#2193)
Add assertions on stack overflow in all 4 Bysyncify API calls (previously only 2 did it).
Also add a check that those assertions are hit.
Diffstat (limited to 'test/unit/input/bysyncify-stackOverflow.wast')
-rw-r--r-- | test/unit/input/bysyncify-stackOverflow.wast | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/input/bysyncify-stackOverflow.wast b/test/unit/input/bysyncify-stackOverflow.wast new file mode 100644 index 000000000..a36a06b40 --- /dev/null +++ b/test/unit/input/bysyncify-stackOverflow.wast @@ -0,0 +1,22 @@ +(module + (memory 1 2) + (import "env" "sleep" (func $sleep)) + (export "memory" (memory 0)) + (func "many_locals" (param $x i32) (result i32) + (local $y i32) + (local $z i32) + (local.set $y + (i32.add (local.get $x) (i32.const 10)) + ) + (local.set $z + (i32.add (local.get $y) (i32.const 20)) + ) + (call $sleep) + (select + (local.get $y) + (local.get $z) + (local.get $x) + ) + ) +) + |