Project

General

Profile

Bug #11159

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

Added by kyrylo (Kyrylo Silin) over 4 years ago. Updated over 4 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

Associated revisions

Revision b8131986
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50541
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

Revision 50541
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

Revision 50541
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

Revision 50541
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

Revision 50541
Added by nobu (Nobuyoshi Nakada) over 4 years ago

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]

Revision 87e2c106
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50542
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

Revision 50542
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

Revision 50542
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

Revision 50542
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

Revision 50542
Added by nobu (Nobuyoshi Nakada) over 4 years ago

ChangeLog: fix typo

  • ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159]

Revision 73a48a14
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) 50541,50542: [Backport #11159]

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

    * iseq.c (rb_iseq_compile_with_option): check source type, must be

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50543
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) 50541,50542: [Backport #11159]

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

* iseq.c (rb_iseq_compile_with_option): check source type, must be

Revision 79881c94
Added by usa (Usaku NAKAMURA) over 4 years ago

merge revision(s) 50541,50542: [Backport #11159]

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

    * iseq.c (rb_iseq_compile_with_option): check source type, must be

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50559
Added by usa (Usaku NAKAMURA) over 4 years ago

merge revision(s) 50541,50542: [Backport #11159]

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

* iseq.c (rb_iseq_compile_with_option): check source type, must be

History

#1

Updated by kyrylo (Kyrylo Silin) over 4 years ago

Symbols also cause segfaults

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

Updated by nobu (Nobuyoshi Nakada) over 4 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 4 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 4 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 4 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