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

ruby-changes:72554

From: Takashi <ko1@a...>
Date: Fri, 15 Jul 2022 06:15:06 +0900 (JST)
Subject: [ruby-changes:72554] 3f962a20b9 (master): Avoid SEGV on capture_cc_entries

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

From 3f962a20b9295f8b3e8a1a8cfba31ffdec8f8887 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 14 Jul 2022 14:12:31 -0700
Subject: Avoid SEGV on capture_cc_entries

---
 mjit_worker.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mjit_worker.c b/mjit_worker.c
index d53743d073..4011c9143a 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -880,6 +880,7 @@ mjit_compact(char* c_file) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L880
     struct rb_mjit_unit *child_unit = 0;
     ccan_list_for_each(&active_units.head, child_unit, unode) {
         if (!success) continue;
+        if (ISEQ_BODY(child_unit->iseq)->jit_unit == NULL) continue; // Sometimes such units are created. TODO: Investigate why
 
         char funcname[MAXPATHLEN];
         sprint_funcname(funcname, child_unit);
-- 
cgit v1.2.1


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

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