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

ruby-changes:68600

From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:10:25 +0900 (JST)
Subject: [ruby-changes:68600] 2eaf55fcf1 (master): Update PC in memory when exiting jitted code

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

From 2eaf55fcf1f7afbd0190e47ffe352b29047e6144 Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Tue, 22 Sep 2020 19:05:33 -0400
Subject: Update PC in memory when exiting jitted code

Without this, the allocation tracker was inaccurate and
was causing a failure in `test/objspace/test_objspace.rb`.
---
 ujit_compile.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ujit_compile.c b/ujit_compile.c
index bfe75d1b7b..fae676db3b 100644
--- a/ujit_compile.c
+++ b/ujit_compile.c
@@ -212,6 +212,8 @@ ujit_compile_insn(rb_iseq_t *iseq, unsigned int insn_idx, unsigned int* next_uji https://github.com/ruby/ruby/blob/trunk/ujit_compile.c#L212
 
     // Directly return the next PC, which is a constant
     mov(cb, RAX, const_ptr_opnd(ctx.pc));
+    // Write PC back into the CFP
+    mov(cb, mem_opnd(64, RDI, 0), RAX);
 
     // Write the post call bytes
     ujit_instr_exit(cb);
-- 
cgit v1.2.1


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

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