There and Back Again
summary
Benchmarking several delegation strategies (pre hoisting, post via method_missing, on‑demand, undf swapping) triggers a reproducible crash while running 1,000 outer × 10,000 inner iterations. Debugging uses mini-ruby, GDB, malloc stack logging and malloc_history, then libgmalloc to force an immediate fault. The root cause is GC double‑freeing a method_entry; adding a mark check prevents freeing already‑marked entries. The change fixes the crash and appears in Ruby 2.0, so the bench drove a concrete language fix.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:14Warning
- 1:57Contributing to Ruby
- 2:45Use Ruby
- 3:09Bug Reporting
- 3:33Finding a Bug
- 5:15Reporting a Bug
- 7:57Reduce the Bug
- 10:11Delegation
- 11:05Post Delegation
- 11:31Delegation Library
- 11:51Bench Market
- 12:36Bug
- 16:11Build Ruby
- 16:59Ruby Internals
- 18:54MiniRuby
- 19:54GDB
- 25:03Malloc








