Python Coredump
Hye-Shik Chang
hyeshik at gmail.com
Sat Oct 9 06:58:09 PDT 2004
On Sat, 09 Oct 2004 03:30:21 +0200, Valentino Volonghi aka Dialtone
<dialtone#$#nospammingme#$$%@gmail.com> wrote:
> Try executing this simple program in py:
>
> class NewList(list):
> def __getslice__(self, start, stop):
> if type(start) == str and type(stop) == str:
> return self[self.index(start):self.index(stop)]
> else:
> return self[start:stop]
> a = NewList([1,2,3,4,5,6])
> print a[1:4]
>
> In my FreeBSD 5.3-beta7 box it coredumps with bus error.
>
CPython is somewhat weak for recursive calls. Almost all cases can
be blocked by default recursion limit (1000), but some of new-style
methods and recursive calls for internal methods that consumes more
than regular calls require more lower limit. You can prevent the
bus error with sys.setrecursionlimit(500).
Hye-Shik
More information about the freebsd-python
mailing list