From ead14b19aa5acbdfb2f1ccc53cc7b8b34517b6e9 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 5 Jun 2025 12:49:02 +0900 Subject: Fix `blocking_operation_wait` use-after-free bug. --- thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread.c') 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); -- cgit v1.2.3