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

ruby-changes:68756

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:13:27 +0900 (JST)
Subject: [ruby-changes:68756] f9e16b0e07 (master): Fix context push/pop in Ruby-to-Ruby calls

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

From f9e16b0e078b6b6c876c4dbfea868bb0199d5382 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Wed, 10 Feb 2021 12:18:35 -0500
Subject: Fix context push/pop in Ruby-to-Ruby calls

---
 ujit_codegen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ujit_codegen.c b/ujit_codegen.c
index cb0d6bcd54..9ca8216a2c 100644
--- a/ujit_codegen.c
+++ b/ujit_codegen.c
@@ -1284,7 +1284,8 @@ gen_opt_swb_iseq(jitstate_t* jit, ctx_t* ctx, struct rb_call_data * cd, const rb https://github.com/ruby/ruby/blob/trunk/ujit_codegen.c#L1284
     // Pop arguments and receiver in return context, push the return value
     // After the return, the JIT and interpreter SP will match up
     ctx_t return_ctx = *ctx;
-    ctx_stack_pop(&return_ctx, argc);
+    ctx_stack_pop(&return_ctx, argc + 1);
+    ctx_stack_push(&return_ctx, T_NONE);
     return_ctx.sp_offset = 0;
 
     // Write the JIT return address on the current frame
-- 
cgit v1.2.1


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

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