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.

Author arigo
Recipients arigo, benjamin.peterson, python-dev, vstinner
Date 2012-03-09.16:07:37
SpamBayes Score 6.307897e-07
Marked as misclassified No
Message-id <1331309258.34.0.664031412134.issue14231@psf.upfronthosting.co.za>
In-reply-to
Content
I will attempt a last time to mention that the docstrings in borrowed_ref_*.py used to say they were *examples*.

That means: (1) find any internal or external C function that returns a borrowed reference; (2) find all callers and write down all the places that don't immediately either Py_INCREF() the returned value or immediately forget about it; (3) for each such place, either come up painfully with a complicated explanation of why it's safe in all possible cases, or in doubt, just fix it by adding Py_INCREF()/Py_DECREF().

What I did in writing these two borrowed_ref_*.py was to do instead (3') spend a few hours figuring out how to exploit the issue until we get a segfault.  I did it for two examples, but what I'm definitely not going to do is spend N times a few hours for a large number N.  If python-dev people just fix the two examples, remove the crashers, and just forget about the issue, then well, the point is missed, but I'm not going to fight it.
History
Date User Action Args
2012-03-09 16:07:38arigosetrecipients: + arigo, vstinner, benjamin.peterson, python-dev
2012-03-09 16:07:38arigosetmessageid: <1331309258.34.0.664031412134.issue14231@psf.upfronthosting.co.za>
2012-03-09 16:07:37arigolinkissue14231 messages
2012-03-09 16:07:37arigocreate