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

ruby-changes:60523

From: Koichi <ko1@a...>
Date: Thu, 26 Mar 2020 23:59:26 +0900 (JST)
Subject: [ruby-changes:60523] e4efca87ba (ruby_2_7): check flags passed to rb_nogvl()

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

From e4efca87ba1aa5b6a94b9007040ac3e783c26b43 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Thu, 26 Mar 2020 01:16:50 +0900
Subject: check flags passed to rb_nogvl()

RB_NOGVL_UBF_ASYNC_SAFE is wrongly specified because flags
is not checked.
[Bug #15499] 23444302

(cherry picked from commit ff98931daca1265e5bd33025d160c77e452c399e)

diff --git a/thread.c b/thread.c
index 17bc1e7..708aaa4 100644
--- a/thread.c
+++ b/thread.c
@@ -1464,7 +1464,7 @@ rb_nogvl(void *(*func)(void *), void *data1, https://github.com/ruby/ruby/blob/trunk/thread.c#L1464
 	data2 = th;
     }
     else if (ubf && vm_living_thread_num(th->vm) == 1) {
-        if (RB_NOGVL_UBF_ASYNC_SAFE) {
+        if (flags & RB_NOGVL_UBF_ASYNC_SAFE) {
             th->vm->ubf_async_safe = 1;
         }
         else {
-- 
cgit v0.10.2


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

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