Open dominiccooney opened 5 years ago
As discussed somewhere else, one possible idea is to replace this with ratel.
See #229 (inactive atm).
I can confirm that the problem still appears as of tag entropy-0.2.0.
Cc @RReverser that's a demonstration of the kind of issues we encounter with JSON parsing in real examples already.
Understood. @dominiccooney Note however that replacing with another parser won't alleviate the problem, it can just increase the limit at which a fatal stack overflow occurs.
@RReverser Yeah I understand that. FWIW I don't think Ratel tip has been able to parse fb_bench for a while. (Maybe I'm holding it wrong.)
@dominiccooney When you're talking about fb_bench, are you talking about this snapshot or anything more recent?
Here's a 52 KB/700 line file file I encountered in a random sample of httparchive: f724.js.zip
The nature of the file is:
This caused a stack overflow building dictionaries with d477a474500849c9c26abc51de27e7a399f5b77b:
I guess when the Shift AST parser goes away, so will this JSON → AST step. Do you have a pointer to the Rust JavaScript parser you want to replace Shift with?