[New-bugs-announce] [issue44562] types.GenericAlias should decref instead of using delete in tp_new
Ken Jin
report at bugs.python.org
Sun Jul 4 11:34:00 EDT 2021
New submission from Ken Jin <kenjin4096 at gmail.com>:
Ref: comment chain at https://github.com/python/cpython/pull/27008#discussion_r663450441.
setup_ga fails only if PyTuple_Pack fails, which usually happens when Python is out of memory. The cleanup code for setup_ga shouldn't use PyObject_GC_DEL as mentioned in Pablo's comment above.
I don't know how to add a test for out of memory, so I'll send a PR without test soon.
----------
messages: 396944
nosy: kj, pablogsal
priority: normal
severity: normal
status: open
title: types.GenericAlias should decref instead of using delete in tp_new
versions: Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44562>
_______________________________________
More information about the New-bugs-announce
mailing list