LibCST
LibCST copied to clipboard
Stack overflow when parsing an expression
Below I've attached a real file that has been published on PyPI. It contains an impressively gigantic expression.
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.