1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 19:50:23 +02:00

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.
This commit is contained in:
pcpa 2013-08-29 12:59:40 -03:00
parent bc0786e933
commit ba182b139a

View file

@ -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);