Why are some infinite recursion stack overflows hard to deal with?

Alex cut_me_out at hotmail.com
Wed Jul 12 13:43:32 EDT 2000


Hi, Thomas.

> Hmm... What version of Python, and compiled how ? (Standard distribution
> python, or self-compiled ?) I can't reproduce this on vanilla Python 1.5.2,
> on BSDI, in any case. I'll try on Linux later.

I get the segfault with vanilla Python 1.5.2 on Redhat 6.2, and also
with bleeding edge (downloaded this morning) CVS Python:

[alex_c at puffin mouse]$ setenv PYTHONPATH
[alex_c at puffin mouse]$ setenv PYTHONSTARTUP
[alex_c at puffin mouse]$ /usr/bin/python 
Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66
19990314/Linux (egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> class T:
    def __str__(self):
        print self

... ... ... >>> 
>>> print T()
 [Huge output of whitespace skipped] Segmentation fault
[alex_c at puffin mouse]$ 
[alex_c at puffin mouse]$ 
[alex_c at puffin mouse]$ python
Python 2.0b1 (#99, Jul 12 2000, 07:16:00)  [GCC egcs-2.91.66
19990314/Linux (egcs-1.1.2 release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
>>> class T:
    def __str__(self):
        print self
... ... ... 
>>> print T()
 [Huge output of whitespace skipped] Segmentation fault
[alex_c at puffin mouse]$ 

Alex.



More information about the Python-list mailing list