Jack DeVries <jdevries3...@gmail.com> added the comment:

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

----------
nosy: +jack__d
Added file: https://bugs.python.org/file50215/repro.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42649>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to