From: nobu@... Date: 2019-06-12T15:24:53+00:00 Subject: [ruby-dev:50797] [Ruby trunk Bug#15913] Segumentation fault in using RubyVM::InstructionSequence#to_binary. Issue #15913 has been updated by nobu (Nobuyoshi Nakada). Maybe [Bug #14553]? ---------------------------------------- Bug #15913: Segumentation fault in using RubyVM::InstructionSequence#to_binary. https://bugs.ruby-lang.org/issues/15913#change-78492 * 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/