mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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: https://github.com/nodejs/node/issues/53085 PR-URL: https://github.com/nodejs/node/pull/53099 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
1 parent
c1b3e0ed6f
commit
a371dea699
1 file changed
+1
-1
@@ -12,7 +12,7 @@ const SlowBuffer = require('buffer').SlowBuffer;
|
||||
// whether or not to zero-fill was not being reset, causing TypedArrays to
|
||||
// allocate incorrectly.
|
||||
const zeroArray = new Uint32Array(10).fill(0);
|
||||
const sizes = [1e10, 0, 0.1, -1, 'a', undefined, null, NaN];
|
||||
const sizes = [1e20, 0, 0.1, -1, 'a', undefined, null, NaN];
|
||||
const allocators = [
|
||||
Buffer,
|
||||
SlowBuffer,
|
||||
|
||||
Reference in new issue
Block a user