[issue7985] access to infinitely recursive list

LukMak report at bugs.python.org
Mon Feb 22 16:02:51 CET 2010


New submission from LukMak <lmakowsk at volt.iem.pw.edu.pl>:

Execution:
>>> l=[]
>>> l.append(l)
>>> l
[[...]]
>>> l[0]
[[...]]
>>> l[0][0][0]
[[...]]
>>> eval('l'+'[0]'*10)
[[...]]
>>> eval('l'+'[0]'*666)
[[...]]
>>> eval('l'+'[0]'*999999)
Segmentation fault

Environment:
2.6.24-27-generic #1 SMP, Ubuntu 8.04.4 LTS, Both Python 2.5.2 from distro repo and Python 3.1.1 compiled by me. But crash seems to be platform and version independent.

Comment:
Should throw RuntimeError: maximum recursion depth exceeded instead of SIGSEGV?

----------
components: Interpreter Core
messages: 99742
nosy: LukMak
severity: normal
status: open
title: access to infinitely recursive list
type: crash
versions: Python 2.5, Python 3.1

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


More information about the Python-bugs-list mailing list