[#122258] [Ruby Misc#21367] Remove link to ruby-doc.org from www.ruby-lang.org/en/documentation/ — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>
Issue #21367 has been reported by p8 (Petrik de Heus).
11 messages
2025/05/23
[ruby-core:122212] [Ruby Bug#21354] Symbol#to_proc is not ractor safe
From:
"nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
Date:
2025-05-21 00:27:56 UTC
List:
ruby-core #122212
Issue #21354 has been updated by nobu (Nobuyoshi Nakada).
Assignee set to ko1 (Koichi Sasada)
Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
Bug #21354: Symbol#to_proc is not ractor safe
https://bugs.ruby-lang.org/issues/21354#change-113360
* Author: luke-gru (Luke Gruber)
* Status: Open
* Assignee: ko1 (Koichi Sasada)
* Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
There is caching in `Symbol#to_proc` (`rb_sym_to_proc`) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a `ractor_confirm_belonging` assertion failure.
Ruby code that reproduces the issue:
```ruby
:inspect.to_proc
Ractor.new do
:inspect.to_proc
end.take
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/