Title: [sqlite3] Handle out-of-memory errors in sqlite3_column_*()
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, erlendaasland, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-03-02 12:37 by erlendaasland, last changed 2021-03-04 09:51 by berker.peksag. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24723 merged erlendaasland, 2021-03-03 14:22
Messages (3)
msg387923 - (view) Author: Erlend Egeberg Aasland (erlendaasland) * Date: 2021-03-02 12:37
If sqlite3_column_text() and sqlite3_column_blob() return NULL and sqlite3_errcode() returns SQLITE_NOMEM, we should raise MemoryError and bail.
msg388022 - (view) Author: Erlend Egeberg Aasland (erlendaasland) * Date: 2021-03-03 14:33
Quoting from the SQLite docs:
"As long as the input parameters are correct, these routines will only fail if an out-of-memory error occurs during a format conversion"
msg388080 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2021-03-04 09:50
New changeset e161ec5dd7ba9355eb06757b9304019ac53cdf69 by Erlend Egeberg Aasland in branch 'master':
bpo-43369: sqlite3_column_{text,blob} failures now raise MemoryError (GH-24723)
Date User Action Args
2021-03-04 09:51:00berker.peksagsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-03-04 09:50:40berker.peksagsetmessages: + msg388080
2021-03-03 14:33:43erlendaaslandsetmessages: + msg388022
2021-03-03 14:22:00erlendaaslandsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23496
2021-03-02 12:37:39erlendaaslandcreate