[Zope-dev] Re: Zope 3 on Python 2.5, Zope 3 releases
Shane Hathaway
shane at hathawaymix.org
Mon Jul 14 10:32:48 EDT 2008
Lorenzo Gil Sánchez wrote:
>>> I tried to go further and discover the source of this problem adding a
>>> breakpoint just before the exception is raised. This is what I got:
>>>
>>> (Pdb) self.context
>>> <zope.app.folder.folder.Folder object at 0x7faf532e4320>
>>> (Pdb) self.context.keys()
>>> <OOBTreeItems object at 0x7faf52682030>
>>> (Pdb) tuple(self.context.keys())
>>> *** MemoryError:
I just committed a fix to the trunk of zope.proxy, zope.security, and
zope.app.container. They all needed the Py_ssize_t conversion as
described by PEP 353. Without the conversion, Python extensions running
under 64 bit Python 2.5 tend to break with MemoryErrors. The
MemoryErrors are caused by C code filling only 4 bytes of an 8 byte
length value; the remaining 4 bytes end up with random junk, leading
various code to believe the extension wants to allocate far more memory
than it actually needs.
We might want to backport the fix, but I don't know which branches are
being maintained.
Shane
More information about the Zope-Dev
mailing list