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
Parsing a file with a single variable declaration initialized to a big string causes RangeError to be raised.
var acorn = require("./acorn.js");
var fs = require("fs");
fs.readFile("./test/jquery-string.js", function(err, data) {
if (err) throw err;
acorn.parse(data);
});
master ~/work/acorn $ node test1.js
/home/denis/work/acorn/acorn.js:804
return finishToken(_string, String.fromCharCode.apply(null, rs_str));
^
RangeError: Maximum call stack size exceeded
at readString (/home/denis/work/acorn/acorn.js:804:57)
at getTokenFromCode (/home/denis/work/acorn/acorn.js:646:14)
at readToken (/home/denis/work/acorn/acorn.js:692:15)
at next (/home/denis/work/acorn/acorn.js:936:5)
at eat (/home/denis/work/acorn/acorn.js:1013:7)
at parseVar (/home/denis/work/acorn/acorn.js:1370:19)
at parseStatement (/home/denis/work/acorn/acorn.js:1251:14)
at parseTopLevel (/home/denis/work/acorn/acorn.js:1073:18)
at Object.exports.parse (/home/denis/work/acorn/acorn.js:42:12)
at /home/denis/work/acorn/test1.js:5:11
master ~/work/acorn $ node --version
v0.8.20
master ~/work/acorn $ git describe --tags
v0.1-3-g782259b
Passing --stack-size=1000 to node seem to fix it, but esprima handles the file without any errors without any additional options, so I'm not sure if that's expected behavior or a bug.
The text was updated successfully, but these errors were encountered:
Parsing a file with a single variable declaration initialized to a big string causes
RangeError
to be raised.Passing
--stack-size=1000
to node seem to fix it, but esprima handles the file without any errors without any additional options, so I'm not sure if that's expected behavior or a bug.The text was updated successfully, but these errors were encountered: