[ruby-core:105652] [Ruby master Bug#18232] Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary
From:
"nagachika (Tomoyuki Chikanaga)" <noreply@...>
Date:
2021-10-16 04:56:25 UTC
List:
ruby-core #105652
Issue #18232 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 3.0: REQUIRED to 3.0: DONE
ruby_3_0 a2fe4b75e4b236ad15778c59ace63006ace53889 merged revision(s) 217df51f0e5d9824ed712a4d175f555d932e44d8.
----------------------------------------
Bug #18232: Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary
https://bugs.ruby-lang.org/issues/18232#change-94154
* Author: byroot (Jean Boussier)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.0.2p107, ruby 3.1.0dev
* Backport: 3.0: DONE
----------------------------------------
This was first reported as a Bootsnap bug: https://github.com/Shopify/bootsnap/issues/376
But I reduced it to:
```ruby
source = <<~RUBY
x = :foo
pr = Proc.new { p x }
Ractor.make_shareable(pr)
pr.call
RUBY
RubyVM::InstructionSequence.compile(source).eval # :foo
RubyVM::InstructionSequence.load_from_binary(RubyVM::InstructionSequence.compile(source).to_binary).eval # false
```
The bug is present on both 3.0.2 and 3.1.0-dev. I have no idea what might cause this.
---Files--------------------------------
0001-Dump-outer-variables-tables-when-dumping-an-iseq-to-.patch (5.55 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>