New submission from Tom Dignan <t...@adeptdev.com>: On my system, the magic number to make this segfault seems to be 26200:
tom@tralfamadore ~/Downloads $ python recur1.py 26199 160164968 tom@tralfamadore ~/Downloads $ python recur1.py 26200 Segmentation fault Here's the source: #!/usr/bin/python import sys if len(sys.argv) < 2: print "usage %r <number>" % sys.argv[0] sys.exit(1) number = int(sys.argv[1]) sys.setrecursionlimit(number + 2) f = (lambda n: (f(n - 1) if n > 0 else 0) + (n if n % 3 == 0 or n % 5 == 0 else 0)) print f(number) sys.exit(0) ---------- components: None messages: 148226 nosy: tdignan priority: normal severity: normal status: open title: Python 2.7.1 SegmentationFaults when given high recursion limit type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13468> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com