ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

November 2026

  • 1 participants
  • 181 discussions
[ruby-core:127303] [Ruby Bug#22497] Reading a frozen Set held by another Ractor's class crashes
by himura467 (Akito Shitara) 03 Nov '26

03 Nov '26
Issue #22497 has been reported by himura467 (Akito Shitara). ---------------------------------------- Bug #22497: Reading a frozen Set held by another Ractor's class crashes https://bugs.ruby-lang.org/issues/22497 * Author: himura467 (Akito Shitara) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ```ruby S = Set[].freeze Ractor.new { S }.join ``` ``` -e:1: [BUG] rb_objspace_reachable_objects_from_local: set is owned by another Ractor ``` Class variables and instance variables of classes crash the same way. Ruby 4.0.7 doesn't crash. ## Cause A Ractor that doesn't own the class checks whether `S` is shareable by traversing it. Since f0439cdfa7 (GH-19145), the children of a T_DATA without declarative marking are enumerated with `rb_objspace_reachable_objects_from_local()`, which rejects an object owned by another Ractor. The commit before it doesn't crash. ## Question I'm still looking for a good fix. Here is what I've tried so far. Restoring the enumeration from before f0439cdfa7 for foreign objects (the VM-locked `rb_objspace_reachable_objects_from()`) fixes the crash, but passes that function an object its comment doesn't allow ("obj may be owned by another Ractor (a shareable)"). I also tried having the owner check shareability when assigning instead, but it doesn't seem to be enough: `lib/tmpdir.rb` freezes `Dir::Tmpname::RANDOM` after assigning it, which breaks `Tempfile` in non-main Ractors. -- https://bugs.ruby-lang.org/
1 1
0 0
  • ← Newer
  • 1
  • ...
  • 16
  • 17
  • 18
  • 19
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.