STINNER Victor <victor.stin...@haypocalc.com> added the comment:

I tried to limit memory allocated on the stack while importing modules. Number 
of bytes allocated on the stack:
 - without my patch: 13792 bytes per import
 - with my patch: 1632 bytes per import
(using import_stackoverflow.sh, import a short Python module)

I guess that it will not fix the issue, only report the crash to another 
function.

I'm attaching the patch to this issue only to keep a copy of it. The patch is 
complex and there is no good reason to commit it since the problem doesn't come 
from Python.

The patch allocates filename buffers on the heap in import.c, zipimport.c and 
marshal.c.

----------
Added file: http://bugs.python.org/file17037/import_nostack_alloc.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7332>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to