summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@shopify.com>2025-06-05 12:49:02 +0900
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2025-06-06 13:13:16 +0900
commitead14b19aa5acbdfb2f1ccc53cc7b8b34517b6e9 (patch)
tree5070560cb4326d1d209d81e2aed6dfcd29f28bf6 /thread.c
parent81a23c5793fecaff5f75cefe6a6e03dab99df16b (diff)
Fix `blocking_operation_wait` use-after-free bug.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13437
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 019ad2af4e..a637c8ec7c 100644
--- a/thread.c
+++ b/thread.c
@@ -1552,7 +1552,7 @@ rb_nogvl(void *(*func)(void *), void *data1,
if (flags & RB_NOGVL_OFFLOAD_SAFE) {
VALUE scheduler = rb_fiber_scheduler_current();
if (scheduler != Qnil) {
- struct rb_fiber_scheduler_blocking_operation_state state;
+ struct rb_fiber_scheduler_blocking_operation_state state = {0};
VALUE result = rb_fiber_scheduler_blocking_operation_wait(scheduler, func, data1, ubf, data2, flags, &state);