Project

General

Profile

Bug #10706

Segmentation fault when change visibility of refined new method

Added by hanachin (Seiei Miyagi) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-01-07 trunk 49171) [x86_64-darwin13]
[ruby-core:67387]

Description

following code cause SEGV in ruby-trunk, 2.2.0, 2.1.5, 2.0.0p598

module RefinementBug
  refine Object do
    def foo
    end
  end
end

private(:foo)

it should be raise NameError like:

/Users/sei/tmp/bug.rb:8:in `private': undefined method `foo' for class `Object' (NameError)
    from /Users/sei/tmp/bug.rb:8:in `<main>'

Files

miniruby_2015-01-07-213034_Module.crash (10.3 KB) miniruby_2015-01-07-213034_Module.crash hanachin (Seiei Miyagi), 01/07/2015 12:36 PM
bug.rb (85 Bytes) bug.rb hanachin (Seiei Miyagi), 01/07/2015 12:42 PM
0001-vm_method.c-fix-change-refined-new-method-visibility.patch (1.44 KB) 0001-vm_method.c-fix-change-refined-new-method-visibility.patch hanachin (Seiei Miyagi), 01/07/2015 12:46 PM

Associated revisions

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

ref of r49182 [Bug #10706]

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

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

ref of r49182 [Bug #10706]

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

ref of r49182 [Bug #10706]

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

ref of r49182 [Bug #10706]

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

ref of r49182 [Bug #10706]

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

ref of r49182 [Bug #10706]

Revision 2ca46bfc
Added by naruse (Yui NARUSE) over 4 years ago

merge revision(s) 49182,49183: [Backport #10706]

    vm_method.c: fix change refined new method visibility
    * vm_method.c (rb_export_method): bail out if the original method
      is undefined when the method is refined.
      [ruby-core:67387] [Bug #10706]

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

Revision 49297
Added by naruse (Yui NARUSE) over 4 years ago

merge revision(s) 49182,49183: [Backport #10706]

vm_method.c: fix change refined new method visibility
* vm_method.c (rb_export_method): bail out if the original method
  is undefined when the method is refined.
  [ruby-core:67387] [Bug #10706]

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

merge revision(s) 49182,49183: [Backport #10706]

    vm_method.c: fix change refined new method visibility
    * vm_method.c (rb_export_method): bail out if the original method
      is undefined when the method is refined.
      [ruby-core:67387] [Bug #10706]

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

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

merge revision(s) 49182,49183: [Backport #10706]

vm_method.c: fix change refined new method visibility
* vm_method.c (rb_export_method): bail out if the original method
  is undefined when the method is refined.
  [ruby-core:67387] [Bug #10706]

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

merge revision(s) r49182,r49183: [Backport #10706]

    vm_method.c: fix change refined new method visibility
    * vm_method.c (rb_export_method): bail out if the original method
      is undefined when the method is refined.
      [ruby-core:67387] [Bug #10706]

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

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

merge revision(s) r49182,r49183: [Backport #10706]

vm_method.c: fix change refined new method visibility
* vm_method.c (rb_export_method): bail out if the original method
  is undefined when the method is refined.
  [ruby-core:67387] [Bug #10706]

History

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49183.


ref of r49182 [Bug #10706]

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

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

Updated by naruse (Yui NARUSE) 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

ruby_2_2 r49297 merged revision(s) 49182,49183.

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: DONE, 2.1: REQUIRED, 2.2: DONE

ruby_2_0_0 r49422 merged revision(s) 49175.
test is a little changed to get rid of a warning about refinement on 2.0.0.

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

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

Backported into ruby_2_1 at r49786.

Also available in: Atom PDF