summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-03-26 01:16:50 +0900
committerKoichi Sasada <ko1@atdot.net>2020-03-26 01:19:35 +0900
commitff98931daca1265e5bd33025d160c77e452c399e (patch)
tree69a2e23ccfeb4d76cb0cee1b1ed346587d2ffdf6 /thread.c
parent34d881cba299682d897a151e439f2edc9cf63c0e (diff)
check flags passed to rb_nogvl()
RB_NOGVL_UBF_ASYNC_SAFE is wrongly specified because flags is not checked. [Bug #15499] 23444302
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
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,
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 {