ruby/missing
Koichi Sasada 39564b8957 dtoa.c: load the 5-powers cache pointers atomically
pow5mult's b_cache publishes new cache nodes with ATOMIC_PTR_CAS (release),
but both readers -- the fast-path check and the recheck before allocating --
were plain loads racing with that CAS: a data race in the C11 sense, and
what TSan reports as `race:pow5mult` under parallel Ractor float<->string
conversion. Harmless on current targets (the reader dereferences through
the loaded pointer, so address dependency orders the accesses), but easy
to make formally correct: read the cache head/next through
RUBY_ATOMIC_PTR_LOAD. The lock-free CAS scheme is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 04:57:14 +09:00
..