Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 9, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jhawthorn and others added 10 commits December 8, 2025 11:48
We're seeing an occasional crash on CI because this ends up inlined all
the way into ractor_wait_receive. On llvm (possibly other compilers) the
thread local address of ec ends up cached (not the value of ec, the
address ec is read from). So if we are migrated to another native
thread, that may be invalid.

Using rb_current_ec_noinline avoids this problems. It would be good to
adjust this code so that ec (or current ractor) is calculated once and
then passed through to both lock and unlock.
If we don't have uint128, then rb_int128_to_numeric emits a strict
aliasing warning:

    numeric.c:3641:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    3641 |         return rb_uint128_to_numeric(*(rb_uint128_t*)&n);
         |                                       ^~~~~~~~~~~~~~~~~
This solution is not quite correct because it doesn't solve multiple
Ractors subscribing to the same event, but this will avoid unrelated
events clobbering the flags for other events.

This however will work corretly for subscribing to global ObjectSpace GC
events.
Internal tracepoints only make sense to run globally, and they already
took completely different paths.
@pull pull bot locked and limited conversation to collaborators Dec 9, 2025
@pull pull bot added the ⤵️ pull label Dec 9, 2025
@pull pull bot merged commit de94f88 into turkdevops:master Dec 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants