Skip to content

pyexpat: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode #53648

Closed

Description

@vstinner
BPO 9402
Nosy @vstinner, @florentx
Files
  • pyexpat_py_decref.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 = None
    closed_at = <Date 2010-09-10.22:25:57.648>
    created_at = <Date 2010-07-28.20:53:46.965>
    labels = ['extension-modules', 'expert-XML', 'type-crash']
    title = 'pyexpat: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode'
    updated_at = <Date 2010-09-10.22:25:57.646>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2010-09-10.22:25:57.646>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-10.22:25:57.648>
    closer = 'vstinner'
    components = ['Extension Modules', 'XML']
    creation = <Date 2010-07-28.20:53:46.965>
    creator = 'vstinner'
    dependencies = []
    files = ['18235']
    hgrepos = []
    issue_num = 9402
    keywords = ['patch']
    message_count = 2.0
    messages = ['111845', '116051']
    nosy_count = 3.0
    nosy_names = ['effbot', 'vstinner', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue9402'
    versions = ['Python 2.7', 'Python 3.2']

    Activity

    1. vstinner commented on Jul 28, 2010

      @vstinner
      MemberAuthor

      PyObject_DEL() should not be used to destroy an object because it will break the linked list of allocated objects using in pydebug mode to detect bugs. pyexpat should use Py_DECREF() instead of PyObject_DEL() to destroy an object.

      Attached patch fixes that.

      See bpo-3299 for the whole story.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Jul 28, 2010
    3. added
      type-crashA hard crash of the interpreter, possibly with a core dump
      and removed
      stdlibStandard Library Python modules in the Lib/ directory
      on Aug 4, 2010
    4. vstinner commented on Sep 10, 2010

      @vstinner
      MemberAuthor

      Fixed by r84692.

    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

      extension-modulesC modules in the Modules dirtopic-XMLtype-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions