-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
PyLong_AsLongAndOverflow does not guarantee overflow is -1 when value is -1 #130824
Comments
That would be because passing This is documented:
|
I understand. I'll make sure to focus my fuzzing efforts on the standard library as much as possible. Thanks for the clarification! |
…H-130828) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…ons (pythonGH-130828) (cherry picked from commit 9013080) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
I'll deal with backporting both PRs to 3.12. |
… functions (pythonGH-130828) (cherry picked from commit 9013080) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
… functions (pythonGH-130828) (cherry picked from commit 9013080) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…GH-130828) (GH-130876) (cherry picked from commit 9013080) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Bug report
Bug description:
In the function
pylong_aslongandoverflow
cpython/Modules/_testlimitedcapi/long.c
Lines 621 to 632 in 3929af5
there is an assertion
overflow == -1
whenvalue == -1
. But this is not always true, like ifarg
isNULL
.Reproduce:
Result:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
NULL
inPyLong_*AndOverflow
functions #130828NULL
inPyLong_*AndOverflow
functions (GH-130828) #130869The text was updated successfully, but these errors were encountered: