~/talk

The Second Oldest Bug

Talkat RubyConf 2023 · 2023-11-13..11-15· [ruby]
slides:none on file

Bug 4040 is fixed for C methods in Ruby 3.3: calling a method with a huge splatted array no longer crashes with SystemStackError because the VM switches to a temporary hidden Ruby array on the heap and passes a pointer via a new Heap argv flag instead of copying onto the VM stack. The patch covers send, symbol to_proc, method objects, defined_method/defined_singleton_method and rb_yield, balances a minor dispatch slowdown with targeted method call optimizations, and notes thresholds (~1,000,000 main VM ~132k thread ~16,400 fiber ~2,000 tuned).

AI-written summary · about

  1. 0:00Introduction
  2. 1:29Ruby’s second oldest bug
  3. 3:56Why this bug matters in real applications
  4. 5:44System stack errors in Ruby
  5. 7:09Debugging with GDB
  6. 11:26Ruby VM stack and memory
  7. 14:54Stack size impact on web apps
  8. 15:38Bug root cause in argument handling
  9. 17:45Fix design for large array splats
  10. 21:57Temporary array solution
  11. 23:01Patch performance trade-offs
  12. 24:48Bug as a class of issues
  13. 26:15Fixing B-method calls with splats
  14. 28:46Maintainability vs duplication
  15. 31:14Additional cases requiring fixes
  16. 33:41Exception handling for restricted methods
  17. 35:49Fix costs and benefits
  18. 37:36Optimizing method calls
  19. 41:29Community review and approval
  20. 42:32Lessons from the fix
  21. 43:59Closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.