[issue7332] python script segment fault at PyMarshal_ReadLastObjectFromFile in import_submodule

STINNER Victor report at bugs.python.org
Tue Apr 20 15:11:11 CEST 2010

STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Allocate more than 16 bytes on the stack is never a good idea. Eg. Linux does never resize the size automatically, and the only way to catch "allocatation failed" error is to handle the SIGSEGV signal...

Remove buf allocated on the stack by a buffer allocated on the heap is definitly a good ide :-)

nosy: +haypo

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list