Message399551
I spent some time experimenting with making the expression bigger and the recursion limit lower in python2. It seems like in python2, the depth that the compiler will recurse is unrelated to sys.recursionlimit.
Then, I lowered resource limits on stack and heap by ~1000x and increased the size of the expression by 10,000x, which caused a segmentation fault. Not only that, but the interpreter won't even respond to KeyboardInterrupt while it is doing the compiling. I believe that the recursion depth of the 2.x compiler is simply unbound, which seems like a bug to me.
As I tinkered with these things, I build out a reproduction script, which I've attached.
I think that documenting this change is more pragmatic than thinking about "fixing" it (not sure it can truly be fixed, as that would mean re-incorporating a bug). I don't know where such a note would belong, though. This document is the closed I can find, but it's too high-level for a detail like this to belong::
https://docs.python.org/3/howto/pyporting.html |
|
Date |
User |
Action |
Args |
2021-08-13 18:51:26 | jack__d | set | recipients:
+ jack__d, terry.reedy, mjo |
2021-08-13 18:51:26 | jack__d | set | messageid: <1628880686.7.0.0851957856154.issue42649@roundup.psfhosted.org> |
2021-08-13 18:51:26 | jack__d | link | issue42649 messages |
2021-08-13 18:51:26 | jack__d | create | |
|