Message103912
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. |
|
Date |
User |
Action |
Args |
2010-04-21 21:17:10 | vstinner | set | recipients:
+ vstinner, tim.peters, doko, pitrou, ezio.melotti, dmalcolm, liang, Thomas.Smith, neologix, keescook |
2010-04-21 21:17:10 | vstinner | set | messageid: <1271884630.6.0.707296629059.issue7332@psf.upfronthosting.co.za> |
2010-04-21 21:17:08 | vstinner | link | issue7332 messages |
2010-04-21 21:17:08 | vstinner | create | |
|