public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Fix oddity in personality routine
@ 2009-11-13 17:49 Eric Botcazou
  2009-11-13 17:57 ` Andrew Haley
  2009-11-13 19:18 ` Jack Howarth
  0 siblings, 2 replies; 61+ messages in thread
From: Eric Botcazou @ 2009-11-13 17:49 UTC (permalink / raw)
  To: java

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

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

[-- Attachment #2: p.diff --]
[-- Type: text/x-diff, Size: 408 bytes --]

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;

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2009-12-05  6:54 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-13 17:49 [patch] Fix oddity in personality routine Eric Botcazou
2009-11-13 17:57 ` Andrew Haley
2009-11-13 18:36   ` Jack Howarth
2009-11-13 18:39     ` Andrew Haley
2009-11-13 19:18 ` Jack Howarth
2009-11-15 23:02   ` Bryce McKinlay
2009-11-16 14:22     ` Jack Howarth
2009-11-16 15:12     ` Jack Howarth
2009-11-16 15:17       ` Andrew Haley
2009-11-16 15:34         ` Jack Howarth
2009-11-16 16:59           ` Andrew Haley
2009-11-16 18:07             ` Jack Howarth
2009-11-16 19:10               ` Andrew Haley
2009-11-16 19:48                 ` Jack Howarth
2009-11-17  0:48                 ` Jack Howarth
2009-11-17 10:59                   ` Andrew Haley
2009-11-17 14:05                     ` Jack Howarth
2009-11-17 14:56                       ` Andrew Haley
2009-11-17 16:18                         ` Jack Howarth
2009-11-17 16:22                           ` Andrew Haley
2009-11-17 17:07                         ` Jack Howarth
2009-11-17 17:14                           ` Andrew Haley
2009-11-17 17:38                             ` Jack Howarth
2009-11-27 10:37                               ` borlum
2009-11-27 10:40                                 ` Andrew Haley
2009-11-27 10:52                                   ` borlum
2009-11-27 14:20                                     ` Bryce McKinlay
2009-11-27 16:29                                       ` Jack Howarth
2009-11-27 21:51                                   ` Jack Howarth
2009-11-28 10:43                                     ` Andrew Haley
2009-11-29 17:48                                       ` Jack Howarth
2009-11-29 18:01                                         ` Andrew Haley
2009-11-29 18:48                                           ` Jack Howarth
2009-11-30 10:09                                             ` Andrew Haley
2009-11-30 16:01                                               ` Jack Howarth
2009-11-30 16:07                                                 ` Andrew Haley
2009-12-01  5:02                                                   ` Jack Howarth
2009-12-01  9:30                                                     ` Andrew Haley
2009-12-01 17:04                                                       ` Jack Howarth
2009-12-01 17:24                                                         ` Andrew Haley
2009-12-01 23:29                                                           ` Jack Howarth
2009-12-02  9:34                                                             ` Andrew Haley
2009-12-03  1:08                                                               ` Jack Howarth
2009-12-03 10:26                                                                 ` Andrew Haley
2009-12-03 14:03                                                                   ` Jack Howarth
2009-12-03 14:10                                                                     ` Andrew Haley
2009-12-03 19:18                                                                     ` Boehm, Hans
2009-12-03 21:25                                                                       ` Andrew Haley
2009-12-04  3:01                                                                         ` Jack Howarth
2009-12-04  9:45                                                                           ` Andrew Haley
2009-12-04  4:12                                                                         ` Jack Howarth
2009-12-04  9:44                                                                           ` Andrew Haley
2009-12-04 14:51                                                                             ` Jack Howarth
2009-12-04 14:59                                                                               ` Andrew Haley
2009-12-04 15:23                                                                                 ` Jack Howarth
2009-12-04 15:48                                                                                   ` Andrew Haley
2009-12-04 15:57                                                                                     ` Bryce McKinlay
2009-12-05  4:37                                                                                       ` Jack Howarth
2009-12-05  6:54                                                                                       ` Jack Howarth
2009-12-04 15:59                                                                                     ` Jack Howarth
2009-12-04 16:06                                                                                       ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).