Repository navigation
Incorrect error handling for APIs that can raise exceptions #105375
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixestopic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jun 6, 2023 erlend-aasland commented
on Jun 6, 2023 on Jun 6, 2023 · Hidden as outdatedAuthorshow commentMore actions- linked a pull request that will close this issuegh-105375: Improve error handling in sqlite3 collation callback #105412
on Jun 6, 2023 - changed the title
[-]Incorrect error handling in sqlite3 collation callback[/-][+]Missing error handling for APIs that can raise exceptions[/+]on Jun 7, 2023 - changed the title
[-]Missing error handling for APIs that can raise exceptions[/-][+]Incorrect error handling for APIs that can raise exceptions[/+]on Jun 7, 2023 - added a commit that references this issue
on Jun 7, 2023 126 remaining items
- added a commit that references this issue
on Jun 12, 2023 - added a commit that references this issue
on Jun 12, 2023 - added a commit that references this issue
on Jun 13, 2023 - added 3 commits that reference this issue
on Jun 13, 2023 - added a commit that references this issue
on May 8, 2024 - added a commit that references this issue
on May 8, 2024 - added a commit that references this issue
on Jun 19, 2024 - added a commit that references this issue
on Jul 31, 2024 - added 2 commits that reference this issue
on Jul 22, 2026
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixestopic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
For example, in the collation callback two
strobjects (string1andstring2) are created usingPyUnicode_FromStringAndSize. Error handling should happen directly after each call toPyUnicode_FromStringAndSize:cpython/Modules/_sqlite/connection.c
Lines 1870 to 1875 in 0cb6b9b
Other cases where error handling is not done immediately after the API has been used:
zoneinfomodule #105586_testcapi/heaptype.c#105608I might have missed some; I did not do a complete audit yet.
Linked PRs
zoneinfomodule #105586_testcapi/heaptype.c#105608zoneinfomodule (GH-105586) #105612zoneinfomodule (GH-105586) #105613_testcapi/heaptype.c(GH-105608) #105615