Skip to content

del sqlite3.Connection.autocommit crashes #156100

Description

@serhiy-storchaka

Crash report

import sqlite3
cx = sqlite3.connect(":memory:")
del cx.autocommit

set_autocommit() in Modules/_sqlite/connection.c passes the value to autocommit_converter(), which dereferences it in Py_IsTrue().
Deleting row_factory and text_factory of a connection is already rejected with an AttributeError (gh-149738); autocommit should be rejected too.

The same code is in 3.13, 3.14 and 3.15.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesextension-modulesC modules in the Modules dirtopic-sqlite3type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions