Project

General

Profile

Actions

Bug #2522

closed

Segmentation Fault is occurred on r26158 by running rubyspec

Added by mrkn (Kenta Murata) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-12-23 trunk 26158) [x86_64-darwin10.2.0]
Backport:
[ruby-dev:39912]

Description

=begin
r26158 上で rubyspec を実行すると SIGSEGV が発生します。

【rubyspec のログ】

$ mspec -t /opt/ruby/trunk/bin/ruby
ruby 1.9.2dev (2009-12-23 trunk 26158) [x86_64-darwin10.2.0]
.......................................F.........ok
F.E.........................................................................................................................................................................................................................................F............................F......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F....................F....../opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/mocks/proxy.rb:8: [BUG] Segmentation fault
ruby 1.9.2dev (2009-12-23 trunk 26158) [x86_64-darwin10.2.0]

-- control frame ----------
c:0036 p:0024 s:0121 b:0121 l:000120 d:000120 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/mocks/proxy.rb:8
c:0035 p:---- s:0115 b:0115 l:000114 d:000114 FINISH
c:0034 p:---- s:0113 b:0113 l:000112 d:000112 CFUNC :autoload
c:0033 p:0057 s:0108 b:0108 l:0015c8 d:000107 BLOCK /Users/muraken/src/rubyspec.git/core/kernel/autoload_spec.rb:105
c:0032 p:---- s:0105 b:0105 l:000104 d:000104 FINISH
c:0031 p:---- s:0103 b:0103 l:000102 d:000102 CFUNC :instance_eval
c:0030 p:0017 s:0100 b:0100 l:000099 d:000099 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/mspec.rb:67
c:0029 p:0021 s:0094 b:0094 l:000081 d:000093 BLOCK /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/context.rb:149
c:0028 p:---- s:0091 b:0091 l:000090 d:000090 FINISH
c:0027 p:---- s:0089 b:0089 l:000084 d:000088 IFUNC :instance_variable_get
c:0026 p:---- s:0087 b:0087 l:000086 d:000086 CFUNC :each
c:0025 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC :all?
c:0024 p:0053 s:0082 b:0082 l:000081 d:000081 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/context.rb:149
c:0023 p:0101 s:0076 b:0076 l:000065 d:000075 BLOCK /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/context.rb:177
c:0022 p:---- s:0071 b:0071 l:000070 d:000070 FINISH
c:0021 p:---- s:0069 b:0069 l:000068 d:000068 CFUNC :each
c:0020 p:0127 s:0066 b:0066 l:000065 d:000065 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/context.rb:169
c:0019 p:0109 s:0063 b:0063 l:000062 d:000062 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/mspec.rb:36
c:0018 p:0029 s:0056 b:0056 l:000055 d:000055 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/mspec-1.5.12/lib/mspec/runner/object.rb:11
c:0017 p:0167 s:0049 b:0049 l:0015c8 d:0015c8 TOP /Users/muraken/src/rubyspec.git/core/kernel/autoload_spec.rb:69
c:0016 p:---- s:0047 b:0047 l:000046 d:000046 FINISH

【gdb で where した結果など】

