Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid possible crash in pysqlite_connection_create_collation #72084

Closed
zhangyangyu opened this issue Aug 30, 2016 · 7 comments
Closed

Avoid possible crash in pysqlite_connection_create_collation #72084

zhangyangyu opened this issue Aug 30, 2016 · 7 comments
Assignees
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@zhangyangyu
Copy link
Member

BPO 27897
Nosy @vadmium, @serhiy-storchaka, @zhangyangyu
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • create_collation.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2016-09-26.21:28:43.861>
    created_at = <Date 2016-08-30.16:22:28.499>
    labels = ['3.7', 'library', 'type-crash']
    title = 'Avoid possible crash in pysqlite_connection_create_collation'
    updated_at = <Date 2017-03-31.16:36:35.248>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:35.248>
    actor = 'dstufft'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-09-26.21:28:43.861>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2016-08-30.16:22:28.499>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['44276']
    hgrepos = []
    issue_num = 27897
    keywords = ['patch']
    message_count = 7.0
    messages = ['273927', '277470', '277471', '277472', '277791', '277794', '277795']
    nosy_count = 4.0
    nosy_names = ['python-dev', 'martin.panter', 'serhiy.storchaka', 'xiang.zhang']
    pr_nums = ['552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue27897'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    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.

    @zhangyangyu zhangyangyu added stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump labels Aug 30, 2016
    @serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Sep 26, 2016
    @serhiy-storchaka serhiy-storchaka self-assigned this Sep 26, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 26, 2016

    New changeset c739660489c1 by Serhiy Storchaka in branch '3.5':
    Issue bpo-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 bpo-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 bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation()
    https://hg.python.org/cpython/rev/9fc2b6dba9c2

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 26, 2016

    New changeset 1aae9b7ff321 by Serhiy Storchaka in branch '2.7':
    Issue bpo-27897: Backported tests.
    https://hg.python.org/cpython/rev/1aae9b7ff321

    @serhiy-storchaka
    Copy link
    Member

    LGTM. Thank you for your patch.

    @vadmium
    Copy link
    Member

    vadmium commented Oct 1, 2016

    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

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 1, 2016

    New changeset 38e954a2a37e by Serhiy Storchaka in branch '2.7':
    Issue bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation()
    https://hg.python.org/cpython/rev/38e954a2a37e

    @serhiy-storchaka
    Copy link
    Member

    Thanks Martin!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants