1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

check flags passed to rb_nogvl()

RB_NOGVL_UBF_ASYNC_SAFE is wrongly specified because flags
is not checked.
[Bug #15499] 23444302
This commit is contained in:
Koichi Sasada 2020-03-26 01:16:50 +09:00
parent 34d881cba2
commit ff98931dac

View file

@ -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 {