Project

General

Profile

Bug #11159

RubyVM::InstructionSequence.compile(nil) #=> segfault

Added by kyrylo (Kyrylo Silin) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[ruby-core:<unknown>]

Description

The following code causes a segfault both for Ruby 2.2.2 and Ruby 2.2.0 (I haven't tested other versions).

The trace is attached.

RubyVM::InstructionSequence.compile(nil)

Files

ruby_vm_compile_segfault.txt (9.54 KB) ruby_vm_compile_segfault.txt kyrylo (Kyrylo Silin), 05/17/2015 09:13 PM
#1

Updated by kyrylo (Kyrylo Silin) over 5 years ago

Symbols also cause segfaults

RubyVM::InstructionSequence.compile(:foo)
#2

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Description updated (diff)
  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
#3

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Status changed from Open to Closed

Applied in changeset r50541.


iseq.c: check srouce type

  • iseq.c (rb_iseq_compile_with_option): check srouce type, must be an IO or a String. [ruby-core:69219] [Bug #11159]
#4

Updated by nagachika (Tomoyuki Chikanaga) over 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE

Backported into ruby_2_2 branch at r50543.

#5

Updated by usa (Usaku NAKAMURA) over 5 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE

ruby_2_1 r50559 merged revision(s) 50541,50542.

Also available in: Atom PDF