Project

General

Profile

Actions

Bug #22510

closed

YJIT on arm64 crashes when the code region is larger than 128MiB

Bug #22510: YJIT on arm64 crashes when the code region is larger than 128MiB

Added by hsbt (Hiroshi SHIBATA) about 16 hours ago. Updated about 8 hours ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.9 (2026-11-05 revision 1636a3cb0c) +PRISM [aarch64-linux]
[ruby-core:127340]

Description

On arm64, YJIT jumps to a small address such as 0x2064 and crashes once the code region exceeds 128MiB. With --yjit-mem-size=512, 30k_variables from ruby-bench crashes this way on the current ruby_3_4 and ruby_4_0 built for aarch64-linux. The default size is not affected.

Since a1c61f0ae5 made CodePtr an offset into the code region, the fallback in emit_jmp_ptr for targets out of the range of b loads that offset instead of the address before br.

This is fixed on master by 7f451f6c00 (https://github.com/ruby/ruby/pull/19718), which cherry-picks cleanly to ruby_3_4 and ruby_4_0.

Updated by byroot (Jean Boussier) about 8 hours ago Actions #1

  • Status changed from Open to Closed
Actions

Also available in: PDF Atom