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 <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
cjihrig authored and Trott committed Mar 8, 2021
1 parent 4811210 commit 8ab6a6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
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
4 changes: 0 additions & 4 deletions test/wasi/wasi.status
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ prefix wasi
# sample-test : PASS,FLAKY

[true] # This section applies to all platforms

[$system==win32]
# https://github.com/nodejs/node/pull/36139
test-return-on-exit: PASS,FLAKY

0 comments on commit 8ab6a6c

Please sign in to comment.