New submission from Gabriel Genellina <gagsl-...@yahoo.com.ar>:

Originally reported by Juanjo Conti at PyAr: 
http://blog.gmane.org/gmane.org.user-groups.python.argentina/
day=20090415

Evaluating this expression causes a stack overflow, and the Python 
interpreter exits abnormally:

eval("()" * 30000)

3.0.1, 2.6, 2.5 and current 2.x trunk all fail on Windows; the original 
reporter was likely using Linux. Some versions may require a larger 
constant instead of 30000.

2.4 isn't affected; it raises a "TypeError: 'tuple' object is not 
callable" as expected, even for extremely long sequences.

Alberto Bertogli said: inside eval, symtable_visit_expr() (Python/
symtable.c) is called recursively (thru the VISIT/VISIT_SEQ macros), 
eventually taking all stack space.

----------
components: Interpreter Core
messages: 86006
nosy: gagenellina
severity: normal
status: open
title: stack overflow evaluating eval("()" * 30000)
type: crash
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0

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

Reply via email to