Replies: 1 comment
-
I think it's the same as this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it's the same as this |
Beta Was this translation helpful? Give feedback.
-
I set up fuzzing for the tree-sitter-tlaplus grammar and it quickly found an input where the parser seemingly enters an infinite error recovery loop before eventually running out of memory. Here is the input (I will avoid marking it as a tla code block to keep github happy with me):
Here's a 3MB file full of tree-sitter debug parse output on this input: out.txt
Representative sample:
It seems like it's perpetually recovering to the very start of the text and never makes any progress. Does this seem actionable? As in, is there any external scanner behavior that could cause this? Or is it more likely to be a bug in tree-sitter's error recovery process?
Possibly relevant:
/\
, and also modifies its state, so it is allowed during error recovery by Allow empty external tokens during error recovery, if they change the scanner's state #1783; however, I look for whether all tokens are marked valid in my external scanner (and thus we are in error recovery mode) and this does not seem to be the case at that timeBeta Was this translation helpful? Give feedback.
All reactions