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
_sre.compile
overwrites TypeError
with OverflowError
#110590
Labels
extension-modules
C modules in the Modules dir
topic-regex
type-bug
An unexpected behavior, bug, or error
Comments
sobolevn
added
type-bug
An unexpected behavior, bug, or error
extension-modules
C modules in the Modules dir
labels
Oct 10, 2023
sobolevn
added a commit
to sobolevn/cpython
that referenced
this issue
Oct 10, 2023
erlend-aasland
pushed a commit
that referenced
this issue
Oct 10, 2023
…110591) TypeError would be overwritten by OverflowError if 'code' param contained non-ints.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 10, 2023
…ons (pythonGH-110591) TypeError would be overwritten by OverflowError if 'code' param contained non-ints. (cherry picked from commit 344d3a2) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 10, 2023
…ons (pythonGH-110591) TypeError would be overwritten by OverflowError if 'code' param contained non-ints. (cherry picked from commit 344d3a2) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This was referenced Oct 10, 2023
Merged
erlend-aasland
pushed a commit
that referenced
this issue
Oct 10, 2023
erlend-aasland
pushed a commit
that referenced
this issue
Oct 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
extension-modules
C modules in the Modules dir
topic-regex
type-bug
An unexpected behavior, bug, or error
Bug report
Reproduction:
It should be:
Because the third arg is
code: object(subclass_of='&PyList_Type')
, it is assumed to be integers inside.Problematic lines:
cpython/Modules/_sre/sre.c
Lines 1510 to 1515 in def7ea5
They do not check for
PyLong_AsUnsignedLong
errors.I have a PR ready :)
Linked PRs
_sre.compile
error overwrite #110591The text was updated successfully, but these errors were encountered: