-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Expressions with the * operator runs infinitely #27
Comments
Whoa... well this is bad. I'm not sure what the proper fix is for this or when I'll get time to look into it, but thanks for the report. |
I can confirm this. Please use |
Maybe we should disallow searching any two character regex where the second character is a '', or the one character regex where '' is the only character. Does that cover all of the bad cases or are there other cases we're missing? |
Some test cases performed on the website mentioned in the first comment:
It seems that some optimization is done in case 1 as opposed to case 5. So indeed, it might be a good idea to disallow a regex consisting of any character followed by * only. PS: You can escape asterisks and other Markdown syntax by a backslash: \ * |
On this page:
http://docs.oracle.com/javase/tutorial/essential/concurrency/procthread.html
I searched s* and it appears to enter an infinite loop in v 1.8. Eventually, the page crashes.
The text was updated successfully, but these errors were encountered: