This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _sqlite3: Block *all* operations on a closed Connection object
Type: crash Stage: commit review
Components: Extension Modules Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ghaering Nosy List: barry, ghaering, vstinner
Priority: release blocker Keywords: 26backport, patch

Created on 2010-01-10 18:42 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite_closed.patch vstinner, 2010-01-10 18:42
Messages (6)
msg97538 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-01-10 18:42
Add call to pysqlite_check_connection() on the follow methods:

 * create_function()
 * create_aggregate()
 * set_authorizer()
 * set_progress_handler()
 * __call__()

Eg. fix the following segfault:

   c = Connection("test")
   c.close()
   c.set_authorizer(func)

The patch includes unit tests to test all methods on a closed connection.

sqlite3 already raises an error for some operations on a closed socket (eg. connection.commit()), but not on all operations.
msg100456 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2010-03-05 09:23
Applied in trunk. Thanks!
msg100486 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2010-03-05 15:56
Now also fixed in 2.6 and 3.1 maintenance branches.
msg100487 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-03-05 16:01
Commit numbers: r78688 (trunk), r78698 (py3k), r78699 (2.6), r78700 (3.1).

2.6 branch is froze because 2.6.5RC1 was released and 2.6.5 final is planned for next week. Ask barry if you should revert your commit or not r78699.
msg100490 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2010-03-05 16:27
As requested per Barry, marking this as release blocker for 2.6.
msg100604 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-03-07 20:39
I'm going to let this one stay for 2.6.5 since we need another rc anyway.  Thanks for the fix!
History
Date User Action Args
2022-04-11 14:56:56adminsetgithub: 51919
2010-03-07 20:39:49barrysetstatus: open -> closed

messages: + msg100604
2010-03-06 19:35:20benjamin.petersonsetversions: - Python 3.1, Python 2.7, Python 3.2
2010-03-05 16:27:11ghaeringsetstatus: closed -> open
priority: release blocker
messages: + msg100490

keywords: + 26backport
stage: patch review -> commit review
2010-03-05 16:01:32vstinnersetnosy: + barry
messages: + msg100487
2010-03-05 15:56:19ghaeringsetmessages: + msg100486
2010-03-05 09:23:11ghaeringsetstatus: open -> closed
resolution: fixed
messages: + msg100456
2010-01-10 19:20:52pitrousetassignee: ghaering

nosy: + ghaering
stage: patch review
2010-01-10 18:42:13vstinnercreate