prev_mn_schedulable might be clobbered by longjmp

This commit is contained in:
Nobuyoshi Nakada 2025-01-30 16:59:03 +09:00 committed by Nobuyoshi Nakada
parent 167985dc87
commit aca0b92c2f
Notes: git 2025-01-30 09:20:09 +00:00

View File

@ -1811,7 +1811,7 @@ rb_thread_io_blocking_call(rb_blocking_function_t *func, void *data1, int fd, in
volatile VALUE val = Qundef; /* shouldn't be used */
volatile int saved_errno = 0;
enum ruby_tag_type state;
bool prev_mn_schedulable = th->mn_schedulable;
volatile bool prev_mn_schedulable = th->mn_schedulable;
th->mn_schedulable = thread_io_mn_schedulable(th, events, NULL);
// `errno` is only valid when there is an actual error - but we can't