guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 239/437: Avoid possible problem if built with gcc 4.8 or


From: Andy Wingo
Subject: [Guile-commits] 239/437: Avoid possible problem if built with gcc 4.8 or newer.
Date: Mon, 2 Jul 2018 05:14:28 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit ba182b139aa53fa70dd44fea9f74f777f3c683f7
Author: pcpa <address@hidden>
Date:   Thu Aug 29 12:59:40 2013 -0300

    Avoid possible problem if built with gcc 4.8 or newer.
    
    The problem happens due to undefined behavior in post increment when
    accessing data through an union and the data being modified in the
    expression.
---
 lib/jit_ia64.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/jit_ia64.c b/lib/jit_ia64.c
index 418d4e4..b123bdf 100644
--- a/lib/jit_ia64.c
+++ b/lib/jit_ia64.c
@@ -763,7 +763,8 @@ _emit_code(jit_state_t *_jit)
 
     undo.prolog_offset = 0;
     /* code may start with a jump so add an initial function descriptor */
-    il(_jit->pc.w + 16);       /* addr */
+    word = _jit->pc.w + 16;
+    il(word);                  /* addr */
     il(0);                     /* gp */
 #define case_rr(name, type)                                            \
            case jit_code_##name##r##type:                              \
@@ -1264,7 +1265,8 @@ _emit_code(jit_state_t *_jit)
                    }
                    _jitc->prolog.ptr[_jitc->prolog.offset++] = _jit->pc.w;
                    /* function descriptor */
-                   il(_jit->pc.w + 16);        /* addr */
+                   word = _jit->pc.w + 16;
+                   il(word);                   /* addr */
                    il(0);                      /* gp */
                }
                prolog(node);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]