Terry Reedy <tjre...@udel.edu>: > On 1/13/2015 1:13 AM, Chris Angelico wrote: >>>>> def f(): sys.setrecursionlimit(sys.getrecursionlimit()+1) or f() >> ... >>>>> f() >> Segmentation fault >> >> But otherwise, yes. You shouldn't be able to segfault Python with >> Python code. > > I would have expected an out-of-memory error. If there is not already > a crash issue on the tracker for this, you could add one.
Linux grants memory it doesn't have. The truth comes out as a segmentation fault. Call it modern banking. The code above, though, shouldn't consume memory since it is a simple tail-recursive loop. Marko -- https://mail.python.org/mailman/listinfo/python-list