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 vstinner
Recipients svelankar, vstinner
Date 2017-03-09.17:13:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489079597.25.0.699577770151.issue29674@psf.upfronthosting.co.za>
In-reply-to
Content
> So once these functions are decorated with this attribute, what kind of testing/validation you have in mind, please let me know.

Call PyMem_Malloc(Py_ssize_t) for example: it must emit a warning on GCC 7, since casting negative values to size_t overflows.

Not sure how to test the attribute on GCC 6. Maybe some GCC related static analyzers are able to detect memory leaks like:

void test(void)
{
   void *ptr = PyMem_Malloc(16);
   /* don't free ptr */
}
History
Date User Action Args
2017-03-09 17:13:17vstinnersetrecipients: + vstinner, svelankar
2017-03-09 17:13:17vstinnersetmessageid: <1489079597.25.0.699577770151.issue29674@psf.upfronthosting.co.za>
2017-03-09 17:13:17vstinnerlinkissue29674 messages
2017-03-09 17:13:17vstinnercreate