This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [patch] Fix oddity in personality routine
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, java at gcc dot gnu dot org
- Date: Fri, 13 Nov 2009 13:36:23 -0500
- Subject: Re: [patch] Fix oddity in personality routine
- References: <200911131850.03946.ebotcazou@adacore.com> <4AFD9DEF.7050305@redhat.com>
On Fri, Nov 13, 2009 at 05:57:03PM +0000, Andrew Haley wrote:
> 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 <ebotcazou@adacore.com>
> >
> > * exception.cc (PERSONALITY_FUNCTION): Fix oversight.
> >
>
>
> Yes, I think that's right.
>
> Andrew.
Andrew,
Do you think this could be the origin of the problems we have had
on intel darwin with gcj compiling java files?
Jack