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
re: undocumented exception is raised #109747
Comments
@AA-Turner , for both versions the answer is yes. My checked out commit of 3.13.0a0 is this:
|
Confirm the bug. The RE engine has limitation on the width of look-behind pattern. But there were no checks for this or they did not work. I will see how it can be fixed. |
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Sep 25, 2023
Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1).
serhiy-storchaka
added a commit
that referenced
this issue
Oct 14, 2023
…9859) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1).
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 14, 2023
…ythonGH-109859) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1). (cherry picked from commit e2b3d83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 14, 2023
…ythonGH-109859) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1). (cherry picked from commit e2b3d83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Oct 14, 2023
…GH-109859) (GH-110859) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1). (cherry picked from commit e2b3d83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Oct 14, 2023
…GH-109859) (GH-110860) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1). (cherry picked from commit e2b3d83) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Now you will get better error message. Also, the limit is increased. |
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…ythonGH-109859) Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
The
re
module's documentation says it only raises there.error
exception, but the regex"\x00(?<!\x00{2147483648})"
causes RuntimeError:Other
re
methods, such asmatch
orsplit
show the same result.For brevity:
"\x00(?<!\x00{2147483648})"
-> RuntimeError"\x00(?<!\x00{2147483647})"
-> no errorsI have found this with libFuzzer by testing the
fuzz_sre_compile
binary.CPython versions tested on:
3.11
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: