ruby-changes:70714
From: Alan <ko1@a...>
Date: Tue, 4 Jan 2022 05:11:47 +0900 (JST)
Subject: [ruby-changes:70714] 3ae8b115c2 (master): YJIT: Fix confusing self reference when initializing variable
https://git.ruby-lang.org/ruby.git/commit/?id=3ae8b115c2 From 3ae8b115c2fad3ed71209ff56813fff2e4a8ad3b Mon Sep 17 00:00:00 2001 From: Alan Wu <alanwu@r...> Date: Mon, 3 Jan 2022 12:43:23 -0500 Subject: YJIT: Fix confusing self reference when initializing variable --- yjit_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit_codegen.c b/yjit_codegen.c index 33c1ec65397..aa352dac700 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1330,7 +1330,7 @@ slot_to_local_idx(const rb_iseq_t *iseq, int32_t slot_idx) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L1330 // FIXME: unsigned to signed cast below can truncate int32_t local_table_size = iseq->body->local_table_size; int32_t op = slot_idx - VM_ENV_DATA_SIZE; - int32_t local_idx = local_idx = local_table_size - op - 1; + int32_t local_idx = local_table_size - op - 1; RUBY_ASSERT(local_idx >= 0 && local_idx < local_table_size); return (uint32_t)local_idx; } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/