15 Mar
2002
15 Mar
'02
8:24 p.m.
Tim Peters reports on "comp.lang.python":
[Martin v. Loewis]
The garbage collector runs while having the GIL, so it does not need to be thread-safe.
There's still a vulnerability here: gc *assumes* the GIL is held when _PyObject_GC_Malloc gets called, and doesn't verify that the GIL is in fact held. A rogue extension module could violate this precondition without triggering a predictable error (and then "random" segfaults would be likely). Maybe, we should check for this, too.
Dieter