diff options
| author | Samuel Williams <samuel.williams@shopify.com> | 2025-06-05 12:49:02 +0900 |
|---|---|---|
| committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2025-06-06 13:13:16 +0900 |
| commit | ead14b19aa5acbdfb2f1ccc53cc7b8b34517b6e9 (patch) | |
| tree | 5070560cb4326d1d209d81e2aed6dfcd29f28bf6 /thread.c | |
| parent | 81a23c5793fecaff5f75cefe6a6e03dab99df16b (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
