mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
vm_core.h: Avoid unaligned access to ic_serial on 32-bit machine
This caused Bus error on 32 bit Solaris
This commit is contained in:
parent
92ad520ad0
commit
c1228f833c
Notes:
git
2021-10-29 10:58:05 +09:00
4 changed files with 42 additions and 9 deletions
|
@ -13,9 +13,9 @@
|
|||
|
||||
% # compiler: Capture IC values, locking getinlinecache
|
||||
struct iseq_inline_constant_cache_entry *ice = ic->entry;
|
||||
if (ice != NULL && ice->ic_serial && !status->compile_info->disable_const_cache) {
|
||||
if (ice != NULL && GET_IC_SERIAL(ice) && !status->compile_info->disable_const_cache) {
|
||||
% # JIT: Inline everything in IC, and cancel the slow path
|
||||
fprintf(f, " if (vm_inlined_ic_hit_p(0x%"PRIxVALUE", 0x%"PRIxVALUE", (const rb_cref_t *)0x%"PRIxVALUE", %"PRI_SERIALT_PREFIX"u, reg_cfp->ep)) {", ice->flags, ice->value, (VALUE)ice->ic_cref, ice->ic_serial);
|
||||
fprintf(f, " if (vm_inlined_ic_hit_p(0x%"PRIxVALUE", 0x%"PRIxVALUE", (const rb_cref_t *)0x%"PRIxVALUE", %"PRI_SERIALT_PREFIX"u, reg_cfp->ep)) {", ice->flags, ice->value, (VALUE)ice->ic_cref, GET_IC_SERIAL(ice));
|
||||
fprintf(f, " stack[%d] = 0x%"PRIxVALUE";\n", b->stack_size, ice->value);
|
||||
fprintf(f, " goto label_%d;\n", pos + insn_len(insn) + (int)dst);
|
||||
fprintf(f, " }");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue