[Patches] Safe destruction of recursive objects
Christian Tismer
tismer@tismer.com
Thu, 09 Mar 2000 22:38:15 +0100
Greg Stein wrote:
>
> On Wed, 8 Mar 2000, Christian Tismer wrote:
> >...
> > I think you should, but not concerning this patch.
> > If a dealloc occours without the interpreter lock, then
> > it is an error, since this would allow to start an interpreter
> > from the __del__ hook.
> > Then, if we know that the interpreter lock is there all the time,
> > then it is also safe to use a list.
>
> Yes, yes, and yes.
>
> > What I'd like to do is to insert a check for the interpreter
> > lock into my patch, and to use that to find hidden implementation
> > errors, most probably in extension modules.
>
> That seems a bit silly. We don't check for the lock anywhere else. The
> interpreter makes a basic assumption across the entire code body that the
> lock is held when calls to the API are made. There is no reason to start
> questioning that assumption.
Ok, great!
I'm just ready with an exhaustive search for violations
in the core. There was exactly the one bug that Guido found before
in posixmodule:
posix_listdir uses PyList_Append in line 1022
All the rest is clean!
ciao - chris (do you want to see that huge protocol? :-)
--
Christian Tismer :^) <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
we're tired of banana software - shipped green, ripens at home