ruby-changes:68976
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:19:32 +0900 (JST)
Subject: [ruby-changes:68976] 53ff2d791d (master): Fix bug in ctx_set_local_type()
https://git.ruby-lang.org/ruby.git/commit/?id=53ff2d791d From 53ff2d791d5e2c303a61d5873bcd03007366be88 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Fri, 9 Apr 2021 14:48:02 -0400 Subject: Fix bug in ctx_set_local_type() --- yjit_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit_core.c b/yjit_core.c index 9469616947..68d4f976a3 100644 --- a/yjit_core.c +++ b/yjit_core.c @@ -202,7 +202,7 @@ Set the type of a local variable https://github.com/ruby/ruby/blob/trunk/yjit_core.c#L202 */ void ctx_set_local_type(ctx_t* ctx, size_t idx, val_type_t type) { - if (ctx->stack_size > MAX_LOCAL_TYPES) + if (idx >= MAX_LOCAL_TYPES) return; ctx->local_types[idx] = type; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/