-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
There are several errors related to use of _PyLong_CompactValue() in longobject.c.
- The result has type
Py_ssize_t, notintptr_t. Although on most supported platforms it is the same. - Type cast from unsigned integer to signed integer and from signed integer to unsigned integer should be explicit.
- Downcasting should be explicit.
Some of the current code may have undefined behavior.
Linked PRs
- gh-121153: Fix some errors with use of _PyLong_CompactValue() #121154
- gh-121153: Change _PyLong_CompactValue() return type to int #121536
- [3.13] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154) #121900
- [3.12] gh-121153: Fix some errors with use of _PyLong_CompactValue() … #121901
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error