summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-01-30 16:59:03 +0900
committerNobuyoshi Nakada <[email protected]>2025-01-30 18:19:53 +0900
commitaca0b92c2fa8b45647bf0e0e709213f46b5cb93f (patch)
tree2d5100b3730ee0764919fddbc859d5e682c9c137
parent167985dc871aca74d1b50f3766da1b775f7962e9 (diff)
`prev_mn_schedulable` might be clobbered by `longjmp`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12676
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 7674eff572..d40d5140b7 100644
--- a/thread.c
+++ b/thread.c
@@ -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