public
Created

For Ruby "Bug #7629 Segmentation fault" (https://bugs.ruby-lang.org/issues/7629)

  • Download Gist
gdb.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
$ gdb $HOME/.rbenv/versions/1.9.3-debug/bin/ruby /cores/core.65588
GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done
 
Reading symbols for shared libraries . done
Reading symbols for shared libraries .................................................................................. done
#0 0x00007fff85d65212 in __pthread_kill ()
(gdb) bt
#0 0x00007fff85d65212 in __pthread_kill ()
#1 0x00007fff8c31daf4 in pthread_kill ()
#2 0x00007fff8c361dce in abort ()
#3 0x000000010a23d6fa in rb_bug (fmt=0x10a41ae27 "Segmentation fault") at error.c:284
#4 0x000000010a344032 in sigsegv (sig=11, info=0x10a722ee0, ctx=0x10a722f48) at signal.c:609
#5 <signal handler called>
#6 0x000000010a3f3950 in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x7fe81691c758) at vm.c:485
#7 0x000000010a3f3d25 in rb_vm_make_proc (th=0x7fe810404000, block=0x7fe81691c780, klass=140634686405440) at vm.c:562
#8 0x000000010a3f3c8e in vm_make_proc_from_block (th=0x7fe810404000, block=0x7fe81691c780) at vm.c:546
#9 0x000000010a3f399b in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x10a6e17f0) at vm.c:488
#10 0x000000010a3f3d25 in rb_vm_make_proc (th=0x7fe810404000, block=0x10a6e1818, klass=140634686405440) at vm.c:562
#11 0x000000010a3f3c8e in vm_make_proc_from_block (th=0x7fe810404000, block=0x10a6e1818) at vm.c:546
#12 0x000000010a3f399b in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x10a6e1798) at vm.c:488
#13 0x000000010a3f3d25 in rb_vm_make_proc (th=0x7fe810404000, block=0x10a6e17c0, klass=140634686405440) at vm.c:562
#14 0x000000010a3f3c8e in vm_make_proc_from_block (th=0x7fe810404000, block=0x10a6e17c0) at vm.c:546
#15 0x000000010a3f399b in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x10a6e1740) at vm.c:488
#16 0x000000010a3f3d25 in rb_vm_make_proc (th=0x7fe810404000, block=0x10a6e1768, klass=140634686405440) at vm.c:562
#17 0x000000010a3d8ee2 in vm_callee_setup_arg_complex (th=0x7fe810404000, iseq=0x7fe812d77d30, orig_argc=2, orig_argv=0x10a5e3990, block=0x7fff55a03d58) at vm_insnhelper.c:221
#18 0x000000010a3e8419 in vm_setup_method (th=0x7fe810404000, cfp=0x10a6e1740, recv=140634702631280, argc=2, blockptr=0x10a6e1768, flag=0, me=0x7fe812ced650) at vm_insnhelper.c:470
#19 0x000000010a3e716e in vm_call_method (th=0x7fe810404000, cfp=0x10a6e1740, num=2, blockptr=0x10a6e1768, flag=0, id=84056, me=0x7fe812ced650, recv=140634702631280) at vm_insnhelper.c:529
#20 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#21 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#22 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x7fe816868e70, self=140634702631280, argc=1, argv=0x7fff55a05800, blockptr=0x0, cref=0x0) at vm.c:631
#23 0x000000010a3f43a4 in rb_vm_invoke_proc (th=0x7fe810404000, proc=0x7fe816868e70, self=140634702631280, argc=1, argv=0x7fff55a05800, blockptr=0x0) at vm.c:677
#24 0x000000010a3e8a9a in vm_call_bmethod (th=0x7fe810404000, recv=140634702631280, argc=1, argv=0x7fff55a05800, blockptr=0x0, me=0x7fe8169268f0) at vm_insnhelper.c:433
#25 0x000000010a3e764d in vm_call_method (th=0x7fe810404000, cfp=0x10a6e18a0, num=1, blockptr=0x0, flag=6, id=45944, me=0x7fe8169268f0, recv=140634702631280) at vm_insnhelper.c:566
#26 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#27 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#28 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x7fff55a07130, self=140634693368400, argc=1, argv=0x7fff55a07190, blockptr=0x0, cref=0x7fe81780c260) at vm.c:631
#29 0x000000010a3f3e3f in vm_yield_with_cref (th=0x7fe810404000, argc=1, argv=0x7fff55a07190, cref=0x7fe81780c260) at vm.c:654
#30 0x000000010a3f11c9 in yield_under (under=140634693367840, self=140634693368400, values=6) at vm_eval.c:1237
#31 0x000000010a3f1436 in specific_eval (argc=0, argv=0x10a5e3448, klass=140634693367840, self=140634693368400) at vm_eval.c:1267
#32 0x000000010a3f163c in rb_obj_instance_eval (argc=0, argv=0x10a5e3448, self=140634693368400) at vm_eval.c:1333
#33 0x000000010a3e8ea3 in call_cfunc (func=0x10a3f15c0 <rb_obj_instance_eval>, recv=140634693368400, len=-1, argc=0, argv=0x10a5e3448) at vm_insnhelper.c:317
#34 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e23a0, num=0, recv=140634693368400, blockptr=0x7fe817017200, me=0x7fe810421770) at vm_insnhelper.c:404
#35 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e23a0, num=0, blockptr=0x7fe817017200, flag=4, id=2904, me=0x7fe810421770, recv=140634693368400) at vm_insnhelper.c:534
#36 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#37 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#38 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x10a6e2580, self=140634693366200, argc=1, argv=0x7fff55a08ea8, blockptr=0x0, cref=0x0) at vm.c:631
#39 0x000000010a3f4290 in vm_yield (th=0x7fe810404000, argc=1, argv=0x7fff55a08ea8) at vm.c:661
#40 0x000000010a3ef51c in rb_yield_0 (argc=1, argv=0x7fff55a08ea8) at vm_eval.c:760
#41 0x000000010a3ef4d8 in rb_yield (val=140634728582000) at vm_eval.c:770
#42 0x000000010a1fc358 in rb_ary_each (array=140634693366200) at array.c:1495
#43 0x000000010a3e8ecb in call_cfunc (func=0x10a1fc290 <rb_ary_each>, recv=140634693366200, len=0, argc=0, argv=0x10a5e33c8) at vm_insnhelper.c:320
#44 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e2558, num=0, recv=140634693366200, blockptr=0x10a6e2580, me=0x7fe810446eb0) at vm_insnhelper.c:404
#45 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e2558, num=0, blockptr=0x10a6e2580, flag=8, id=424, me=0x7fe810446eb0, recv=140634693366200) at vm_insnhelper.c:534
#46 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#47 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#48 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x10a6e28f0, self=140634728559440, argc=1, argv=0x7fff55a0ab38, blockptr=0x0, cref=0x0) at vm.c:631
#49 0x000000010a3f4290 in vm_yield (th=0x7fe810404000, argc=1, argv=0x7fff55a0ab38) at vm.c:661
#50 0x000000010a3ef51c in rb_yield_0 (argc=1, argv=0x7fff55a0ab38) at vm_eval.c:760
#51 0x000000010a3ef4d8 in rb_yield (val=140634728577760) at vm_eval.c:770
#52 0x000000010a200624 in rb_ary_collect (ary=140634688449120) at array.c:2238
#53 0x000000010a3e8ecb in call_cfunc (func=0x10a200510 <rb_ary_collect>, recv=140634688449120, len=0, argc=0, argv=0x10a5e3280) at vm_insnhelper.c:320
#54 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e28c8, num=0, recv=140634688449120, blockptr=0x10a6e28f0, me=0x7fe810447aa0) at vm_insnhelper.c:404
#55 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e28c8, num=0, blockptr=0x10a6e28f0, flag=0, id=1568, me=0x7fe810447aa0, recv=140634688449120) at vm_insnhelper.c:534
#56 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#57 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#58 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x10a6e2aa8, self=140634730072040, argc=1, argv=0x7fff55a0c7c8, blockptr=0x0, cref=0x0) at vm.c:631
#59 0x000000010a3f4290 in vm_yield (th=0x7fe810404000, argc=1, argv=0x7fff55a0c7c8) at vm.c:661
#60 0x000000010a3ef51c in rb_yield_0 (argc=1, argv=0x7fff55a0c7c8) at vm_eval.c:760
#61 0x000000010a3ef4d8 in rb_yield (val=140634728559440) at vm_eval.c:770
#62 0x000000010a200624 in rb_ary_collect (ary=140634728576280) at array.c:2238
#63 0x000000010a3e8ecb in call_cfunc (func=0x10a200510 <rb_ary_collect>, recv=140634728576280, len=0, argc=0, argv=0x10a5e31e8) at vm_insnhelper.c:320
#64 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e2a80, num=0, recv=140634728576280, blockptr=0x10a6e2aa8, me=0x7fe810447aa0) at vm_insnhelper.c:404
#65 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e2a80, num=0, blockptr=0x10a6e2aa8, flag=0, id=1568, me=0x7fe810447aa0, recv=140634728576280) at vm_insnhelper.c:534
#66 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#67 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#68 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x10a6e2c08, self=140634761697520, argc=1, argv=0x7fff55a0e458, blockptr=0x0, cref=0x0) at vm.c:631
#69 0x000000010a3f4290 in vm_yield (th=0x7fe810404000, argc=1, argv=0x7fff55a0e458) at vm.c:661
#70 0x000000010a3ef51c in rb_yield_0 (argc=1, argv=0x7fff55a0e458) at vm_eval.c:760
#71 0x000000010a3ef4d8 in rb_yield (val=140634730072040) at vm_eval.c:770
#72 0x000000010a200624 in rb_ary_collect (ary=140634688358120) at array.c:2238
#73 0x000000010a3e8ecb in call_cfunc (func=0x10a200510 <rb_ary_collect>, recv=140634688358120, len=0, argc=0, argv=0x10a5e3170) at vm_insnhelper.c:320
#74 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e2be0, num=0, recv=140634688358120, blockptr=0x10a6e2c08, me=0x7fe810447aa0) at vm_insnhelper.c:404
#75 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e2be0, num=0, blockptr=0x10a6e2c08, flag=0, id=1568, me=0x7fe810447aa0, recv=140634688358120) at vm_insnhelper.c:534
#76 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#77 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#78 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x10a6e2d68, self=140634698876080, argc=1, argv=0x7fff55a100e8, blockptr=0x0, cref=0x0) at vm.c:631
#79 0x000000010a3f4290 in vm_yield (th=0x7fe810404000, argc=1, argv=0x7fff55a100e8) at vm.c:661
#80 0x000000010a3ef51c in rb_yield_0 (argc=1, argv=0x7fff55a100e8) at vm_eval.c:760
#81 0x000000010a3ef4d8 in rb_yield (val=140634761697520) at vm_eval.c:770
#82 0x000000010a200624 in rb_ary_collect (ary=140634698876000) at array.c:2238
#83 0x000000010a3e8ecb in call_cfunc (func=0x10a200510 <rb_ary_collect>, recv=140634698876000, len=0, argc=0, argv=0x10a5e30f8) at vm_insnhelper.c:320
#84 0x000000010a3e88e4 in vm_call_cfunc (th=0x7fe810404000, reg_cfp=0x10a6e2d40, num=0, recv=140634698876000, blockptr=0x10a6e2d68, me=0x7fe810447aa0) at vm_insnhelper.c:404
#85 0x000000010a3e71d1 in vm_call_method (th=0x7fe810404000, cfp=0x10a6e2d40, num=0, blockptr=0x10a6e2d68, flag=0, id=1568, me=0x7fe810447aa0, recv=140634698876000) at vm_insnhelper.c:534
#86 0x000000010a3df8a3 in vm_exec_core (th=0x7fe810404000, initial=0) at insns.def:1018
#87 0x000000010a3f5e8b in vm_exec (th=0x7fe810404000) at vm.c:1227
#88 0x000000010a3f41c2 in invoke_block_from_c (th=0x7fe810404000, block=0x7fe811ca0640, self=140634698798440, argc=0, argv=0x7fe8108c1500, blockptr=0x0, cref=0x0) at vm.c:631
#89 0x000000010a3f43a4 in rb_vm_invoke_proc (th=0x7fe810404000, proc=0x7fe811ca0640, self=140634698798440, argc=0, argv=0x7fe8108c1500, blockptr=0x0) at vm.c:677
#90 0x000000010a24ac61 in rb_proc_call (self=140634686756120, args=140634686756080) at proc.c:584
#91 0x000000010a243890 in rb_call_end_proc (data=140634686756120) at eval_jump.c:13
#92 0x000000010a243bd1 in rb_exec_end_proc () at eval_jump.c:126
#93 0x000000010a243ed5 in ruby_finalize_0 () at eval.c:92
#94 0x000000010a2440e5 in ruby_cleanup (ex=0) at eval.c:133
#95 0x000000010a24459f in ruby_run_node (n=0x7fe8109cdd80) at eval.c:244
#96 0x000000010a1ede12 in main (argc=4, argv=0x7fff55a12408) at main.c:38
(gdb) frame 6
#6 0x000000010a3f3950 in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x7fe81691c758) at vm.c:485
485 blockptr = GC_GUARDED_PTR_REF(lfp[0]);
(gdb) frame
#6 0x000000010a3f3950 in rb_vm_make_env_object (th=0x7fe810404000, cfp=0x7fe81691c758) at vm.c:485
485 blockptr = GC_GUARDED_PTR_REF(lfp[0]);
(gdb) info frame
Stack level 6, frame at 0x7fff55a038f0:
rip = 0x10a3f3950 in rb_vm_make_env_object (vm.c:485); saved rip 0x10a3f3d25
called by frame at 0x7fff55a03950, caller of frame at 0x10a722ab8
source language c.
Arglist at 0x7fff55a038e8, args: th=0x7fe810404000, cfp=0x7fe81691c758
Locals at 0x7fff55a038e8, Previous frame's sp is 0x7fff55a038f0
Saved registers:
rsi at 0x7fff55a038d0, rdi at 0x7fff55a038d8, rbp at 0x7fff55a038e0, rip at 0x7fff55a038e8
(gdb) p *cfp
$1 = {
pc = 0x7fe8143bd040,
sp = 0x7fe816919e40,
bp = 0x7fe816919e40,
iseq = 0x7fe814865160,
flag = 0,
self = 432937446,
lfp = 0x87600e,
dfp = 0x7fe8126a4aa8,
block_iseq = 0x0,
proc = 0,
me = 0x7fe81681de70
}
(gdb) p *lfp
Cannot access memory at address 0x87600e
(gdb) p lfp[0]
Cannot access memory at address 0x87600e
(gdb)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.