ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "byroot (Jean Boussier)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:105504] [Ruby master Bug#18232] Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary
Date: Thu, 30 Sep 2021 11:47:45 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-18232.20210930114744.7941@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-18232.20210930114744.7941@ruby-lang.org

Issue #18232 has been reported by byroot (Jean Boussier).

----------------------------------------
Bug #18232: Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary
https://bugs.ruby-lang.org/issues/18232

* Author: byroot (Jean Boussier)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.2p107, ruby 3.1.0dev
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
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.



-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2021-09-30 11:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 11:47 byroot (Jean Boussier) [this message]
2021-10-06  9:22 ` [ruby-core:105567] [Ruby master Bug#18232] Ractor.make_shareable is broken in code loaded with RubyVM::InstructionSequence.load_from_binary byroot (Jean Boussier)
2021-10-06 18:31 ` [ruby-core:105574] " Eregon (Benoit Daloze)
2021-10-06 18:38 ` [ruby-core:105575] " Eregon (Benoit Daloze)
2021-10-06 18:47 ` [ruby-core:105577] " tenderlovemaking (Aaron Patterson)
2021-10-06 21:03 ` [ruby-core:105582] " tenderlovemaking (Aaron Patterson)
2021-10-16  4:56 ` [ruby-core:105652] " nagachika (Tomoyuki Chikanaga)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-18232.20210930114744.7941@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).