Issue 27897: Avoid possible crash in pysqlite_connection_create_collation (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/72084

classification

Title: Avoid possible crash in pysqlite_connection_create_collation
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: martin.panter, python-dev, serhiy.storchaka, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-08-30 16:22 by xiang.zhang, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
create_collation.patch xiang.zhang,2016-08-30 16:22 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft,2017-03-31 16:36
Messages (7)
msg273927 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-08-30 16:22
When supplied a custom string with upper returning a non-string, pysqlite_connection_create_collation will fail assertion and crash. Serhiy, I think we can use the same way in set_isolation_level to avoid this.
msg277470 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-26 21:16
New changeset c739660489c1 by Serhiy Storchaka in branch '3.5': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/c739660489c1 New changeset c2eb90422aec by Serhiy Storchaka in branch '3.6': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/c2eb90422aec New changeset 9fc2b6dba9c2 by Serhiy Storchaka in branch 'default': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/9fc2b6dba9c2
msg277471 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-26 21:27
New changeset 1aae9b7ff321 by Serhiy Storchaka in branch '2.7': Issue #27897: Backported tests. https://hg.python.org/cpython/rev/1aae9b7ff321
msg277472 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-26 21:28
LGTM. Thank you for your patch.
msg277791 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-10-01 02:58
The test in 2.7 (1aae9b7ff321) seems to cause a Windows 8.1 buildbot to hang in test_sqlite. I deduced this because there is no mention of "test_sqlite" in the test log output, compared to a previous successful test log. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%202.7/builds/474
msg277794 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-01 05:25
New changeset 38e954a2a37e by Serhiy Storchaka in branch '2.7': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/38e954a2a37e
msg277795 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-10-01 05:26
Thanks Martin!
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72084
2017-03-31 16:36:35 dstufft set pull_requests: + <pull%5Frequest1078>
2016-10-01 05:26:03 serhiy.storchaka set messages: + versions: + Python 2.7
2016-10-01 05:25:25 python-dev set messages: +
2016-10-01 02:58:50 martin.panter set nosy: + martin.pantermessages: +
2016-09-26 21:28:43 serhiy.storchaka set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2016-09-26 21:27:51 python-dev set messages: +
2016-09-26 21:16:44 python-dev set nosy: + python-devmessages: +
2016-09-26 20:25:59 serhiy.storchaka set assignee: serhiy.storchakastage: patch reviewversions: + Python 3.7
2016-08-30 16:22:28 xiang.zhang create