Message251461
I'm not sure that I understood the bug.
You are testing a function which enters an unlimited loop. You expect to get a RecursionError, but Python does crash.
Well, Python has no perfect protection again stack overflow. It's only best effect. You should change sys.setrecursionlimit() to a lower limit to try to limit the risk of a crash.
It's hard to predict how the stack will be used.
FYI the error message comes from Python/ceval.c:
if (tstate->overflowed) {
if (tstate->recursion_depth > recursion_limit + 50) {
/* Overflowing while handling an overflow. Give up. */
Py_FatalError("Cannot recover from stack overflow.");
}
return 0;
}
I suggest you to use sys.setrecursionlimit() in your test, or remove the test.
Maybe there is a real bug, but if it's the case, it will probably be hard to investigate it. You need to dig into gdb. |
|
Date |
User |
Action |
Args |
2015-09-23 21:40:01 | vstinner | set | recipients:
+ vstinner, emptysquare, behackett |
2015-09-23 21:40:01 | vstinner | set | messageid: <1443044401.04.0.71942669291.issue25222@psf.upfronthosting.co.za> |
2015-09-23 21:40:01 | vstinner | link | issue25222 messages |
2015-09-23 21:40:00 | vstinner | create | |
|