Python 2.2.1 bug

jepler at unpythonic.net jepler at unpythonic.net
Sun Aug 25 21:44:55 EDT 2002


On Sun, Aug 25, 2002 at 06:17:03PM -0700, Pavel Pergamenshchik wrote:
> I found a way to break Python 2.2.1 (at least) both on Linux and Windows.
> Type
> eval("int" + ".__call__"*100000)\n
> at the prompt, then press ctrl-D or ctrl-Z to edit. This will result in a
> segfault on Linux and some weird "unknown software exception" thing on
> Windows.

I'm unable to reproduce this on my laptop (RedHat 7.1 / python 2.3a0 CVS):
(gdb) run
Starting program: /usr/local/bin/python 
Python 2.3a0 (#1, Jul 13 2002, 09:27:09) 
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> eval("int" + ".__call__"*100000)  
<method-wrapper object at 0x406f454c>
>>> ^D

Program exited normally.
(gdb) 

Or my desktop (RedHat 7.3 / python 2.2):
(gdb) run
Python 2.2 (#1, Apr 12 2002, 15:29:57) 
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> eval("int" + ".__call__" * 100000)
<method-wrapper object at 0x84650c4>
>>> 

Program exited normally.
(gdb) 

It's possible this bug was added between 2.2 and 2.2.1, or that there's
some other factor at work.  It's too bad I don't have a copy of 2.2.1
available.

Jeff




More information about the Python-list mailing list