mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
322642364a
The `dfree` callback registered via `mrb_data_type.dfree` runs from inside GC sweep, so allocating Ruby objects, calling `mrb_funcall` / `mrb_yield`, raising exceptions, or otherwise re-entering the VM can trigger a recursive GC that revisits the same object and causes double-free (see #6316). Make the rule explicit in the "Wrapping C Structures" section. close #6316 Co-authored-by: Claude <noreply@anthropic.com>