YJIT: omit single ractor mode assumption for proc#call#15092
YJIT: omit single ractor mode assumption for proc#call#15092luke-gru merged 1 commit intoruby:masterfrom
proc#call#15092Conversation
|
Is it possible to add a test in |
|
I don't think it was ever possible. |
XrXr
left a comment
There was a problem hiding this comment.
Reasoning is sound to me. Calling a proc is not something that inherently has the possibility of crossing ractor boundary, so unless the isolation is already broken by some other means (like in https://bugs.ruby-lang.org/issues/21649), this is fine.
I'd like to add a test that does method(:a_unshareable_bmethod).to_proc.call, if there isn't one, though. I think we added this check in YJIT because the bmethod calling code is reachable this way. It's fine because Method#to_proc wraps the internal bmethod proc, so isn't an alternative way to call bmethods.
dab46d3 to
e3ec47e
Compare
The comptime receiver, which is a proc, is either shareable or from this ractor so we don't need to assume single-ractor mode. We should never get the "defined with an un-shareable Proc in a different ractor" error.
e3ec47e to
5a42f25
Compare
The comptime receiver, which is a proc, is either shareable or from this ractor so we don't need to assume single-ractor mode. We should never get the "defined with an un-shareable Proc in a different ractor" error.