[Python-Dev] Showstopper

Guido van Rossum guido@digicool.com
Sun, 15 Apr 2001 17:51:07 -0500


> Loops using PyDict_Next() to mutate values of existing keys can also
> cause __del__ methods to execute (because of decref'ing the old
> values), so there are non-gc vulnerabilities there too we haven't
> really addressed -- and then even switching to "between opcodes" gc
> wouldn't stop the problems unique to gc (since __del__ methods go
> back to the eval loop).

And it's not just __del__.  Lookup operations can invoke arbitrary
Python code for the key comparison, which could mutate the dict (or
let another thread run that mutates the dict).

--Guido van Rossum (home page: http://www.python.org/~guido/)