From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27097 invoked by alias); 28 Feb 2010 10:53:02 -0000 Received: (qmail 27079 invoked by uid 22791); 28 Feb 2010 10:53:01 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 28 Feb 2010 10:52:55 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0DFAB2BAB7E; Sun, 28 Feb 2010 05:52:54 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IyAPL4bIHo9r; Sun, 28 Feb 2010 05:52:53 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 844202BAAA2; Sun, 28 Feb 2010 05:52:53 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EF4BEF5896; Sun, 28 Feb 2010 14:52:40 +0400 (RET) Date: Sun, 28 Feb 2010 10:53:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: [patch] infcall: Remove gdb_assert ($sp overflow) Message-ID: <20100228105240.GA2832@adacore.com> References: <20100219224805.GA9681@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00669.txt.bz2 > Jan> set $sp=0 > Jan> call something() > > I don't really have much problem with this patch, I guess, but do people > really do this sort of thing? Or is this a reduced case of some other > scenario that actually does happen? I used to do that (setting $sp) in an ancient testcase whose purpose was to break the callstack. It turned out that breaking the callstack was too platform specific, so I gave up on using this. I am guessing that some people might try setting $sp for various purposes (maybe debugging a problem with code that misaligns SP for instance), and a screwup might lead to this situation too... -- Joel