Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22258 > unrolled thread

Re: python segfault

Started byChristian Heimes <lists@cheimes.de>
First post2012-03-28 00:45 +0200
Last post2012-03-28 00:45 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: python segfault Christian Heimes <lists@cheimes.de> - 2012-03-28 00:45 +0200

#22258 — Re: python segfault

FromChristian Heimes <lists@cheimes.de>
Date2012-03-28 00:45 +0200
SubjectRe: python segfault
Message-ID<mailman.1055.1332888367.3037.python-list@python.org>
Am 28.03.2012 00:27, schrieb Michael Poeltl:
> hi,
> 
> can anybody tell why this 'little stupid *thing* of code' let's python-3.2.2, 2.6.X or python 2.7.2 segfault?

The code segfaults because you have increased the recursion limit. The
amount of recursions is limited by the stack size. A C program with a
usually stack size can have about 4000 recursions. Python takes at least
two stack levels for each recursion.

The documentation
http://docs.python.org/library/sys.html#sys.setrecursionlimit contains a
warning, too.

Christian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web