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
Incorrect regex matching #30
Comments
Interesting bug. Replicated easily (v6.7.7). Confirmed that only happens after exactly 380 characters. Bug not present if () removed; Suspect memory/storage issue of () capturing group? |
Oddly enough I get the bug after 270 characters. |
It appears to be an issue with Scintilla, as I was able to reproduce a similar behaviour in SciTE by dropping in SciLexer.dll v3.3.4 (which Notepad++ v6.7.7 is using) in place of v3.5.5. When I place SciLexer.dll v3.5.5 in the same directory as Notepad++, I no longer see the issue, even with 200,000 "a"s in a row. Not that SciLexer.dll v3.5.5 is perfect though, as it seems to fail to match Edit: Note I don't know whether SciLexer.dll v3.5.5 was built with boost for PCRE support. I simply took SciLexer.dll from the SciTE binary download. I don't have time to check right now. |
Hello Zantier, tommilligan, jonandr and All, I did some tests, on a 6.7.9 version, with its native plugins, and I found out a strange rule about that regex issue ! Follow the few steps below, to reproduce it :
=> When clicking on the Find Next button, you wrongly get the entire contents of this test file :-( Now, :
=> This time, the regex engine, doesn't find, as expected, any matched string ( as the file contains NO lower letter b ) So, for some odd reasons, this regex doesn't work, as soon as the size of the file is > 284 bytes ??? Then, I replace, successively, the SciLexer.dll v3.5.6 file by :
BTW, the regex Best regards, guy038 |
Has anyone reported this on the Scintilla bug system? |
It's an issue concerning Scintilla. |
The symptoms sound like Notepad++ isn't catching an exception that it should (see #4761 (comment)). Anyway, if it is really thought to be a Scintilla issue, why not update Scintilla and see if it remains. :-) |
Version 6.7.7.
I've removed all plugins apart from the plugin manager.
Here is the simplest case I've came up with:
([^b])*b
1 occurrence is found, which matches the whole text, when of course the document doesn't contain "b".
The text was updated successfully, but these errors were encountered: