[Zope-dev] disabling gc does not necessarily hide memorycorruption

Matthew T. Kromer matt@zope.com
Thu, 20 Dec 2001 08:50:57 -0500


Well the ExtensionClass.h fix I think is completely harmless (assuming 
you recompile every ExtensionClass based C module) but I'm not convinced 
it's necessary, either.  It's more of an insurance policy -- if every C 
module plays by the rules and checks the type flags field of the type 
object first, then the ExtensionClass.h file fix isn't necessary.  Of 
course, anytime someone says well "if every..." I get suspicious.

Those people who have reported that it helps their system stability are 
probably benefiting because stack stomps (from the two known 
stack-clobbering bugs in Python 2.1) end up leaving pointers to 
extensionclass objects in places they don't belong (ie places which have 
already CHECKED the flags, and thus don't check them again).  Those C 
modules then use a NULL pointer check, which properly halts chasing of 
chains with the ExtensionClass.h patch, where it would have led to 
another wild pointer without.  Its the same reason disabling GC also 
helps some people; it reduces the activities that follow bad pointers.

Actually, I was kind of hoping Martijn Faassen would pipe up and say "I 
applied the restricted python patches you've already put up on the 
Zope-2_4-branch, and my problems with ParsedXML went away!" since he's 
one of the folks that did NOT benefit from applying the ExtensionClass.h 
patch.

On Wednesday, December 19, 2001, at 03:44 PM, Chris McDonough wrote:

> I'm not sure the ExtensionClass fix is baked yet, and there's not yet an
> overwhelming consensus that it helps stability, not to mention that I'm 
> not
> sure how to install it, so no. ;-)
>
> I think you can use the trunk, no branch required.  Hopefully the fixes 
> will
> be merged soon.
>
> ----- Original Message -----
> From: "Leonardo Rochael Almeida" <leo@hiper.com.br>
> To: "Zope Developers list" <zope-dev@zope.org>
> Sent: Wednesday, December 19, 2001 3:22 PM
> Subject: Re: [Zope-dev] disabling gc does not necessarily hide
> memorycorruption
>
>
>> Oh, and which branch should I get the tarball from?
>>
>> On Wed, 2001-12-19 at 18:20, Leonardo Rochael Almeida wrote:
>>>
>>>
>>> On Wed, 2001-12-19 at 18:02, Martijn Pieters wrote:
>>>> [...]
>>>> You can download files from CVS as a tarball. Just go to
>>>> http://cvs.zope.org/Zope/lib/python/RestrictedPython and use the link
> at the
>>>> bottom.
>>>
>>> Should I apply the ExtensionClass.h fix from CVS mentioned here in the
>>> list too?
>>>
>>> --
>>> Ideas don't stay in some minds very long because they don't like
>>> solitary confinement.
>>>
>> --
>> Ideas don't stay in some minds very long because they don't like
>> solitary confinement.
>>
>>
>> _______________________________________________
>> Zope-Dev maillist  -  Zope-Dev@zope.org
>> http://lists.zope.org/mailman/listinfo/zope-dev
>> **  No cross posts or HTML encoding!  **
>> (Related lists -
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope )
>>
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )