This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Description
- Version: 8.11.1
- Platform: Windows 10 x64
test.js
var a = [];
for (var i = 65536; --i >= 0;) a.push(i);
[].push.apply([], a);
node runs to completion, whereas node-chakracore fails with:
$ node test.js
test.js:3
[].push.apply([], a);
^
Error: Out of stack space
at Anonymous function (test.js:3:1)
at Module.prototype._compile (module.js:652:5)
at Module._extensions[.js] (module.js:663:3)
at Module.prototype.load (module.js:565:3)
at tryModuleLoad (module.js:505:5)
at Module._load (module.js:497:3)
at Module.runMain (module.js:693:3)
at startup (bootstrap_node.js:189:9)
at Anonymous function (bootstrap_node.js:613:3)
I have observed failures with shorter lengths than 65536, but they are not as reliably reproducible. While I appreciate this is a lot of parameters to pass on to Function.apply(), it is an efficient way to construct a large array, e.g. https://github.com/mishoo/UglifyJS2/blob/b5bab254ce2122a43e9ca0fdc757aecda7191576/test/mocha/parentheses.js#L93-L95