[issue5765] stack overflow evaluating eval("()" * 30000)

Andrea Griffini report at bugs.python.org
Mon Aug 20 09:00:37 CEST 2012


Andrea Griffini added the comment:

On Mon, Aug 20, 2012 at 12:27 AM, Antoine Pitrou <report at bugs.python.org> wrote:
> Indeed I don't like the introduction of COMPILER_STACK_FRAME_SCALE.
> Re-using the existing infrastructure would be much easier to maintain.
> The default recursion limit is 1000, which should cover any non-pathological code, IMHO.

I submitted a new version with the scale lowered to 3.

Using a lower value (e.g. 1) however makes "test_extended_args" fail
(the test tries to compile an expression with 2500+ terms).

If it's ok to make that test to throw instead then the whole scaling
could be removed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5765>
_______________________________________


More information about the Python-bugs-list mailing list