-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless loop in BracketNotationParser #10
Comments
Has this been resolved already? Can't seem to reproduce (tested on both my Windows and CentOS machines) using the provided minimal example |
I just checked and it seems like there is a workaround for this bug which prevents the nested loop. In lines 89-93, invalid characters are skipped which guarantees termination. However, the expected behaviour might exit with an appropriate error message. Needs some engineering. |
Do you mean these lines? tree-similarity/src/parser/bracket_notation_parser_impl.h Lines 89 to 92 in 76e6262
|
Exactly. |
In case of an invalid input, the bracket notation parser may end up in an endless loop. More specifically, the while loop in function
parse_single
does not increase the iterator in case thatmatch_str
is no bracket.Minimal example:
{a{b}c}
This causes an endless loop with
match_str
equal toc
.The text was updated successfully, but these errors were encountered: