Project

General

Profile

Actions

Bug #11159

closed

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

Added by kyrylo (Kyrylo Silin) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
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
Actions #1

Updated by kyrylo (Kyrylo Silin) almost 9 years ago

Symbols also cause segfaults

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

Updated by nobu (Nobuyoshi Nakada) almost 9 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
Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 9 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]
Actions #4

Updated by nagachika (Tomoyuki Chikanaga) almost 9 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.

Actions #5

Updated by usa (Usaku NAKAMURA) almost 9 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0