diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-01-30 16:59:03 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-01-30 18:19:53 +0900 |
| commit | aca0b92c2fa8b45647bf0e0e709213f46b5cb93f (patch) | |
| tree | 2d5100b3730ee0764919fddbc859d5e682c9c137 /thread.c | |
| parent | 167985dc871aca74d1b50f3766da1b775f7962e9 (diff) | |
`prev_mn_schedulable` might be clobbered by `longjmp`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12676
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
