Skip to content

Commit 501546e

Browse files
authored
test: increase allocation so it fails for the test
It used to be impossible to allocate 1e10 bytes but with a v8 update this allocation can succeed. This results in 2x10GB allocations and failure to test the failure :-) Increase allocation to 1e20 bytes, which should fail for some time, returning the test to using only 50MB at runtime. Fixes: #53085 PR-URL: #53099 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent 3fe35dc commit 501546e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-buffer-failed-alloc-typed-arrays.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const SlowBuffer = require('buffer').SlowBuffer;
1212
// whether or not to zero-fill was not being reset, causing TypedArrays to
1313
// allocate incorrectly.
1414
const zeroArray = new Uint32Array(10).fill(0);
15-
const sizes = [1e10, 0, 0.1, -1, 'a', undefined, null, NaN];
15+
const sizes = [1e20, 0, 0.1, -1, 'a', undefined, null, NaN];
1616
const allocators = [
1717
Buffer,
1818
SlowBuffer,

0 commit comments

Comments
 (0)