Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created January 24, 2009 23:54
Show Gist options
  • Select an option

  • Save methodmissing/51599 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/51599 to your computer and use it in GitHub Desktop.
macbook-pros-computer:ruby187 lourens$ gdb miniruby
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007)
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 "i386-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) break malloc_error_break
Breakpoint 1 at 0xe24a6
(gdb) run -I 'lib' test/ruby/test_fiber.rb
Starting program: /Users/lourens/projects/ruby187/miniruby -I 'lib' test/ruby/test_fiber.rb
Reading symbols for shared libraries +++... done
Breakpoint 1 at 0x9452b4a9
Loaded suite test/ruby/test_fiber
Started
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x000000ac
rb_thread_fd_close (fd=5) at eval.c:10820
10820 if (((th->wait_for & WAIT_FD) && fd == th->fd) ||
(gdb) bt
#0 rb_thread_fd_close (fd=5) at eval.c:10820
#1 0x00043a21 in rb_io_close (io=1389860) at io.c:2357
#2 0x000890ea in load_file (fname=0x2b9700 "./lib/pp.rb", script=0) at ruby.c:982
#3 0x00032ecf in rb_load (fname=1389900, wrap=0) at eval.c:7026
#4 0x0003340c in rb_require_safe (fname=1137880, safe=0) at eval.c:7389
#5 0x00024f72 in rb_call0 (klass=1293460, recv=1390560, id=9833, oid=9833, argc=0, argv=0xbfff4a20, body=0x12c104, flags=<value temporarily unavailable, due to optimizations>) at eval.c:5904
#6 0x00025b7c in rb_call (klass=1293460, recv=1390560, mid=9833, argc=1, argv=0xbfff4a20, scope=1, self=1390560) at eval.c:6151
#7 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#8 0x000240ab in rb_eval (self=1390560, n=<value temporarily unavailable, due to optimizations>) at eval.c:3308
#9 0x00025810 in rb_call0 (klass=1125740, recv=1390560, id=11801, oid=11801, argc=4, argv=0xbfff5124, body=0x115864, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#10 0x00025b7c in rb_call (klass=1125740, recv=1390560, mid=11801, argc=1, argv=0xbfff5120, scope=1, self=1390560) at eval.c:6151
#11 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#12 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1390560, klass=0, flags=0, avalue=0) at eval.c:5077
#13 0x0002a8d1 in rb_yield (val=0) at eval.c:5161
#14 0x00003392 in rb_ary_collect (ary=1390600) at array.c:1838
#15 0x00024f72 in rb_call0 (klass=1262880, recv=1390600, id=3785, oid=3785, argc=150715, argv=0x0, body=0x133e7c, flags=<value temporarily unavailable, due to optimizations>) at eval.c:5904
#16 0x00025b7c in rb_call (klass=1262880, recv=1390600, mid=3785, argc=0, argv=0x0, scope=0, self=1390560) at eval.c:6151
#17 0x000234b7 in rb_eval (self=1390560, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#18 0x000248b1 in rb_eval (self=1390560, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#19 0x00023436 in rb_eval (self=1390560, n=<value temporarily unavailable, due to optimizations>) at eval.c:3487
#20 0x000231ca in rb_eval (self=1390560, n=<value temporarily unavailable, due to optimizations>) at eval.c:3677
#21 0x00025810 in rb_call0 (klass=1125740, recv=1390560, id=3137, oid=3137, argc=-1073781624, argv=0x0, body=0x1151ac, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#22 0x00025b7c in rb_call (klass=1125740, recv=1390560, mid=3137, argc=0, argv=0x0, scope=0, self=1436100) at eval.c:6151
#23 0x000234b7 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#24 0x00023436 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3487
#25 0x00022450 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3502
#26 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1436100, klass=0, flags=0, avalue=0) at eval.c:5077
#27 0x00023256 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3297
#28 0x00023209 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3436
#29 0x00025810 in rb_call0 (klass=1108220, recv=1436100, id=11257, oid=11257, argc=1406200, argv=0x0, body=0x117998, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#30 0x00025b7c in rb_call (klass=1108220, recv=1436100, mid=11257, argc=0, argv=0x0, scope=1, self=1436100) at eval.c:6151
#31 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#32 0x000248b1 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#33 0x00025810 in rb_call0 (klass=1108220, recv=1436100, id=11249, oid=11249, argc=0, argv=0xbfff7a74, body=0x1214fc, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#34 0x00025b7c in rb_call (klass=1108220, recv=1436100, mid=11249, argc=1, argv=0xbfff7a70, scope=1, self=1436100) at eval.c:6151
#35 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#36 0x000248b1 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#37 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1436100, klass=0, flags=0, avalue=0) at eval.c:5077
#38 0x00023256 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3297
#39 0x00023209 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3436
#40 0x000244e8 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3356
#41 0x00025810 in rb_call0 (klass=1108220, recv=1436100, id=11257, oid=11257, argc=-1073807329, argv=0x0, body=0x117998, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#42 0x00025b7c in rb_call (klass=1108220, recv=1436100, mid=11257, argc=0, argv=0x0, scope=1, self=1436100) at eval.c:6151
#43 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#44 0x000248b1 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#45 0x00025810 in rb_call0 (klass=1108220, recv=1436100, id=10849, oid=10849, argc=1475060, argv=0xbfff9160, body=0x11f7ec, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#46 0x00025b7c in rb_call (klass=1108220, recv=1436100, mid=10849, argc=1, argv=0xbfff9160, scope=1, self=1436100) at eval.c:6151
#47 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#48 0x000248b1 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#49 0x00025810 in rb_call0 (klass=1467660, recv=1436100, id=10841, oid=10841, argc=0, argv=0xbfff9aa4, body=0x12889c, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#50 0x00025b7c in rb_call (klass=1467660, recv=1436100, mid=10841, argc=0, argv=0xbfff9aa4, scope=1, self=6) at eval.c:6151
#51 0x0002635c in rb_f_send (argc=0, argv=0xbfff9aa4, recv=1436100) at eval.c:6199
#52 0x0001a9c5 in call_cfunc (func=0x262b0 <rb_f_send>, recv=1436100, len=<value temporarily unavailable, due to optimizations>, argc=1, argv=0xbfff9aa0) at eval.c:5749
#53 0x00024f72 in rb_call0 (klass=1293460, recv=1436100, id=4073, oid=4073, argc=0, argv=0xbfff9aa0, body=0x1399a8, flags=<value temporarily unavailable, due to optimizations>) at eval.c:5904
#54 0x00025b7c in rb_call (klass=1293460, recv=1436100, mid=4073, argc=1, argv=0xbfff9aa0, scope=1, self=1436100) at eval.c:6151
#55 0x000224d1 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3507
#56 0x000240ab in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3308
#57 0x000244e8 in rb_eval (self=1436100, n=<value temporarily unavailable, due to optimizations>) at eval.c:3356
#58 0x00025810 in rb_call0 (klass=1108320, recv=1436100, id=5393, oid=5393, argc=2, argv=0xbfffa444, body=0x123ce8, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#59 0x00025b7c in rb_call (klass=1108320, recv=1436100, mid=5393, argc=1, argv=0xbfffa440, scope=0, self=1436540) at eval.c:6151
#60 0x000234b7 in rb_eval (self=1436540, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#61 0x00030a1d in block_pass (self=1436540, node=0x10faf4) at eval.c:9138
#62 0x000223a6 in rb_eval (self=1436540, n=<value temporarily unavailable, due to optimizations>) at eval.c:3208
#63 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1436540, klass=0, flags=0, avalue=0) at eval.c:5077
#64 0x0002a8d1 in rb_yield (val=0) at eval.c:5161
#65 0x00002c6f in rb_ary_each (ary=1436180) at array.c:1261
#66 0x00024f72 in rb_call0 (klass=1262880, recv=1436180, id=4001, oid=4001, argc=2847728, argv=0x0, body=0x1340fc, flags=<value temporarily unavailable, due to optimizations>) at eval.c:5904
#67 0x00025b7c in rb_call (klass=1262880, recv=1436180, mid=4001, argc=0, argv=0x0, scope=0, self=1436540) at eval.c:6151
#68 0x000234b7 in rb_eval (self=1436540, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#69 0x000248b1 in rb_eval (self=1436540, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#70 0x00025810 in rb_call0 (klass=1109020, recv=1436540, id=5393, oid=5393, argc=2, argv=0xbfffb504, body=0x10fc70, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#71 0x00025b7c in rb_call (klass=1109020, recv=1436540, mid=5393, argc=1, argv=0xbfffb500, scope=0, self=1438380) at eval.c:6151
#72 0x000234b7 in rb_eval (self=1438380, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#73 0x00030a1d in block_pass (self=1438380, node=0x10faf4) at eval.c:9138
#74 0x000223a6 in rb_eval (self=1438380, n=<value temporarily unavailable, due to optimizations>) at eval.c:3208
#75 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1438380, klass=0, flags=0, avalue=0) at eval.c:5077
#76 0x0002a8d1 in rb_yield (val=0) at eval.c:5161
#77 0x00002c6f in rb_ary_each (ary=1438340) at array.c:1261
#78 0x00024f72 in rb_call0 (klass=1262880, recv=1438340, id=4001, oid=4001, argc=2847664, argv=0x0, body=0x1340fc, flags=<value temporarily unavailable, due to optimizations>) at eval.c:5904
#79 0x00025b7c in rb_call (klass=1262880, recv=1438340, mid=4001, argc=0, argv=0x0, scope=0, self=1438380) at eval.c:6151
#80 0x000234b7 in rb_eval (self=1438380, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#81 0x000248b1 in rb_eval (self=1438380, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#82 0x00025810 in rb_call0 (klass=1109020, recv=1438380, id=5393, oid=5393, argc=-1073756776, argv=0xbfffc5c4, body=0x10fc70, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#83 0x00025b7c in rb_call (klass=1109020, recv=1438380, mid=5393, argc=1, argv=0xbfffc5c0, scope=0, self=1397200) at eval.c:6151
#84 0x000234b7 in rb_eval (self=1397200, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#85 0x000248b1 in rb_eval (self=1397200, n=<value temporarily unavailable, due to optimizations>) at eval.c:3222
#86 0x00025810 in rb_call0 (klass=1398500, recv=1397200, id=14273, oid=14273, argc=-1073755112, argv=0x0, body=0x15ae3c, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#87 0x00025b7c in rb_call (klass=1398500, recv=1397200, mid=14273, argc=0, argv=0x0, scope=0, self=1398440) at eval.c:6151
#88 0x000234b7 in rb_eval (self=1398440, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#89 0x00023209 in rb_eval (self=1398440, n=<value temporarily unavailable, due to optimizations>) at eval.c:3436
#90 0x00025810 in rb_call0 (klass=1397940, recv=1398440, id=14161, oid=14161, argc=-1073753400, argv=0x0, body=0x15d150, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#91 0x00025b7c in rb_call (klass=1397940, recv=1398440, mid=14161, argc=0, argv=0x0, scope=2, self=1398440) at eval.c:6151
#92 0x00023668 in rb_eval (self=<value temporarily unavailable, due to optimizations>, n=<value temporarily unavailable, due to optimizations>) at eval.c:3513
#93 0x00023209 in rb_eval (self=1398440, n=<value temporarily unavailable, due to optimizations>) at eval.c:3436
#94 0x00025810 in rb_call0 (klass=1397940, recv=1398440, id=5313, oid=5313, argc=-1073751648, argv=0x0, body=0x15de5c, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#95 0x00025b7c in rb_call (klass=1397940, recv=1398440, mid=5313, argc=0, argv=0x0, scope=0, self=1397940) at eval.c:6151
#96 0x000234b7 in rb_eval (self=1397940, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#97 0x00023209 in rb_eval (self=1397940, n=<value temporarily unavailable, due to optimizations>) at eval.c:3436
#98 0x00025810 in rb_call0 (klass=1397840, recv=1397940, id=5393, oid=5393, argc=-1073749832, argv=0xbfffe1b8, body=0x18fd30, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#99 0x00025b7c in rb_call (klass=1397840, recv=1397940, mid=5393, argc=2, argv=0xbfffe1b0, scope=0, self=1467080) at eval.c:6151
#100 0x000234b7 in rb_eval (self=1467080, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#101 0x000233cc in rb_eval (self=1467080, n=<value temporarily unavailable, due to optimizations>) at eval.c:3486
#102 0x00025810 in rb_call0 (klass=1469040, recv=1467080, id=5393, oid=5393, argc=0, argv=0x0, body=0x1906cc, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#103 0x00025b7c in rb_call (klass=1469040, recv=1467080, mid=5393, argc=0, argv=0x0, scope=0, self=1469040) at eval.c:6151
#104 0x000234b7 in rb_eval (self=1469040, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#105 0x00025810 in rb_call0 (klass=1469020, recv=1469040, id=5393, oid=5393, argc=0, argv=0x0, body=0x10e1b8, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6055
#106 0x00025b7c in rb_call (klass=1469020, recv=1469040, mid=5393, argc=0, argv=0x0, scope=0, self=1288520) at eval.c:6151
#107 0x000234b7 in rb_eval (self=1288520, n=<value temporarily unavailable, due to optimizations>) at eval.c:3492
#108 0x00022450 in rb_eval (self=1288520, n=<value temporarily unavailable, due to optimizations>) at eval.c:3502
#109 0x00029771 in rb_yield_0 (val=<value temporarily unavailable, due to optimizations>, self=1288520, klass=0, flags=0, avalue=2) at eval.c:5077
#110 0x00029f48 in proc_invoke (proc=1467700, args=1467480, self=6, klass=0) at eval.c:8840
#111 0x0002a10c in call_end_proc (data=1467700) at eval.c:8021
#112 0x0002bccb in rb_exec_end_proc () at eval.c:8102
#113 0x0002bd78 in ruby_finalize_0 () at eval.c:1552
#114 0x0002c0c5 in ruby_cleanup (ex=0) at eval.c:1583
#115 0x0002c2a1 in ruby_stop (ex=0) at eval.c:1652
#116 0x000338a1 in ruby_run () at eval.c:1673
#117 0x00001a5d in main (argc=0, argv=0x0, envp=0xbffff828) at main.c:48
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment