Skip to content

Commit f0b154e

Browse files
authored
Increase interpreter buffer memory size (#3162)
* Increase interpreter buffer memory size * Fix test
1 parent 7c626e4 commit f0b154e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/wasm-interpreter/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Interpreter {
7272
// (the LLVM call stack, now the wasm stack). To handle that let's give
7373
// our selves a little bit of memory and set the stack pointer (global
7474
// 0) to the top.
75-
ret.mem = vec![0; 0x100];
75+
ret.mem = vec![0; 0x400];
7676
ret.sp = ret.mem.len() as i32;
7777

7878
// Figure out where the `__wbindgen_describe` imported function is, if

crates/wasm-interpreter/tests/smoke.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ fn globals() {
8787
(export "foo" (func $foo))
8888
)
8989
"#;
90-
interpret(wat, "foo", Some(&[256]));
90+
// __wbindgen_describe is called with a global - in Frame.eval we assume all access to globals is the stack pointer
91+
interpret(wat, "foo", Some(&[1024]));
9192
}
9293

9394
#[test]

0 commit comments

Comments
 (0)