Skip to content

Returning None from a callback with restype py_object decrements None's refcount too much#81061

@dgelessus

Description

@dgelessus
mannequin
BPO36880
Nosy@freakboy3742, @eryksun, @tonybaloney, @dgelessus
PRs
  • GH-81061: Fix refcount issue when returning None from a ctypes.py_object callback #13364
  • Files
  • python3.8_2019-05-11-000251.crash: OS X crash report (Python 3.8)
  • test_gc_ctypes.py
  • 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/tonybaloney'closed_at=Nonecreated_at=<Date2019-05-10.22:39:01.064>labels= ['easy', '3.8', '3.9', '3.10', 'ctypes', 'type-crash'] title="Returning None from a callback with restype py_object decrements None's refcount too much"updated_at=<Date2021-03-13.06:00:14.026>user='https://github.com/dgelessus'

    bugs.python.org fields:

    activity=<Date2021-03-13.06:00:14.026>actor='eryksun'assignee='anthonypjshaw'closed=Falseclosed_date=Nonecloser=Nonecomponents= ['ctypes'] creation=<Date2019-05-10.22:39:01.064>creator='dgelessus'dependencies= [] files= ['48325', '48326'] hgrepos= [] issue_num=36880keywords= ['patch', 'easy (C)'] message_count=10.0messages= ['342141', '342163', '342164', '342165', '342166', '342174', '342186', '342221', '342304', '342387'] nosy_count=4.0nosy_names= ['freakboy3742', 'eryksun', 'anthonypjshaw', 'dgelessus'] pr_nums= ['13364'] priority='normal'resolution=Nonestage='patch review'status='open'superseder=Nonetype='crash'url='https://bugs.python.org/issue36880'versions= ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Linked PRs

    Metadata

    Metadata

    Assignees

    Labels

    3.10only security fixes3.8 (EOL)end of life3.9 (EOL)end of lifeeasytopic-ctypestype-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