STINNER Victor <victor.stin...@haypocalc.com> added the comment: Here is a short shell script to reproduce the stack overflow: - create 100 Python modules: stack1 imports stack2, stack2 imports stack3, ...., and stack100 prints "hello" - each module calls os.system("cat /proc/%s/maps|grep stack" % os.getpid()) to display the stack map - set the max stack size to 128 KB
The stack starts with 86016 bytes and it crashs at import depth 6. I don't know if my script is realistic (128 KB stack), but at least it shows a crash. I think that most programs crash with small stack. ---------- Added file: http://bugs.python.org/file17030/import_stackoverflow.sh _______________________________________ 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