Message289310
> 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 */
} |
|
Date |
User |
Action |
Args |
2017-03-09 17:13:17 | vstinner | set | recipients:
+ vstinner, svelankar |
2017-03-09 17:13:17 | vstinner | set | messageid: <1489079597.25.0.699577770151.issue29674@psf.upfronthosting.co.za> |
2017-03-09 17:13:17 | vstinner | link | issue29674 messages |
2017-03-09 17:13:17 | vstinner | create | |
|