General

Profile

Eregon (Benoit Daloze)

  • Login: Eregon
  • Registered on: 07/30/2009
  • Last sign in: 06/12/2026

Issues

open closed Total
Assigned issues 3 66 69
Reported issues 33 198 231

Projects

Project Roles Registered on
Ruby Committer 08/02/2012

Activity

Today

09:28 AM Ruby Bug #22120: Segfault caused by ar_find_entry_hint() not checking for conversion to st_table
For completeness, I'm attaching a threaded repro that fails reliably on `miniruby`.
The interesting part is it shows this can happen with regular code accessing a Hash from different threads and without needing to override or do anythin...
Eregon (Benoit Daloze)

06/17/2026

03:12 PM Ruby Bug #22120 (Open): Segfault caused by ar_find_entry_hint() not checking for conversion to st_table
While perusing code in hash.c (motivated by some crashes reported in https://github.com/DataDog/dd-trace-rb/issues/5718),
I found it suspicious that `ar_find_entry_hint()` didn't reread `bound` in the loop and yet called arbitrary code ...
Eregon (Benoit Daloze)

06/15/2026

02:40 PM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
Some more context from Claude on `RUBY_INTERNAL_THREAD_EVENT_STARTED`:
> Ruby 3.2: STARTED fires in thread_start_func_1 (thread_pthread.c:1166) — this runs on the new thread itself, without the
> ...
> the GVL as documented; from 3.3...
Eregon (Benoit Daloze)
01:54 PM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
From https://github.com/ruby/ruby/blob/c2879d4eb1c2f232c893656a49a2c53353aebf04/include/ruby/thread.h#L219-L252
```c
/**
* Triggered when a new thread is started.
*
* @note The callback will be called *without* the GVL held...
Eregon (Benoit Daloze)

06/12/2026

07:09 PM Ruby Feature #19315: Lazy substrings in CRuby
mame (Yusuke Endoh) wrote in #note-43:
> By the way, this did not come up during the meeting, but I think the fact that `RSTRING_PTR` can now trigger GC could itself be a serious compatibility problem. There is probably a fair amount of ...
Eregon (Benoit Daloze)
11:31 AM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
jhawthorn (John Hawthorn) wrote in #note-14:
> Why do you need it? Could you pass the raw pointer?
In this case it's to access some configuration of the profiler for whether to sample after RESUMED (`state->waiting_for_gvl_threshold_...
Eregon (Benoit Daloze)
11:15 AM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
One reason it would be valuable to be able to allocate in RESUMED is that's a good spot to set the per-thread state.
I looked at the datadog gem, gvltools, gvl-tracing and vernier.
All of them except vernier use `rb_internal_thread_spec...
Eregon (Benoit Daloze)

06/11/2026

10:01 PM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
jhawthorn (John Hawthorn) wrote in #note-12:
> I feel very strongly that we must not allow arbitrary Ruby code in these hooks.
I agree, I expressed that poorly.
I meant to say one would expect the GVL is held (given the name of the hook...
Eregon (Benoit Daloze)
09:34 PM Ruby Feature #22097: Add Proc#with_refinements
Since the performance relies on having `with_refinements` called always with the same Refinement module for a given block, how about raising an exception if it doesn't hold?
Then we effectively have a guarantee vs very slow performance f...
Eregon (Benoit Daloze)

06/10/2026

07:04 PM Ruby Bug #22098: RUBY_INTERNAL_THREAD_EVENT_RESUMED runs without GVL held
jhawthorn (John Hawthorn) wrote in #note-7:
> we could adjust the documentation to say "about to acquire the GVL" or "has exclusive hold on the GVL, but hasn't yet fully acquired it"
This sounds pretty weird (to me at least) because int...
Eregon (Benoit Daloze)

Also available in: Atom