ait <roman.fied...@ait.ac.at> added the comment:

Also affected, a code generator produced deeply nested code with the structure 
depicted below and then crashed:

#!/usr/bin/python2 -BEsStt
A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A([A(None)])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])


What would be the maximal nesting depth a generator can always expect to be 
compiled successfully on Python 2.7 and 3.5 on? Are there any other similar 
restrictions that need to be considered when writing a code generator? Or is 
generating code that way not the preferred solution anyway - the code generator 
should generate e.g. compiled binary Python code immediately?

Note: in the end the exact same logic code will run as Python process, it is 
only about how it is loaded into the Python interpreter. Different from the 
code example in the bug create message, code with similar properties to the one 
from this example is generated to evaluate a mathematical model, thus not that 
random and meaningless compared to the putative fuzzer output from the first 
note.

----------
nosy: +ait

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

Reply via email to