Closed
Description
Noticed with a sufficiently large Buffer (or ArrayBuffer) tab completion in the repl will crash the process with out of memory + core dump
$ node
> var b = Buffer(1e8)
undefined
> b.l
<--- Last few GCs --->
10335 ms: Mark-sweep 1397.5 (1445.0) -> 1397.4 (1445.0) MB, 264.7 / 0 ms [allocation failure] [GC in old space requested].
10652 ms: Mark-sweep 1397.5 (1445.0) -> 1397.4 (1445.0) MB, 263.0 / 0 ms [allocation failure] [GC in old space requested].
11009 ms: Mark-sweep 1397.5 (1445.0) -> 1397.4 (1445.0) MB, 264.6 / 0 ms [last resort gc].
11330 ms: Mark-sweep 1397.4 (1445.0) -> 1397.4 (1445.0) MB, 321.3 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x3bd157b37339 <JS Object>
2: ObjectGetOwnPropertyKeys(aka ObjectGetOwnPropertyKeys) [native v8natives.js:~688] [pc=0x1e2e0302e4b3] (this=0x3bd157b04131 <undefined>,J=0x5c7b14041d1 <an Uint8Array with map 0x20a90d01d2d9>,as=48)
3: getOwnPropertyNames [native v8natives.js:752] [pc=0x1e2e0302e31b] (this=0x3bd157b36b61 <JS Function Object (SharedFunctionInfo 0x3bd157b36ad1)>,J=0x5c7b14041d1 <an Uint8Array with map 0...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)
$ node -pe 'var b = Buffer(1e8); b.length'
100000000
$ node -v
v4.1.1