Skip to content

[sqlite3] Handle out-of-memory errors in sqlite3_column_*() #87535

Closed

Description

@erlend-aasland
BPO 43369
Nosy @berkerpeksag, @serhiy-storchaka, @erlend-aasland
PRs
  • bpo-43369: sqlite3_column_text() and sqlite3_column_blob() failures now raise MemoryError #24723
  • 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 = None
    closed_at = <Date 2021-03-04.09:51:00.030>
    created_at = <Date 2021-03-02.12:37:39.277>
    labels = ['type-bug', 'library', '3.10']
    title = '[sqlite3] Handle out-of-memory errors in sqlite3_column_*()'
    updated_at = <Date 2021-03-04.09:51:00.029>
    user = 'https://github.com/erlend-aasland'

    bugs.python.org fields:

    activity = <Date 2021-03-04.09:51:00.029>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-03-04.09:51:00.030>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2021-03-02.12:37:39.277>
    creator = 'erlendaasland'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43369
    keywords = ['patch']
    message_count = 3.0
    messages = ['387923', '388022', '388080']
    nosy_count = 3.0
    nosy_names = ['berker.peksag', 'serhiy.storchaka', 'erlendaasland']
    pr_nums = ['24723']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43369'
    versions = ['Python 3.10']

    Activity

    1. erlend-aasland commented on Mar 2, 2021

      @erlend-aasland
      ContributorAuthor

      If sqlite3_column_text() and sqlite3_column_blob() return NULL and sqlite3_errcode() returns SQLITE_NOMEM, we should raise MemoryError and bail.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Mar 2, 2021
    3. erlend-aasland commented on Mar 3, 2021

      @erlend-aasland
      ContributorAuthor

      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"

    4. berkerpeksag commented on Mar 4, 2021

      @berkerpeksag
      Member

      New changeset e161ec5 by Erlend Egeberg Aasland in branch 'master':
      bpo-43369: sqlite3_column_{text,blob} failures now raise MemoryError (GH-24723)
      e161ec5

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions