Message103510
>Bugs in set_repr:
>> keys = PySequence_List((PyObject *)so);
>> if (keys == NULL)
>> goto done;
>>
>> listrepr = PyObject_Repr(keys);
>> Py_DECREF(keys);
>List pointed to by keys is already deallocated at this point.
>> if (listrepr == NULL) {
>> Py_DECREF(keys);
>>But this code tries to DECREF it.
>> goto done;
>> }
I don't follow why you think keys is already deallocated.
When assigned by PySequence_List() without a NULL return, the refcnt is one. The call to PyObject_Repr(keys) does not change the refcnt of keys,
so the Py_DECREF(keys) is correct. |
|
Date |
User |
Action |
Args |
2010-04-18 18:21:41 | rhettinger | set | recipients:
+ rhettinger, abacabadabacaba |
2010-04-18 18:21:41 | rhettinger | set | messageid: <1271614901.23.0.143265863856.issue8420@psf.upfronthosting.co.za> |
2010-04-18 18:21:39 | rhettinger | link | issue8420 messages |
2010-04-18 18:21:39 | rhettinger | create | |
|