Issue 15604: PyObject_IsTrue failure checks (original ) (raw )Created on 2012-08-09 15:24 by serhiy.storchaka , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (7)
msg167789 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2012-08-09 15:24
PyObject_IsTrue can fail, but not everywhere in a code a returned value checked. Here is a patches which add such checks. Note, patches for all three Python versions are rather different.
msg167794 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2012-08-09 17:04
Is it possible to add test cases for (at least some of) these issues?
msg167906 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2012-08-10 18:37
I shall try to do this, but it will take a lot of time. Besides, now in the code there are a lot of *correct* checked usage of PyObject_IsTrue without test cases. So I'm not sure that the tests are needed here, and that they are worth the effort.
msg168243 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2012-08-14 21:45
Patches updated to reflect Antoine's comments.
msg168337 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2012-08-15 20:56
Patches updated again.
msg168339 - (view)
Author: Roundup Robot (python-dev)
Date: 2012-08-15 21:27
New changeset ba1c48f8b571 by Antoine Pitrou in branch '2.7': Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly. http://hg.python.org/cpython/rev/ba1c48f8b571 New changeset 56dc7b09f390 by Antoine Pitrou in branch '3.2': Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly. http://hg.python.org/cpython/rev/56dc7b09f390 New changeset b878df1d23b1 by Antoine Pitrou in branch 'default': Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly. http://hg.python.org/cpython/rev/b878df1d23b1
msg168341 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2012-08-15 21:45
Thank you Antoine.