Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:error': 0.03; 'win32': 0.03; 'broken': 0.04; 'interpreter': 0.05; 'subject:Python': 0.06; 'error:': 0.07; 'interpreter.': 0.07; 'responding': 0.07; 'try:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'bug': 0.12; 'thread': 0.14; 'loop.': 0.16; 'overflow.': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'bit': 0.19; 'stack': 0.19; 'meant': 0.20; '>>>': 0.22; 'example': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'simpler': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'shown': 0.26; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; 'gives': 0.31; '"",': 0.31; '3.x': 0.31; 'file': 0.32; 'totally': 0.33; 'received:209.85': 0.35; 'except': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'similar': 0.36; 'received:209': 0.37; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'oscar': 0.84; '2013,': 0.91; 'recover': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=5kj7nIKhZhwxiKFLcZs6TgP8g3KHTd3Iun1VC4YygnY=; b=NbYpwGkVIXyj+45YH+5IFCa8Sz9zf1nwK/MHDpZePi9K85FxKN10wr8QP3wSDZFs/l O0vJGGfbH5qmnW1v+tMS/B9PsKsIVSzi5ElMxz1HUW2QT7QJsiqTaS84GS+ShycPRDOx uOtlfriE+0oK96PsHBxwrCkXZKNKcxhllqqhcX1bPC8ick9VLIEtYvmO+coWCrQ85rD+ Z/QdKMNavrpOoplWjZIcMieGb4JzQjZ1cQDpPtjCpvpgvmplq5f7bSxEDKisqC62e6YN P6ZmSqBVxtYefq2ZJggie3dQVvI+IpJfL76ilWRm3iWTBPeP4Rl73eDpI5+KquHCpxmy vAlQ== X-Received: by 10.220.76.137 with SMTP id c9mr1369593vck.48.1369831534064; Wed, 29 May 2013 05:45:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Oscar Benjamin Date: Wed, 29 May 2013 13:45:14 +0100 Subject: Re: Fatal Python error To: Joshua Landau Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369831542 news.xs4all.nl 16012 [2001:888:2000:d::a6]:50118 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46373 On 29 May 2013 12:48, Joshua Landau wrote: > Hello all, again. Instead of revising like I'm meant to be, I've been > delving into a bit of Python and I've come up with this code: Here's a simpler example that gives similar results: $ py -3.3 Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def broken(): ... try: ... broken() ... except RuntimeError: ... broken() ... >>> broken() Fatal Python error: Cannot recover from stack overflow. Current thread 0x0000058c: File "", line 3 in broken File "", line 3 in broken ... Under Python 2.7.5 it just goes into an infinite loop. Under Python 3.2.5 and 3.3.2 it crashes the interpreter as shown above. What the broken() function is doing is totally stupid: responding to a recursion error with more recursion. However this may indicate or be considered a bug in the 3.x interpreter. Oscar