This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

x86_64-signal.h


There's an aliasing bug in libgcj.  Interestingly, nothing (offsetof,
unions) I did could fix the problem, and in the end I had to use
volatile.

Andrew.


2003-06-03  Andrew Haley  <aph@redhat.com>

        * include/x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on
        stack volatile to prevent optimization from removing it.

Index: x86_64-signal.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/x86_64-signal.h,v
retrieving revision 1.2
diff -u -w -r1.2 x86_64-signal.h
--- x86_64-signal.h     22 Jan 2003 17:47:04 -0000      1.2
+++ x86_64-signal.h     3 Jun 2003 16:10:43 -0000
@@ -21,7 +21,7 @@
 #define HANDLE_SEGV 1
 
 #define SIGNAL_HANDLER(_name)  \
-static void _Jv_##_name (int, siginfo_t *_sip, void *_p)
+static void _Jv_##_name (int, siginfo_t *, void *_p)
 
 extern "C" 
 {
@@ -41,7 +41,7 @@
      instruction:  the x86_64 exception handler expects                        \
      the PC to point to the instruction after a call. */               \
   struct ucontext *_uc = (struct ucontext *)_p;                                \
-  struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext;    \
+  volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \
   _sc->rip += 2;                                                       \
 }                                                                      \
 while (0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]