This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jack__d
Recipients jack__d, mjo, terry.reedy
Date 2021-08-13.18:51:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628880686.7.0.0851957856154.issue42649@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-08-13 18:51:26jack__dsetrecipients: + jack__d, terry.reedy, mjo
2021-08-13 18:51:26jack__dsetmessageid: <1628880686.7.0.0851957856154.issue42649@roundup.psfhosted.org>
2021-08-13 18:51:26jack__dlinkissue42649 messages
2021-08-13 18:51:26jack__dcreate