[patch] Fix oddity in personality routine
Eric Botcazou
ebotcazou@adacore.com
Fri Nov 13 17:49:00 GMT 2009
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.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20091113/4205ef46/attachment.bin>
More information about the Java
mailing list