From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1786 invoked by alias); 23 Feb 2002 21:57:25 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 1642 invoked from network); 23 Feb 2002 21:57:22 -0000 Received: from unknown (HELO dibbler.ne.mediaone.net) (24.218.57.139) by sources.redhat.com with SMTP; 23 Feb 2002 21:57:22 -0000 Received: (from rodrigc@localhost) by dibbler.ne.mediaone.net (8.11.0/8.11.0) id g1NLwkL04717; Sat, 23 Feb 2002 16:58:46 -0500 Date: Sat, 23 Feb 2002 14:23:00 -0000 From: Craig Rodrigues To: gcc@gcc.gnu.org Cc: libstdc++@gcc.gnu.org Subject: Re: Throwing exception in constructor causes segfault Message-ID: <20020223165846.A4678@attbi.com> References: <20020223150023.A3639@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from schwab@suse.de on Sat, Feb 23, 2002 at 09:56:48PM +0100 X-SW-Source: 2002-02/txt/msg01387.txt.bz2 On Sat, Feb 23, 2002 at 09:56:48PM +0100, Andreas Schwab wrote: > The problem is that operator delete[]() is receiving a different address > than returned by operator new[](). It looks like it is not adjusted for > the cookie. I don't understand the gcc exception handling code, so can you explain this in more detail? What is a cookie in this case? Also, in my testcase, if you comment out the delete[] p; line, the testcase will still segfault. Looks like delete[] is called in the stack unwind code for some reason, if you don't call it yourself. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com