Morgan243 / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Protect mbed __init__ wrapper functions #203

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On 2011/06/15 via the maillist JT reported that many __init__() methods have 
the following pattern, but no protection for the potential double allocation::

        retval = int_new((uint32_t)lcd, &pn);
        PM_RETURN_IF_ERROR(retval);
        retval = dict_setItem(pattrs, PM_NONE, pn);
        PM_RETURN_IF_ERROR(retval);

We need to fix these using heap_gcPushTempRoot().

Original issue reported on code.google.com by dwhall...@gmail.com on 16 Jun 2011 at 2:14

GoogleCodeExporter commented 8 years ago
Added temp root protection as suggested.

Original comment by dwhall...@gmail.com on 26 Jun 2011 at 2:18

GoogleCodeExporter commented 8 years ago
This issue was closed by revision f78fd6e58def.

Original comment by dwhall...@gmail.com on 30 Jun 2011 at 3:16