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.


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to