Commit 7a16070
Fix GC safety in rb_fiber_scheduler_blocking_operation_wait
Extract the raw operation pointer before rb_funcall so it is obtained
while the GVL is held and no fiber switch has occurred yet.
Place RB_GC_GUARD(blocking_operation) after the last implicit use of the
VALUE — all accesses via the derived `operation` pointer — so the
compiler cannot treat blocking_operation as dead before this point,
keeping it reachable as a GC root through rb_funcall and through all
subsequent uses of the raw pointer.
See: socketry/io-event#172
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 276f0d9 commit 7a16070
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
1114 | 1117 | | |
1115 | 1118 | | |
1116 | 1119 | | |
| |||
0 commit comments