You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 15, 2020. It is now read-only.
[].push.apply([], a) results in "Out of stack space" #521
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)
Activity
MSLaguana commentedon Apr 24, 2018
I'm curious why you use
pushrather thanconcat:And actually, comparing with node-v8 on the sample in your mocha test, the concat version is faster in addition to using less stack.
alexlamsl commentedon Apr 26, 2018
I did
push()instead ofconcat()to minimise memory allocation, though I haven't consideredcall()being faster thanapply().Thanks for the workaround – will apply to mishoo/UglifyJS#3087
alexlamsl commentedon May 26, 2018
I shall close this since it's a special case and more to do with deficiencies of ChakraCore than this project.