Skip to content

Commit

Permalink
test: improve stability of oom test
Browse files Browse the repository at this point in the history
The OOM test uses a value that caused an OOM crash from V8 on certain
machines when V8 did not notify the host of OOM soon enough.

PR-URL: #41681
Refs: https://github.com/tc39/proposal-iterator-helpers#asindexedpairs
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
benjamingr authored and ruyadorno committed Feb 7, 2022
1 parent 311050e commit 351ebf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-windows-failed-heap-allocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const tmpdir = require('../common/tmpdir');
tmpdir.refresh();

// --max-old-space-size=3 is the min 'old space' in V8, explodes fast
const cmd = `"${process.execPath}" --max-old-space-size=3 "${__filename}"`;
exec(`${cmd} heapBomb`, { cwd: tmpdir.path }, common.mustCall((err) => {
const cmd = `"${process.execPath}" --max-old-space-size=30 "${__filename}"`;
exec(`${cmd} heapBomb`, { cwd: tmpdir.path }, common.mustCall((err, stdout, stderr) => {
const msg = `Wrong exit code of ${err.code}! Expected 134 for abort`;
// Note: common.nodeProcessAborted() is not asserted here because it
// returns true on 134 as well as 0x80000003 (V8's base::OS::Abort)
Expand Down

0 comments on commit 351ebf2

Please sign in to comment.