Actions
Bug #1737
closedEnumerable#join: Segfault Resulting from Recent Commit
Description
=begin
It looks like one of yesterday's commits is causing a segfault. Yesterday this code exposed bug #1731, but didn't segfault, so presumably either the fix or another commit made in the meantime is the cause. Possibly r23966?
Unfortunately, I'm so far unable to reduce it to a reasonable test case that doesn't rely on mspec (http://github.com/rubyspec/mspec/tree/master). Is this enough for you to work magic, nobu? :-) If not, I'll try to untangle this from mspec tomorrow and provide a better example.
$ cat /tmp/enum_join_segfault.rb
require 'mspec/mocks/object'
class Enum
include Enumerable
def each
yield 1
yield 2
end
end
Enum.new.join(mock('e'))
$ ruby -v /tmp/enum_join_segfault.rb
ruby 1.9.2dev (2009-07-07 trunk 23976) [i686-linux]
/tmp/enum_join_segfault.rb:7: [BUG] Segmentation fault
ruby 1.9.2dev (2009-07-07 trunk 23976) [i686-linux]
-- control frame ----------
c:0007 p:---- s:0018 b:0018 l:000009 d:000017 IFUNC :require
c:0006 p:0017 s:0016 b:0015 l:000014 d:000014 METHOD /tmp/enum_join_segfault.rb:7
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :join
c:0003 p:0052 s:0006 b:0006 l:0012b4 d:001ba4 EVAL /tmp/enum_join_segfault.rb:10
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0012b4 d:0012b4 TOP
---------------------------
/tmp/enum_join_segfault.rb:10:in `<main>'
/tmp/enum_join_segfault.rb:10:in `join'
/tmp/enum_join_segfault.rb:7:in `each'
-- C level backtrace information -------------------------------------------
ruby(rb_vm_bugreport+0xb5) [0x8161c15]
ruby [0x819d38b]
ruby(rb_bug+0x28) [0x819d418]
ruby [0x80f69b5]
[0xb8004410]
ruby [0x810a9da]
ruby(rb_str_buf_append+0x5b) [0x810aa6b]
ruby [0x8199dc7]
ruby [0x8151909]
ruby [0x81570c7]
ruby [0x8159462]
ruby [0x815ba85]
ruby [0x815bf8c]
ruby [0x815f551]
ruby(rb_iterate+0x128) [0x814dcf8]
ruby(rb_block_call+0x3f) [0x814dd9f]
ruby [0x8198855]
ruby [0x814db4d]
ruby [0x815fcbb]
ruby [0x8152776]
ruby [0x8159462]
ruby(rb_iseq_eval_main+0x1a3) [0x81596d3]
ruby(ruby_exec_node+0x97) [0x805d467]
ruby(ruby_run_node+0x46) [0x805ed36]
ruby(main+0x60) [0x805c860]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7e25775]
ruby [0x805c761]
[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
Updated by nobu (Nobuyoshi Nakada) almost 15 years ago
- Status changed from Open to Closed
=begin
Applied in changeset r23979.
=end
Actions
Like0
Like0