This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[tree-ssa] Fix aliasing problem in libjava for amd64


Andrew Haley found and fixed an aliasing problem in the libjava signal
handler for amd64.  I think Andrew committed this same fix to mainline.


Diego.

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.
 
--- libjava/include/x86_64-signal.h.orig        2003-02-03 12:09:29.000000000 -0500
+++ libjava/include/x86_64-signal.h     2003-06-04 11:27:28.000000000 -0400
@@ -41,7 +41,7 @@ do                                                           \      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]