[Python-Dev] Re: Evil Trashcan and GC interaction

Neil Schemenauer nas@python.ca
Thu, 28 Mar 2002 10:45:14 -0800


Tim Peters wrote:
> We each patched ceval.c locally; e.g., here's mine:
> 
> #define SETLOCAL(i, value)	do { PyObject *_t = GETLOCAL(i); 	\
> 				     GETLOCAL(i) = value;		\
> 				     Py_XDECREF(_t); } while (0)

That's the same fix Andrew and I had in mind.  My concern is that this
is probably not the only bug of this type.  The trashcan mechanism
changes the ordering of object deallocation.  What are the chances of
other bugs like this lurking somewhere?

  Neil