Program received signal EXC_BAD_ACCESS, Could not access memory.Reason: KERN_INVALID_ADDRESS at address: 0x00000000000000080x000000010015ab74 in vm_backtrace_each (th=<value temporarily unavailable, due to optimizations>, lev=<value temporarily unavailable, due to optimizations>, iter=0x1001587f0 <vm_backtrace_push>, arg=0x7fff5fbfa768) at ../vm.c:751
751 if ((*iter)(arg, file, line_no, rb_id2str(cfp->me->def->original_id))) break;
(gdb) where
#0 0x000000010015ab74 in vm_backtrace_each (th=<value temporarily unavailable, due to optimizations>, lev=<value temporarily unavailable, due to optimizations>, iter=0x1001587f0 <vm_backtrace_push>, arg=0x7fff5fbfa768) at ../vm.c:751#1 0x000000010015b369 in vm_backtrace [inlined] () at /Users/muraken/src/ruby-trunk.svn/vm.c:781
#2 0x000000010015b369 in rb_make_backtrace () at ../vm.c:1573
#3 0x000000010003b485 in rb_longjmp (tag=6, mesg=4305961240) at ../eval.c:379
#4 0x000000010003b874 in rb_exc_raise (mesg=<value temporarily unavailable, due to optimizations>) at ../eval.c:444
#5 0x000000010016d7cc in raise_method_missing (th=0x1003016b0, argc=1, argv=0x1004003d0, obj=4305966240, last_call_status=<value temporarily unavailable, due to optimizations>) at vm_eval.c:540
#6 0x000000010016d971 in rb_method_missing (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>, obj=<value temporarily unavailable, due to optimizations>) at vm_eval.c:480
#7 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff3a0, num=1, recv=4305966240, blockptr=0x0, flag=<value temporarily unavailable, due to optimizations>, me=0x10031d500) at vm_insnhelper.c:390
#8 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff3a0, num=1, blockptr=0x0, flag=136, id=<value temporarily unavailable, due to optimizations>, me=0x10031d500, recv=4305966240) at vm_insnhelper.c:515
#9 0x0000000100161d96 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1027
#10 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#11 0x000000010016943a in vm_call0 (th=0x1003016b0, recv=4305966240, id=<value temporarily unavailable, due to optimizations>, argc=1, argv=0x100a7c218, me=0x101813180) at vm_eval.c:66
#12 0x00000001001748f7 in check_funcall_exec (args=<value temporarily unavailable, due to optimizations>) at vm_eval.c:234
#13 0x000000010003a127 in rb_rescue2 (b_proc=0x100174760 <check_funcall_exec>, data1=140734799786912, r_proc=0x10016ddc0 <check_funcall_failed>, data2=140734799786912) at ../eval.c:617
#14 0x0000000100169f54 in rb_check_funcall (recv=4305966240, mid=319502, argc=0, argv=0x0) at vm_eval.c:283
#15 0x0000000100085490 in convert_type (val=4305966240, tname=0x10018e220 "String", method=0x100190b70 "to_str", raise=0) at ../object.c:2026
#16 0x0000000100087bb9 in rb_check_convert_type (val=4305966240, type=5, tname=0x10018e220 "String", method=0x100190b70 "to_str") at ../object.c:2063
#17 0x0000000100042f81 in rb_get_path_check (obj=4305966240, level=0) at ../file.c:143
#18 0x000000010003dd00 in rb_mod_autoload [inlined] () at /Users/muraken/src/ruby-trunk.svn/load.c:659
#19 0x000000010003dd00 in rb_f_autoload (obj=<value temporarily unavailable, due to optimizations>, sym=11349262, file=<value temporarily unavailable, due to optimizations>) at ../load.c:701
#20 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff4a8, num=2, recv=4303985080, blockptr=0x0, flag=<value temporarily unavailable, due to optimizations>, me=0x10036d030) at vm_insnhelper.c:390
#21 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff4a8, num=2, blockptr=0x0, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x10036d030, recv=4303985080) at vm_insnhelper.c:515
#22 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#23 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#24 0x00000001001685d1 in vm_yield_with_cref [inlined] () at /Users/muraken/src/ruby-trunk.svn/vm.c:579
#25 0x00000001001685d1 in yield_under (under=<value temporarily unavailable, due to optimizations>, self=4307815160, values=6) at ../vm.c:1182
#26 0x0000000100168808 in specific_eval (argc=0, argv=0x100400328, klass=4307815120, self=4307815160) at vm_eval.c:1212
#27 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff5b0, num=0, recv=4307815160, blockptr=0x101f44570, flag=<value temporarily unavailable, due to optimizations>, me=0x10031d3a0) at vm_insnhelper.c:390
#28 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff5b0, num=0, blockptr=0x101f44570, flag=4, id=<value temporarily unavailable, due to optimizations>, me=0x10031d3a0, recv=4307815160) at vm_insnhelper.c:515
#29 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#30 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#31 0x000000010002f9b6 in enum_all_func [inlined] () at /Users/muraken/src/ruby-trunk.svn/enum.c:885
#32 0x000000010002f9b6 in all_iter_i (i=<value temporarily unavailable, due to optimizations>, memo=0x7fff5fbfc5f8, argc=<value temporarily unavailable, due to optimizations>, argv=
<value temporarily unavailable, due to optimizations>) at ../enum.c:885
#33 0x0000000100174641 in rb_yield (val=4306057120) at vm_insnhelper.c:716
#34 0x0000000100006962 in rb_ary_each (ary=4305967240) at ../array.c:1402
#35 0x00000001001691b9 in vm_call0 (th=0x1003016b0, recv=<value temporarily unavailable, due to optimizations>, id=424, argc=0, argv=0x0, me=0x10033c790) at vm_eval.c:78
#36 0x000000010016cb5e in iterate_method (obj=<value temporarily unavailable, due to optimizations>) at vm_eval.c:234
#37 0x0000000100158306 in rb_iterate (it_proc=0x10016ca00 <iterate_method>, data1=140734799791552, bl_proc=0x10002f9a0 <all_iter_i>, data2=<value temporarily unavailable, due to optimizations>) at vm_eval.c:843
#38 0x000000010015845d in rb_block_call (obj=<value temporarily unavailable, due to optimizations>, mid=<value temporarily unavailable, due to optimizations>, argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>, bl_proc=<value temporarily unavailable, due to optimizations>, data2=<value temporarily unavailable, due to optimizations>) at vm_eval.c:911
#39 0x000000010002deb4 in enum_all (obj=4305967240) at ../enum.c:916
#40 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff7c0, num=0, recv=4305967240, blockptr=0x1004ff7e8, flag=<value temporarily unavailable, due to optimizations>, me=0x10030e3f0) at vm_insnhelper.c:390
#41 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff7c0, num=0, blockptr=0x1004ff7e8, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x10030e3f0, recv=4305967240) at vm_insnhelper.c:515
#42 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#43 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#44 0x0000000100174399 in rb_yield (val=4306057000) at ../vm.c:556
#45 0x0000000100006962 in rb_ary_each (ary=4306063360) at ../array.c:1402
#46 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff920, num=0, recv=4306063360, blockptr=0x1004ff948, flag=<value temporarily unavailable, due to optimizations>, me=0x10033c790) at vm_insnhelper.c:390
#47 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff920, num=0, blockptr=0x1004ff948, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x10033c790, recv=4306063360) at vm_insnhelper.c:515
#48 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#49 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#50 0x0000000100167342 in rb_iseq_eval (iseqval=4307442280) at ../vm.c:1329
#51 0x000000010003ceb8 in rb_load_internal (fname=4307814520, wrap=<value temporarily unavailable, due to optimizations>) at ../load.c:293
#52 0x000000010003db5a in rb_f_load (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at ../load.c:366
#53 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffb30, num=1, recv=4303985080, blockptr=0x0, flag=<value temporarily unavailable, due to optimizations>, me=0x10036cc10) at vm_insnhelper.c:390
#54 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffb30, num=1, blockptr=0x0, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x10036cc10, recv=4303985080) at vm_insnhelper.c:515
#55 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#56 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#57 0x00000001001685d1 in vm_yield_with_cref [inlined] () at /Users/muraken/src/ruby-trunk.svn/vm.c:579
#58 0x00000001001685d1 in yield_under (under=<value temporarily unavailable, due to optimizations>, self=4307815160, values=6) at ../vm.c:1182
#59 0x0000000100168808 in specific_eval (argc=0, argv=0x100400118, klass=4307815120, self=4307815160) at vm_eval.c:1212
#60 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffc38, num=0, recv=4307815160, blockptr=0x109ac11a0, flag=<value temporarily unavailable, due to optimizations>, me=0x10031d3a0) at vm_insnhelper.c:390
#61 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffc38, num=0, blockptr=0x109ac11a0, flag=4, id=<value temporarily unavailable, due to optimizations>, me=0x10031d3a0, recv=4307815160) at vm_insnhelper.c:515
#62 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#63 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#64 0x0000000100174399 in rb_yield (val=4303770520) at ../vm.c:556
#65 0x0000000100006962 in rb_ary_each (ary=4312592000) at ../array.c:1402
#66 0x000000010015be2d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffd98, num=0, recv=4312592000, blockptr=0x1004ffdc0, flag=<value temporarily unavailable, due to optimizations
#67 0x000000010015c7f2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffd98, num=0, blockptr=0x1004ffdc0, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x10033c790, recv=4312592000) at vm_insnhelper.c:515
#68 0x000000010015f723 in vm_exec_core (th=0x1003016b0, initial=<value temporarily unavailable, due to optimizations>) at insns.def:999
#69 0x0000000100166ed3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#70 0x00000001001671c0 in rb_iseq_eval_main (iseqval=4303729680) at ../vm.c:1343
#71 0x000000010003a392 in ruby_exec_internal (n=0x10085b410) at ../eval.c:204
#72 0x000000010003caac in ruby_exec_node [inlined] () at /Users/muraken/src/ruby-trunk.svn/eval.c:251
#73 0x000000010003caac in ruby_run_node (n=<value temporarily unavailable, due to optimizations>) at ../eval.c:244
#74 0x000000010000109f in main (argc=3, argv=0x7fff5fbfeaa0) at ../main.c:35
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #2330: Non systematic segmentation fault with autoload rubyspecClosedmarcandre (Marc-Andre Lafortune)11/04/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0