[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

Charles-Francois Natali report at bugs.python.org
Tue Apr 20 15:47:00 CEST 2010


Charles-Francois Natali <neologix at free.fr> added the comment:

The problem is highlighted with recursive imports:
a module which imports another module, which imports another module, etc. PyMarshal_ReadLastObjectFromFile is not the only function to use stack-allocated buffers, there are also load_source_module, load_package, import_module_level, which use char buf[MAXPATHLEN+1]: with a MAXPATHLEN to 1024, you lose 2 or 3K every time you do a recursive import.
And, as has been said, it might very well happen that new threads get a reduced stack size.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7332>
_______________________________________


More information about the Python-bugs-list mailing list