Debian Codegraph @

js/src/jit-test/tests/wasm/regress/too-large-frame.js

raw
1 // Bug 1280934, equivalent test case.
2
3 try {
4
5 wasmEvalText(
6 `(module
7 (func $func0 (result i32) ${locals()}
8 (i32.const 0))
9 (export "" (func 0)))`);
10
11 } catch (e) {
12 // The wasm baseline compiler throws OOM on too-large frames, so
13 // handle that.
14 if (!String(e).match(/out of memory/))
15 throw e;
16 }
17
18 // The wasm baseline compiler cuts off frames at 256KB at the moment;
19 // the test case for bug 1280934 constructed a frame around 512KB so
20 // duplicate that here.
21
22 function locals() {
23 var s = "";
24 for ( var i=0 ; i < 50000 ; i++ )
25 s += "(local f64)\n";
26 return s;
27 }