This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: obj2ast_object() doesn't check return value of PyArena_AddPyObject()
Type: behavior Stage: resolved
Components: Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2013-07-24 21:22 by christian.heimes, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asdl.patch christian.heimes, 2013-07-24 21:22 review
obj2ast_object.patch vstinner, 2013-07-26 22:26 review
Messages (3)
msg193673 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-24 21:22
CID 1046712 (#1 of 1): Unchecked return value (CHECKED_RETURN)
3. check_return: Calling function "PyArena_AddPyObject(PyArena *, PyObject *)" without checking return value (as is done elsewhere 5 out of 6 times).
4. unchecked_value: No check of the return value of "PyArena_AddPyObject(arena, obj)".
 708        PyArena_AddPyObject(arena, obj);
msg193760 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-26 22:26
-    Py_XINCREF(obj);
+    Py_INCREF(obj);

This change is not correct. Here is an updated patch.
msg193761 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-26 22:33
New changeset 65121aa79ab3 by Christian Heimes in branch '3.3':
Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object().
http://hg.python.org/cpython/rev/65121aa79ab3

New changeset ad90fc28769a by Christian Heimes in branch 'default':
Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object().
http://hg.python.org/cpython/rev/ad90fc28769a
History
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62752
2013-07-26 22:34:33christian.heimessetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-07-26 22:33:46python-devsetnosy: + python-dev
messages: + msg193761
2013-07-26 22:26:18vstinnersetfiles: + obj2ast_object.patch
nosy: + vstinner
messages: + msg193760

2013-07-24 21:22:19christian.heimescreate