Terry J. Reedy <tjre...@udel.edu> added the comment:

I am pretty sure that if one deletes the prefix 'exec(' and suffic ')' and just 
executes argument expression that has something on the order of 10000 chr(nn) 
calls added together, one would get the same result.  In other words, I believe 
that the outer exec and the origin of the expression and the individual nn 
values are irrelevant.

It is known that the Python compiler handles at least some recursive 
expressions with recursion and therefore has limits on the complexity of 
expressions it can handle.  The stackoverflow crash, instead of an exception, 
*is* a bug.  It was fixed sometime in 3.x.  With 3.6.4:

C:\Users\Terry>python f:/dev/tem/poc.py
RecursionError: maximum recursion depth exceeded during compilation

Perhaps one of the compiler experts knows whether the fix cannot be backported 
(within reasonable effort) or just has not been.

nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov

Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to