Project

General

Profile

Actions

Bug #3461

closed

Segfault on #inspect with Classes sans :allocate

Added by runpaint (Run Paint Run Run) almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-06-21 trunk 28369) [i686-linux]
Backport:

Description

=begin
Does this constitute firing at one's foot?

run@paint:/var/repos/mir/ruby → cat /tmp/alloc.rb
$SAFE=4
s = Symbol.dup
s.define_singleton_method(:allocate, ->{ super() })
p s.new

run@paint:/var/repos/mir/ruby → ./ruby -vw /tmp/alloc.rb
ruby 1.9.3dev (2010-06-21 trunk 28369) [i686-linux]
/tmp/alloc.rb:4: [BUG] Segmentation fault
ruby 1.9.3dev (2010-06-21 trunk 28369) [i686-linux]

-- control frame ----------
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :inspect
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :p
c:0003 p:0063 s:0007 b:0007 l:0008a4 d:0010d0 EVAL /tmp/alloc.rb:4
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0008a4 d:0008a4 TOP

-- Ruby level backtrace information ----------------------------------------
/tmp/alloc.rb:4:in <main>' /tmp/alloc.rb:4:in p'
/tmp/alloc.rb:4:in `inspect'

-- C level backtrace information -------------------------------------------
./ruby(rb_vm_bugreport+0xa5) [0x8162835]
./ruby() [0x81a18e9]
./ruby(rb_bug+0x28) [0x81a1998]
./ruby() [0x80f4ba8]
[0xf35410]
./ruby() [0x8153209]
./ruby(rb_funcall+0x9a) [0x8153ada]
./ruby(rb_inspect+0x2a) [0x8095b0a]
./ruby(rb_p+0x12) [0x807a732]
./ruby() [0x807bf86]
./ruby() [0x814e035]
./ruby() [0x8159321]
./ruby() [0x815b6c8]
./ruby() [0x815f0a6]
./ruby(rb_iseq_eval_main+0x1c7) [0x815f477]
./ruby() [0x805e552]
./ruby(ruby_run_node+0x32) [0x805fd72]
./ruby(main+0x5a) [0x805d78a]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x126bd6]
./ruby() [0x805d691]

[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

Aborted
=end

Actions #1

Updated by mame (Yusuke Endoh) almost 14 years ago

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

=begin
This issue was solved with changeset r28453.
Run Paint, 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
Like0