This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jengeldk
Recipients
Date 2005-01-26.17:18:09
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
when running recursive function you get a coredump with
deep recursion. 
eg

from sys import *
n = 30000
setrecursionlimit(n+1)

def fact(n):
   if n==1:
      return 1
   return fact(n-1)*n

fact(n)

This is seen on linux i686 with both python2.3 and
python2.4, the recursion depth which triggers the core
dump is 26211 with python2.4 and 29123 with python2.3
with a machine having 2076860 kB of memory, on machines
with less memory smaller numbers are seen.

this is what gdb tells me:
jacob@pauling:/scratch/jacob$ gdb /usr/bin/python2.4 core
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "i386-linux"...(no debugging
symbols found)
Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(no debugging symbols found)
Core was generated by `python2.4 /home/user_4/jacob/rr
30000'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map:
Input/output error

Reading symbols from /lib/tls/libpthread.so.0...(no
debugging symbols found)...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libdl.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /lib/tls/libutil.so.1...(no
debugging symbols found)...done.
Loaded symbols for /lib/tls/libutil.so.1
Reading symbols from /lib/tls/libm.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2

#0  0x400c94bf in mallopt () from /lib/tls/libc.so.6
History
Date User Action Args
2007-08-23 14:29:08adminlinkissue1110055 messages
2007-08-23 14:29:08admincreate