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

ruby-changes:60503

From: Koichi <ko1@a...>
Date: Thu, 26 Mar 2020 01:19:54 +0900 (JST)
Subject: [ruby-changes:60503] ff98931dac (master): check flags passed to rb_nogvl()

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

From ff98931daca1265e5bd33025d160c77e452c399e 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

diff --git a/thread.c b/thread.c
index b84fd17..f6919b8 100644
--- a/thread.c
+++ b/thread.c
@@ -1477,7 +1477,7 @@ rb_nogvl(void *(*func)(void *), void *data1, https://github.com/ruby/ruby/blob/trunk/thread.c#L1477
 	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/

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