Skip to content

Commit

Permalink
test: fix wasi/test-return-on-exit on 32-bit systems
Browse files Browse the repository at this point in the history
Starting with the V8 8.8 update, this test has been regularly
crashing with an out of memory error on 32-bit Windows. The issue
has been narrowed down to a function not being bound. This seems
like a V8 bug, but at least it seems that we can work around it.

Fixes: #37374

PR-URL: #37615
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
cjihrig authored and danielleadams committed Mar 16, 2021
1 parent 23d6541 commit 0582c51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/wasi/test-return-on-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const buffer = fs.readFileSync(modulePath);
// Verify that if a WASI application throws an exception, Node rethrows it
// properly.
const wasi = new WASI({ returnOnExit: true });
wasi.wasiImport.proc_exit = () => { throw new Error('test error'); };
const patchedExit = () => { throw new Error('test error'); };
wasi.wasiImport.proc_exit = patchedExit.bind(wasi.wasiImport);
const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
const { instance } = await WebAssembly.instantiate(buffer, importObject);

Expand Down

0 comments on commit 0582c51

Please sign in to comment.