ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: naritatakuya0000@gmail•com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50793] [Ruby trunk Bug#15913] Segumentation fault in using RubyVM::InstructionSequence#to_binary.
Date: Wed, 12 Jun 2019 08:41:35 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-15913.20190612084135.16ff18c6bf0dbc0a@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15913.20190612084135@ruby-lang.org

Issue #15913 has been reported by binaryta (Takuya Narita).

----------------------------------------
Bug #15913: Segumentation fault in using RubyVM::InstructionSequence#to_binary.
https://bugs.ruby-lang.org/issues/15913

* Author: binaryta (Takuya Narita)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.3
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Occur Segmentation fault when the ruby code is class methods with hash argument in if false statement in iteration methods into RubyVM::InstructionSequence.compile.

```ruby
# good
RubyVM::InstructionSequence.compile('puts "Hello, World"').to_binary
RubyVM::InstructionSequence.compile('{}.each {|this| Hash.new({id: 1})}').to_binary

# bad
RubyVM::InstructionSequence.compile('{}.each   {|this| if false; Hash.new({id: 1}); end }').to_binary
RubyVM::InstructionSequence.compile('{}.map    {|this| if false; Hash.new({id: 1}); end }').to_binary
RubyVM::InstructionSequence.compile('{}.select {|this| if false; Hash.new({id: 1}); end }').to_binary
RubyVM::InstructionSequence.compile('{}.each_with_index {|this, i| if false; Hash.new({id: 1}); end }').to_binary
# ... and more iterator methods
```



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

       reply	other threads:[~2019-06-12  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15913.20190612084135@ruby-lang.org>
2019-06-12  8:41 ` naritatakuya0000 [this message]
2019-06-12  8:52 ` [ruby-dev:50794] [Ruby trunk Bug#15913] Segumentation fault in using RubyVM::InstructionSequence#to_binary naritatakuya0000
2019-06-12  9:51 ` [ruby-dev:50795] " naritatakuya0000
2019-06-12  9:52 ` [ruby-dev:50796] " naritatakuya0000
2019-06-12 15:24 ` [ruby-dev:50797] " nobu
2019-06-12 20:44 ` [ruby-dev:50798] [Ruby trunk Bug#15913] Segmentation " merch-redmine
2019-06-13  3:16 ` [ruby-dev:50800] " naritatakuya0000

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-15913.20190612084135.16ff18c6bf0dbc0a@ruby-lang.org \
    --to=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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).