This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Fix aliasing problem in libjava for amd64
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 04 Jun 2003 15:09:55 -0400
- Subject: [tree-ssa] Fix aliasing problem in libjava for amd64
- Organization: Red Hat Canada
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)