From 396db44cb89c5f008c7bca4b42a632b55005b318 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 02:08:15 +0000 Subject: [PATCH 1/4] Bump taiki-e/install-action Bumps the github-actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `taiki-e/install-action` from 2.83.0 to 2.83.2 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/c7eb1735f09259a5035e8e5d44b1406b1cddc0fb...43aecc8d72668fbcfe75c31400bc4f890f1c5853) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.83.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/zjit-macos.yml | 2 +- .github/workflows/zjit-ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index d441d22842e1c4..5517985c1c153c 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -98,7 +98,7 @@ jobs: rustup install ${{ matrix.rust_version }} --profile minimal rustup default ${{ matrix.rust_version }} - - uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0 + - uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 412167da4ed1ba..80c7a0cb7986bf 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -141,7 +141,7 @@ jobs: ruby-version: '3.1' bundler: none - - uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0 + - uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} From 67ee051dbca4cb1b027b7f235e3b21c9c48f5dfa Mon Sep 17 00:00:00 2001 From: Kevin Menard Date: Mon, 13 Jul 2026 23:25:14 -0400 Subject: [PATCH 2/4] ZJIT: Avoid cloning instructions while scanning for inline candidates (#17858) Searching for inline candidates will scan every instruction in eligible methods.`Function::find` always clones the resolved instruction, so we end up cloning every instruction -- potentially multiple times -- while looking for `SendDirect`. Since most instructions won't match, we immediately discard the just cloned result. This PR switches to an allocation-free check. --- zjit/src/hir.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index e16e7df836d66b..7225fcdc3800bb 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -2980,6 +2980,13 @@ impl Function { } } + /// Return whether the representative of `insn_id` is a `SendDirect` without + /// cloning the instruction or resolving its operands. + fn is_send_direct(&self, insn_id: InsnId) -> bool { + let insn_id = self.union_find.borrow().find_const(insn_id); + matches!(&self.insns[insn_id.0], Insn::SendDirect(..)) + } + fn new_block(&mut self, insn_idx: u32) -> BlockId { let id = BlockId(self.blocks.len()); let block = Block { @@ -5062,7 +5069,7 @@ impl Function { let mut search_start = 0; loop { let Some(offset) = self.blocks[block.0].insns[search_start..].iter() - .position(|&id| matches!(self.find(id), Insn::SendDirect(..))) + .position(|&id| self.is_send_direct(id)) else { break; }; @@ -5171,7 +5178,7 @@ impl Function { // pre-Send body, before the PushLightweightFrame and Jump we add // last). let tail = self.blocks[block.0].insns.split_off(send_pos); - debug_assert!(matches!(self.find(tail[0]), Insn::SendDirect(..))); + debug_assert!(self.is_send_direct(tail[0])); let omitted_opt_num = opt_num - passed_opt_num; let positional_kw_end = lead_num + opt_num + rest_slots + post_num + kw_num; From 9e46ef483d1b3ee5043d7b87bdff0de20ef2762f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 14 Jul 2026 10:09:03 +0900 Subject: [PATCH 3/4] Remove workarounds for GCC 3 and GCC 4.6-4.8 Ruby requires GCC 4.9 or later as noted in configure.ac. The x86 jmp hint in vm_exec.h was only enabled on GCC 3, and the warning suppressions in eval_intern.h and iseq.c only fired on GCC 4.6-4.8, so none of them have any effect on supported compilers. --- eval_intern.h | 5 ++--- iseq.c | 4 ++-- vm_exec.h | 9 --------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/eval_intern.h b/eval_intern.h index 954ba6a1842484..5e4249e0b87d6c 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -125,9 +125,8 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval #define EC_REPUSH_TAG() (void)(_ec->tag = &_tag) -#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || defined __clang__ -/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings. - * This macro also prevents Clang from dumping core in EC_EXEC_TAG(). +#if defined __clang__ +/* This macro prevents Clang from dumping core in EC_EXEC_TAG(). * (I confirmed Clang 4.0.1 and 5.0.0.) */ # define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var)) diff --git a/iseq.c b/iseq.c index 65ab43f85635db..720c8f976b5ad5 100644 --- a/iseq.c +++ b/iseq.c @@ -1359,8 +1359,8 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, V { rb_iseq_t *iseq = NULL; rb_compile_option_t option; -#if !defined(__GNUC__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 8) -# define INITIALIZED volatile /* suppress warnings by gcc 4.8 */ +#if !defined(__GNUC__) +# define INITIALIZED volatile /* suppress warnings */ #else # define INITIALIZED /* volatile */ #endif diff --git a/vm_exec.h b/vm_exec.h index ecf8df3c7da378..0db016ec164f07 100644 --- a/vm_exec.h +++ b/vm_exec.h @@ -93,16 +93,7 @@ error ! /* token threaded code */ /* dispatcher */ -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3 -#define DISPATCH_ARCH_DEPEND_WAY(addr) \ - __asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr)) - -#else -#define DISPATCH_ARCH_DEPEND_WAY(addr) \ - /* do nothing */ -#endif #define TC_DISPATCH(insn) \ - DISPATCH_ARCH_DEPEND_WAY(insns_address_table[GET_CURRENT_INSN()]); \ INSN_DISPATCH_SIG(insn); \ RB_GNUC_EXTENSION_BLOCK(goto *insns_address_table[GET_CURRENT_INSN()]); \ rb_bug("tc error"); From 7fc9f788c00488359493c2fd6465da872b3b5337 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 11 Jul 2026 06:51:32 +0900 Subject: [PATCH 4/4] win32/setup.mak: fix dead vs2022-fp-bug check The whole command runs as a single cmd.exe line due to the line continuations, so %ERRORLEVEL% and %bug% were expanded at parse time and `exit /b %bug%` never propagated the failure; the check always passed even when the bug reproduced. Fail the recipe line directly instead of the variable round-trip. --- win32/setup.mak | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/win32/setup.mak b/win32/setup.mak index 19ace3445c2568..db0445302275f7 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -160,11 +160,10 @@ main(void) return c != value_nan(); } << - @( \ - $(CC) -O2 $@.c && .\$@ || \ - (set bug=%ERRORLEVEL% & \ - echo This compiler has an optimization bug) \ - ) & $(WIN32DIR:/=\)\rm.bat $@.* & exit /b %bug% + @($(CC) -O2 $@.c && .\$@) || \ + (echo This compiler has an optimization bug & \ + $(WIN32DIR:/=\)\rm.bat $@.* & exit /b 1) + @$(WIN32DIR:/=\)\rm.bat $@.* -version-: nul verconf.mk