[issue3117] segfault with (None,) as argument in a def/lambda

Enrico Santoemma report at bugs.python.org
Sun Jun 15 21:39:22 CEST 2008


New submission from Enrico Santoemma <enrico.santoemma at gmail.com>:

This wrong expression
>>> lambda (None,):None
and this statement
>>> def f( (None,) ): pass
crash the interpreter.

Python 2.5.1 (r251:54863, Mar  7 2008, 03:41:45)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> lambda (None,):None
Segmentation fault (core dumped)

Not in 2.4:
Python 2.4.4 (#2, Apr 12 2007, 21:03:11)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> lambda (None,):None
  File "<stdin>", line 1
SyntaxError: assignment to None
>>>

----------
messages: 68245
nosy: santoemma
severity: normal
status: open
title: segfault with (None,) as argument in a def/lambda
type: crash
versions: Python 2.5

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


More information about the Python-bugs-list mailing list