From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22748 invoked by alias); 13 Nov 2009 19:18:09 -0000 Received: (qmail 22705 invoked by uid 22791); 13 Nov 2009 19:18:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 13 Nov 2009 19:18:01 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id CDB10B005D; Fri, 13 Nov 2009 14:17:58 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id nADJHwNj022807; Fri, 13 Nov 2009 14:17:58 -0500 Date: Fri, 13 Nov 2009 19:18:00 -0000 From: Jack Howarth To: Eric Botcazou Cc: java@gcc.gnu.org Subject: Re: [patch] Fix oddity in personality routine Message-ID: <20091113191758.GA22781@bromo.med.uc.edu> References: <200911131850.03946.ebotcazou@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911131850.03946.ebotcazou@adacore.com> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00035.txt.bz2 On Fri, Nov 13, 2009 at 06:50:03PM +0100, Eric Botcazou wrote: > Hi, > > r128098 has introduced an oddity in the personality routine: > > int ip_before_insn = 0; > [...] > > // Parse the LSDA header. > p = parse_lsda_header (context, language_specific_data, &info); > #ifdef HAVE_GETIPINFO > ip = _Unwind_GetIPInfo (context, &ip_before_insn); > #else > ip = _Unwind_GetIP (context) - 1; > #endif > if (! ip_before_insn) > --ip; > > So, if !HAVE_GETIPINFO, the IP is decremented by 2! It used to be 1 and both > libstdc++-v3/libsupc++/eh_personality.cc and ada/raise-gcc.c have the expected > version: > > #ifdef _GLIBCXX_HAVE_GETIPINFO > ip = _Unwind_GetIPInfo (context, &ip_before_insn); > #else > ip = _Unwind_GetIP (context); > #endif > if (! ip_before_insn) > --ip; > > Hence the attached patch, that I don't plan to test though. OK anyway? > > > 2009-11-13 Eric Botcazou > > * exception.cc (PERSONALITY_FUNCTION): Fix oversight. > > > -- > Eric Botcazou > Index: exception.cc > =================================================================== > --- exception.cc (revision 154059) > +++ exception.cc (working copy) > @@ -328,7 +328,7 @@ PERSONALITY_FUNCTION (int version, > #ifdef HAVE_GETIPINFO > ip = _Unwind_GetIPInfo (context, &ip_before_insn); > #else > - ip = _Unwind_GetIP (context) - 1; > + ip = _Unwind_GetIP (context); > #endif > if (! ip_before_insn) > --ip; Shouldn't this fix also get backported to gcc-4_4-branch and gcc-4_3-branch as well? They both have r128098. Jack