summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-10-29 01:58:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-29 10:57:46 +0900
commitc1228f833c5925c01b2aed1544d9c7fc2421e79b (patch)
treed9adab9bb139a36fa88407938c68a3d1bb6ec482 /yjit_codegen.c
parent92ad520ad0372ad64ece6af6bbb6823e629c5d5b (diff)
vm_core.h: Avoid unaligned access to ic_serial on 32-bit machine
This caused Bus error on 32 bit Solaris
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5049
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r--yjit_codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index b0d799c013..d438970cf2 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -4364,7 +4364,7 @@ gen_opt_getinlinecache(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
// See vm_ic_hit_p(). The same conditions are checked in yjit_constant_ic_update().
struct iseq_inline_constant_cache_entry *ice = ic->entry;
if (!ice || // cache not filled
- ice->ic_serial != ruby_vm_global_constant_state /* cache out of date */) {
+ GET_IC_SERIAL(ice) != ruby_vm_global_constant_state /* cache out of date */) {
// In these cases, leave a block that unconditionally side exits
// for the interpreter to invalidate.
return YJIT_CANT_COMPILE;