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 this file with the current libcst master branch causes a stack overflow. After some debugging, this appears to be caused by the cache_left_rec macro cloning the expression (here), which in this case causes a gigantic recursive clone of the expression, eventually overflowing the stack.
The text was updated successfully, but these errors were encountered:
Yeah, it's definitely a pathalogical file. What's annoying is that this brings down the entire process in Rust and there isn't really a way to stop that from happening, so you sort of need to heuristically detect if a given file will stack overflow or not based on the tokens.
Below I've attached a real file that has been published on PyPI. It contains an impressively gigantic expression.
huge.txt
Parsing this file with the current libcst master branch causes a stack overflow. After some debugging, this appears to be caused by the
cache_left_rec
macro cloning the expression (here), which in this case causes a gigantic recursive clone of the expression, eventually overflowing the stack.The text was updated successfully, but these errors were encountered: