Hi @lunixbochs, thanks for the clear report!
I can work on a fix for this if nobody is already doing so.
It may also make sense to add the topic-sqlite3 and stdlib labels.
Hi @lunixbochs, thanks for the clear report!
I can work on a fix for this if nobody is already doing so.
It may also make sense to add the topic-sqlite3 and stdlib labels.
Sure! I don't think anyone is actively working on it, feel free to to correct me if I'm wrong :)
Activity
sepehr-rs commented on May 12, 2026
Hi @lunixbochs, thanks for the clear report!
I can work on a fix for this if nobody is already doing so.
It may also make sense to add the topic-sqlite3 and stdlib labels.
sharktide commented on May 12, 2026
Sure! I don't think anyone is actively working on it, feel free to to correct me if I'm wrong :)
gh-149738: Fix segmentation fault bug in sqllite3 (#149754)
vstinner commented on Jun 2, 2026
With the fix, the example now fails with:
Traceback (most recent call last): File "/home/vstinner/python/main/x.py", line 3, in <module> del db.row_factory ^^^^^^^^^^^^^^ AttributeError: cannot delete row_factory attributeencukou commented on Jun 2, 2026
Is there any reasonable user code that gets this error, and without the fix it didn't segfault [edit: or raise] later?
[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#…
vstinner commented on Jun 2, 2026
I don't think that it's possible to do anything useful without row_factory or text_factory attribute.
After del db.row_factory, any db.execute() call does crash. So it makes the connection unusable.
For text_factory, any request returning a text column does fail with an internal error (SystemError):
Output without this fix:
Traceback (most recent call last): File "/home/vstinner/python/main/x.py", line 5, in <module> print(row.fetchone()) ~~~~~~~~~~~~^^ SystemError: null argument to internal routine[3.14] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#…
[3.13] gh-149738: Fix segmentation fault bug in sqllite3 (#149754) (#…
gh-152817: Prevent deletion of sqlite3 `cursor.row_factory` attr, mis…