◐ Shell
clean mode source ↗

[3.10] bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431) by erlend-aasland · Pull Request #27472 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented

Jul 30, 2021

edited by bedevere-bot

Loading

Copy link Copy Markdown

Contributor

(cherry picked from commit 7e311e4)

Co-authored-by: Erlend Egeberg Aasland erlend.aasland@innova.no

https://bugs.python.org/issue31746

…ialised (pythonGH-27431).

(cherry picked from commit 7e311e4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

@erlend-aasland

Copy link Copy Markdown

Contributor Author

@ambv ambv merged commit 0cb470e into python:3.10

Jul 30, 2021

@erlend-aasland erlend-aasland deleted the backport-7e311e4-3.10 branch

July 30, 2021 12:02

@erlend-aasland

Copy link Copy Markdown

Contributor Author

Thanks, @ambv 🙏🏻

rc = sqlite3_exec(self->db, "COMMIT", NULL, NULL, NULL);
Py_END_ALLOW_THREADS
if (rc != SQLITE_OK) {
return _pysqlite_seterror(self->db, NULL);

Copy link Copy Markdown

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

@erlend-aasland erlend-aasland

Jul 30, 2021

edited

Loading

Copy link Copy Markdown

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

Reviewers

@ambv ambv ambv left review comments

@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag berkerpeksag is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@erlend-aasland @ambv @the-knights-who-say-ni @bedevere-bot