Skip to content

Comments

[pull] master from ruby:master#495

Merged
pull[bot] merged 14 commits intoturkdevops:masterfrom
ruby:master
Nov 21, 2025
Merged

[pull] master from ruby:master#495
pull[bot] merged 14 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Nov 21, 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 : )

peterzhu2118 and others added 14 commits November 21, 2025 07:30
clang-18 has a bug that causes ruby_current_ec to sometimes be null when
using Ractors and crashes like this:

    <internal:ractor>:700: [BUG] Segmentation fault at 0x0000000000000030
    ruby 4.0.0dev (2025-11-21T06:49:14Z master bcc7b20) +PRISM [x86_64-linux]

    -- Control frame information -----------------------------------------------
    c:0004 p:0003 s:0015 e:000014 l:y b:0001 METHOD <internal:ractor>:700
      me:
        called_id: receive, type: iseq
        owner class: 0x00007ff462dda500 T_CLASS/Ractor::Port
      self: 0x00007ff46146d068 ractor/port/Ractor::Port ractor/port
    c:0003 p:0008 s:0011 e:000010 l:y b:0001 METHOD <internal:ractor>:311
      me:
        called_id: receive, type: iseq
        owner class: 0x00007ff462ddae60 T_CLASS/(anon)
      self: 0x00007ff462ddaf00 T_CLASS/Ractor
    c:0002 p:0010 s:0007 e:000006 l:n b:---- BLOCK  bootstraptest.test_ractor.rb_2354_1323.rb:9 [FINISH]
      self: 0x00007ff46146d090 ractor/Ractor r:68
      lvars:
        j: T_FIXNUM 66
    c:0001 p:---- s:0003 e:000002 l:y b:---- DUMMY  [FINISH]
      self: T_NIL

    -- Ruby level backtrace information ----------------------------------------
    bootstraptest.test_ractor.rb_2354_1323.rb:9:in 'block (2 levels) in <main>'
    <internal:ractor>:311:in 'receive'
    <internal:ractor>:700:in 'receive'

    -- Threading information ---------------------------------------------------
    Total ractor count: 7
    Ruby thread count for this ractor: 1

    -- Machine register context ------------------------------------------------
    RIP: 0x00007ff47c7df5f0 RBP: 0x000055d77ea5b4f0 RSP: 0x00007ff445fa3af0
    RAX: 0x0000000000000000 RBX: 0x000055d77e9fd068 RCX: 0x000055d77e9fd040
    RDX: 0x000055d77eb2ac40 RDI: 0x00007ff47cbe7700 RSI: 0x0000000000000000
      R8: 0x0000000000000000  R9: 0x0000000000000000 R10: 0x000055d77e9fc830
    R11: 0x93ba1054e59bfb14 R12: 0x000055d77ea5b4f0 R13: 0x00007ff445f82f20
    R14: 0x00007ff4614cf668 R15: 0x000055d77e9fd040 EFL: 0x0000000000010246

    -- C level backtrace information -------------------------------------------
    libruby.so.4.0(rb_print_backtrace+0x14) [0x7ff47c8cbd18] vm_dump.c:1105
    libruby.so.4.0(rb_vm_bugreport) vm_dump.c:1450
    libruby.so.4.0(rb_bug_for_fatal_signal+0x162) [0x7ff47c70ce02] error.c:1131
    libruby.so.4.0(sigsegv+0x4a) [0x7ff47c82f20a] signal.c:948
    /lib/x86_64-linux-gnu/libc.so.6(0x7ff47c34a330) [0x7ff47c34a330]
    libruby.so.4.0(rb_ec_thread_ptr+0x0) [0x7ff47c7df5f0] vm_core.h:2092
    libruby.so.4.0(rb_ec_ractor_ptr) vm_core.h:2041
    libruby.so.4.0(rb_current_execution_context) vm_core.h:2110
    libruby.so.4.0(rb_current_ractor_raw) vm_core.h:2109
    libruby.so.4.0(rb_current_ractor) vm_core.h:2117
    libruby.so.4.0(ractor_unlock) ractor.c:110
    libruby.so.4.0(ractor_unlock_self) ractor.c:125
    libruby.so.4.0(ractor_wait) ractor_sync.c:1054
    libruby.so.4.0(ractor_wait_receive) ractor_sync.c:1113
    libruby.so.4.0(ractor_receive+0x25) [0x7ff47c7ded08] ractor_sync.c:1166
    libruby.so.4.0(ractor_port_receive) ractor_sync.c:143
    libruby.so.4.0(builtin_inline_class_700) ractor.rb:701
    libruby.so.4.0(invoke_bf+0x4) [0x7ff47c8a2060] vm_insnhelper.c:7534
    libruby.so.4.0(vm_invoke_builtin_delegate) vm_insnhelper.c:0
    libruby.so.4.0(vm_exec_core) insns.def:1674
    libruby.so.4.0(vm_exec_loop+0x0) [0x7ff47c89b868] vm.c:2784
    libruby.so.4.0(rb_vm_exec) vm.c:2787
    libruby.so.4.0(vm_invoke_proc+0x344) [0x7ff47c8b03f4] vm.c:1814
    libruby.so.4.0(thread_do_start_proc+0x17a) [0x7ff47c870bba] thread.c:593
    libruby.so.4.0(thread_do_start+0x162) [0x7ff47c87042f] thread.c:635
    libruby.so.4.0(thread_start_func_2) thread.c:686
    libruby.so.4.0(rb_native_mutex_lock+0x0) [0x7ff47c870fd1] thread_pthread.c:2238
    libruby.so.4.0(thread_sched_lock_) thread_pthread.c:403
    libruby.so.4.0(call_thread_start_func_2) thread_pthread_mn.c:466
    libruby.so.4.0(co_start) thread_pthread_mn.c:464
On some platoforms, 64bit atomic operations need the dedicated helper
library.
This lets us constant-fold common monomorphic cases.
Add `LoadEC` then it's just two `LoadField`.
This is good for protoboeuf and other binary parsing
@pull pull bot locked and limited conversation to collaborators Nov 21, 2025
@pull pull bot added the ⤵️ pull label Nov 21, 2025
@pull pull bot merged commit 1959fca into turkdevops:master Nov 21, 2025
1 of 2 checks passed
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.

4 participants