Skip to content

gh-149738: Fix segmentation fault bug in sqllite3#149754

Open
sepehr-rs wants to merge 3 commits into
python:mainfrom
sepehr-rs:fix-149738
Open

gh-149738: Fix segmentation fault bug in sqllite3#149754
sepehr-rs wants to merge 3 commits into
python:mainfrom
sepehr-rs:fix-149738

Conversation

@sepehr-rs
Copy link
Copy Markdown

@sepehr-rs sepehr-rs commented May 13, 2026

Fixes #149738.

>>> import sqlite3
>>> db = sqlite3.connect(":memory:")
>>> del db.row_factory
>>> db.execute("test")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    db.execute("test")
    ~~~~~~~~~~^^^^^^^^
sqlite3.OperationalError: near "test": syntax error
>>> 

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need tests and check what happens on the created connection after deletion (check that there is still a row factory on the newly created cursor)

@sepehr-rs
Copy link
Copy Markdown
Author

sepehr-rs commented May 13, 2026

Thanks for your comment and review, @picnixz!
I’ve added the tests as requested and would appreciate any feedback.

P.S. The Read the Docs build is failing, but the logs indicate it’s due to an external issue unrelated to my changes.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deleting sqlite3 row_factory causes segfault

2 participants