mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix blocking_operation_wait
use-after-free bug.
This commit is contained in:
parent
81a23c5793
commit
ead14b19aa
Notes:
git
2025-06-06 04:13:28 +00:00
6 changed files with 350 additions and 51 deletions
2
thread.c
2
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue