This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Thomas.Smith, dmalcolm, doko, ezio.melotti, keescook, liang, neologix, pitrou, tim.peters, vstinner
Date 2010-04-21.23:59:32
SpamBayes Score 3.099082e-11
Marked as misclassified No
Message-id <1271894378.18.0.458016423725.issue7332@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-04-21 23:59:38vstinnersetrecipients: + vstinner, tim.peters, doko, pitrou, ezio.melotti, dmalcolm, liang, Thomas.Smith, neologix, keescook
2010-04-21 23:59:38vstinnersetmessageid: <1271894378.18.0.458016423725.issue7332@psf.upfronthosting.co.za>
2010-04-21 23:59:37vstinnerlinkissue7332 messages
2010-04-21 23:59:36vstinnercreate