summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/baseline-many-results.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/wasm/regress/baseline-many-results.js')
-rw-r--r--js/src/jit-test/tests/wasm/regress/baseline-many-results.js63
1 files changed, 63 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/regress/baseline-many-results.js b/js/src/jit-test/tests/wasm/regress/baseline-many-results.js
new file mode 100644
index 0000000000..ff4d9c35dd
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/regress/baseline-many-results.js
@@ -0,0 +1,63 @@
+// This provokes a crash in baseline if its Stk reservation logic is not up to
+// snuff, bug 1675844.
+
+var txt = `
+(module
+ (type (;0;) (func (result f32 f32 i32)))
+ (func $main (type 0) (result f32 f32 i32)
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ memory.size
+ call $main
+ call $main
+ call $main
+ call_indirect (type 0)
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ memory.size
+ call $main
+ call $main
+ call $main
+ call_indirect (type 0)
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ call $main
+ memory.size)
+ (table (;0;) 62 255 funcref)
+ (memory (;0;) 15 18)
+ (export "t1" (table 0))
+ (export "memory" (memory 0)))`;
+assertErrorMessage(() => new WebAssembly.Module(wasmTextToBinary(txt)),
+ WebAssembly.CompileError,
+ /(unused values not explicitly dropped)|(expected f32, found i32)/);
+