[Python-Dev] Crash in new "trashcan" mechanism.
Vladimir Marangozov
Vladimir.Marangozov@inrialpes.fr
Tue, 11 Apr 2000 18:59:07 +0200 (CEST)
Christian Tismer wrote:
>
> Vladimir Marangozov wrote:
> >
> > Maybe unrelated, but this code does not handle the case when
> > PyList_Append fails. If it fails, the object needs to be deallocated
> > as usual. Looking at the macros, I don't see how you can do that
> > because Py_TRASHCAN_SAFE_END, which calls the above function,
> > occurs after the finalization code...
>
> Yes, it does not handle this case for the following reasons:
> ...
Not enough good reasons to segfault. I suggest you move the
call to _PyTrash_deposit_object in TRASHCAN_BEGIN and invert
the condition there.
--
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252