ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: takashikkbn@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:94767] [Ruby master Bug#16139] setinstancevariable on MJIT may not check frozen flag
Date: Wed, 04 Sep 2019 01:41:01 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-16139.20190904014100.29c6dbfc06672a14@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16139.20190904014100@ruby-lang.org

Issue #16139 has been reported by k0kubun (Takashi Kokubun).

----------------------------------------
Bug #16139: setinstancevariable on MJIT may not check frozen flag
https://bugs.ruby-lang.org/issues/16139

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-09-03T12:12:31Z master beaabd2308) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: REQUIRED
----------------------------------------
```
class A
  def a
    @a = 1
  end
end

a = A.new
a.a
a.a
a.a
a.freeze
a.a
```

## without JIT
```
$ ruby --disable-gems a.rb
Traceback (most recent call last):
        1: from a.rb:12:in `<main>'
a.rb:3:in `a': can't modify frozen A: #<A:0x00005601af0b0430 @a=1> (FrozenError)
```

## with JIT
```
$ ruby --disable-gems --jit-min-calls=3 --jit-wait a.rb
```
(no error)



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

           reply	other threads:[~2019-09-04  1:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <redmine.issue-16139.20190904014100@ruby-lang.org>]

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-16139.20190904014100.29c6dbfc06672a14@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).