From: naritatakuya0000@gmail•com
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50796] [Ruby trunk Bug#15913] Segumentation fault in using RubyVM::InstructionSequence#to_binary.
Date: Wed, 12 Jun 2019 09:52:23 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-78474.20190612095222.57c1d7f6735f8521@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15913.20190612084135@ruby-lang.org
Issue #15913 has been updated by binaryta (Takuya Narita).
a
----------------------------------------
Bug #15913: Segumentation fault in using RubyVM::InstructionSequence#to_binary.
https://bugs.ruby-lang.org/issues/15913#change-78474
* Author: binaryta (Takuya Narita)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]
* 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/
next prev parent reply other threads:[~2019-06-12 9:52 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 ` [ruby-dev:50793] [Ruby trunk Bug#15913] Segumentation fault in using RubyVM::InstructionSequence#to_binary naritatakuya0000
2019-06-12 8:52 ` [ruby-dev:50794] " naritatakuya0000
2019-06-12 9:51 ` [ruby-dev:50795] " naritatakuya0000
2019-06-12 9:52 ` naritatakuya0000 [this message]
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.journal-78474.20190612095222.57c1d7f6735f8521@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).