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

ruby-changes:63764

From: Takashi <ko1@a...>
Date: Fri, 27 Nov 2020 13:38:15 +0900 (JST)
Subject: [ruby-changes:63764] 69e77e81dc (master): Run rb_print_backtrace first on ruby_on_ci

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

From 69e77e81dc10945ac6327717bd480db78004f65a Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 26 Nov 2020 20:35:24 -0800
Subject: Run rb_print_backtrace first on ruby_on_ci

Unfortunately we couldn't see a C backtrace with the previous commit
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3272697.

diff --git a/gc.c b/gc.c
index 48c1455..7fe4f8c 100644
--- a/gc.c
+++ b/gc.c
@@ -4598,7 +4598,13 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L4598
 read_barrier_signal(int sig, siginfo_t * info, void * data)
 {
     extern int ruby_on_ci;
-    if (ruby_on_ci) { // read_barrier_handler may crash. Report a backtrace first on CI.
+    if (ruby_on_ci) { // `read_barrier_handler` may crash. Report backtraces first on CI.
+# if HAVE_BACKTRACE // `rb_bug_without_die` may crash on `control_frame_dump`. Report a C backtrace first.
+        fprintf(stderr, "-- C level backtrace (read_barrier_signal) "
+                "-------------------------------------------\n");
+        rb_print_backtrace();
+        fprintf(stderr, "\n");
+# endif
         extern void rb_bug_without_die(const char *fmt, ...);
         rb_bug_without_die("died with read_barrier_signal installed");
     }
-- 
cgit v0.10.2


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

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