[前][次][番号順一覧][スレッド一覧]

ruby-changes:68734

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:12:29 +0900 (JST)
Subject: [ruby-changes:68734] 7e60ce357b (master): Fix uint cast bug caught by Alan

https://git.ruby-lang.org/ruby.git/commit/?id=7e60ce357b

From 7e60ce357b7061ea6e638cab2ff656df031f7d90 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Mon, 11 Jan 2021 14:58:40 -0500
Subject: Fix uint cast bug caught by Alan

---
 ujit_codegen.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ujit_codegen.c b/ujit_codegen.c
index 5c8e393205..a9462622ae 100644
--- a/ujit_codegen.c
+++ b/ujit_codegen.c
@@ -1006,8 +1006,7 @@ static bool https://github.com/ruby/ruby/blob/trunk/ujit_codegen.c#L1006
 gen_jump(jitstate_t* jit, ctx_t* ctx)
 {
     // Get the branch target instruction offsets
-    uint32_t next_idx = jit_next_idx(jit);
-    uint32_t jump_idx = next_idx + (uint32_t)jit_get_arg(jit, 0);
+    uint32_t jump_idx = jit_next_idx(jit) + (int32_t)jit_get_arg(jit, 0);
     blockid_t jump_block = { jit->iseq, jump_idx };
 
     //
@@ -1015,9 +1014,6 @@ gen_jump(jitstate_t* jit, ctx_t* ctx) https://github.com/ruby/ruby/blob/trunk/ujit_codegen.c#L1014
 	// RUBY_VM_CHECK_INTS(ec);
     //
 
-    //print_str(cb, "jump!");
-    //print_int(cb, imm_opnd(jump_idx));
-
     // If the jump target was already compiled
     if (find_block_version(jump_block, ctx))
     {
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]