Project

General

Profile

Actions

Bug #3860

closed

VM aborts when calling instance_eval on a Method converted to a proc

Added by kliuless (Kelvin Liu) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]
Backport:
[ruby-core:32501]

Description

=begin
When I run the attached script with 1.9.2:

ruby-1.9.2-p0 inst_eval_1.9.2.rb
["foo.get", 1]
["foo_pr[]", 1]
inst_eval_1.9.2.rb:19: [BUG] vm_get_cref: unreachable
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]

-- control frame ----------
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :instance_eval
c:0003 p:0126 s:0008 b:0008 l:0026c4 d:000b5c EVAL inst_eval_1.9.2.rb:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0026c4 d:0026c4 TOP

-- Ruby level backtrace information ----------------------------------------
inst_eval_1.9.2.rb:19:in <main>' inst_eval_1.9.2.rb:19:in instance_eval'

-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x0041ab24 rb_vm_bugreport + 196
1 libruby.1.9.1.dylib 0x002c41bc rb_compile_warn + 508
2 libruby.1.9.1.dylib 0x002c426b rb_bug + 43
3 libruby.1.9.1.dylib 0x003fce43 rb_vm_cref + 547
4 libruby.1.9.1.dylib 0x0041919a rb_yield + 1290
5 libruby.1.9.1.dylib 0x0041976d rb_mod_module_exec + 109
6 libruby.1.9.1.dylib 0x003f9415 rb_iseq_build_for_ruby2cext + 7141
7 libruby.1.9.1.dylib 0x00416075 rb_raise_method_missing + 1669
8 libruby.1.9.1.dylib 0x00401cfe rb_method_basic_definition_p + 16254
9 libruby.1.9.1.dylib 0x004092ed rb_method_basic_definition_p + 46445
10 libruby.1.9.1.dylib 0x0040988c rb_iseq_eval_main + 332
11 libruby.1.9.1.dylib 0x002c61c9 rb_mark_end_proc + 345
12 libruby.1.9.1.dylib 0x002c8d36 ruby_run_node + 102
13 ruby 0x00001fef main + 95
14 ruby 0x00001f56 start + 54

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort

This does not happen with 1.8.7 or 1.9.1.
=end


Files

inst_eval_1.9.2.rb (325 Bytes) inst_eval_1.9.2.rb kliuless (Kelvin Liu), 09/23/2010 02:52 AM

Related issues 3 (0 open3 closed)

Has duplicate Ruby master - Bug #3786: instance_execにメソッドをわたした場合の挙動Closedko1 (Koichi Sasada)09/05/2010Actions
Has duplicate Backport192 - Backport #3868: Segfault in 1.9.2 when using instance_eval with a Method objectClosed09/24/2010Actions
Has duplicate Backport192 - Backport #3957: instance_exec and instance_eval crash ruby when passed '&variable' which stores a 'method(:whatever).to_param'Closed10/17/2010Actions
Actions #1

Updated by kliuless (Kelvin Liu) over 13 years ago

=begin
This is probably related to: http://redmine.ruby-lang.org/issues/show/3786
=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Closed

=begin
This issue was solved with changeset r29318.
Takada, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0