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

ruby-changes:64098

From: Takashi <ko1@a...>
Date: Fri, 11 Dec 2020 14:57:47 +0900 (JST)
Subject: [ruby-changes:64098] 885135f84c (master): Allow an MJIT worker to show a backtrace on SEGV

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

From 885135f84cd609fb1c7be3fa0a20ae77969eae9d Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 10 Dec 2020 21:56:48 -0800
Subject: Allow an MJIT worker to show a backtrace on SEGV

An MJIT worker thread doesn't have ec, and it's required for SDR() and
rb_backtrace_print_as_bugreport(). Therefore it must be checked.

diff --git a/vm_dump.c b/vm_dump.c
index 6548a70..46c2520 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -941,8 +941,9 @@ rb_vm_bugreport(const void *ctx) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L941
     enum {other_runtime_info = 0};
 #endif
     const rb_vm_t *const vm = GET_VM();
+    const rb_execution_context_t *ec = GET_EC();
 
-    if (vm) {
+    if (vm && ec) {
 	SDR();
 	rb_backtrace_print_as_bugreport();
 	fputs("\n", stderr);
-- 
cgit v0.10.2


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

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