[3.10] bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431) by erlend-aasland · Pull Request #27472 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Merged
Merged
Conversation
Contributor
(cherry picked from commit 7e311e4)
Co-authored-by: Erlend Egeberg Aasland erlend.aasland@innova.no
…ialised (pythonGH-27431). (cherry picked from commit 7e311e4) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
erlend-aasland
requested a review
from berkerpeksag
as a code owner
the-knights-who-say-ni
added
the
CLA signed
label
bedevere-bot
mentioned this pull request
bedevere-bot
added
skip news
awaiting review
labels
erlend-aasland
commented
Jul 30, 2021
erlend-aasland commented
Contributor Author
cc. @pablogsal
ambv
merged commit
0cb470e
into
python:3.10
bedevere-bot
removed
the
awaiting review
label
erlend-aasland
deleted the
backport-7e311e4-3.10
branch
erlend-aasland
commented
Jul 30, 2021
erlend-aasland commented
Contributor Author
Thanks, @ambv 🙏🏻
ambv
reviewed
| rc = sqlite3_exec(self->db, "COMMIT", NULL, NULL, NULL); | ||
| Py_END_ALLOW_THREADS | ||
| if (rc != SQLITE_OK) { | ||
| return _pysqlite_seterror(self->db, NULL); |
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Confirmed that _pysqlite_seterror is indeed different in 3.10 compared to main:
https://github.com/python/cpython/blob/3.10/Modules/_sqlite/util.h#L38
Contributor Author
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was changed in GH-26535 GH-25915, which was not backported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment