$ irb -rreadline
irb(main):001:0> require 'postgres'
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.7.0/ 
postgres.bundle: [BUG] Bus Error
ruby 1.8.5 (2006-06-27) [powerpc-darwin8.7.0]

Abort trap

$ gdb `which ruby`
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22  
GMT 2006)
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 "powerpc-apple-darwin"...Reading symbols  
for shared libraries ... done

(gdb) run -S irb -rreadline
Starting program: /usr/local/bin/ruby -S irb -rreadline
Reading symbols for shared libraries .. done
Reading symbols for shared libraries ... done
irb(main):001:0> require 'postgres'
Reading symbols for shared libraries ..................... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x90131a80 in memcmp ()
(gdb) bt
#0  0x90131a80 in memcmp ()
#1  0x907f180c in __CFInitialize ()
#2  0x8fe15580 in  
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkCon 
textE ()
#3  0x8fe0bb08 in  
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#4  0x8fe0ba98 in  
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#5  0x8fe0ba98 in  
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#6  0x8fe0ba98 in  
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#7  0x8fe0dd64 in  
__dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_ 
18InitializerRunningEj ()
#8  0x8fe03fbc in  
__dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18Initializ 
erRunningE ()
#9  0x8fe090c8 in __dyld_NSLinkModule ()
#10 0x9002d44c in NSLinkModule ()
#11 0x0001f2f4 in dln_load (file=0x4be770 "/usr/local/lib/ruby/ 
site_ruby/1.8/powerpc-darwin8.7.0/postgres.bundle") at dln.c:1473
#12 0x00011e64 in rb_require_safe (fname=1814340, safe=0) at eval.c:7128
#13 0x000119dc in rb_f_require (obj=0, fname=2424759312) at eval.c:7002
#14 0x0000f04c in call_cfunc (func=0x119b4 <rb_f_require>,  
recv=1944040, len=2, argc=16, argv=0xa07ba2f0) at eval.c:5626
#15 0x0000e740 in rb_call0 (klass=1948820, recv=1944040, id=9377,  
oid=9377, argc=1, argv=0xbfff3560, body=0x1cceec, flags=2) at eval.c: 
5776
#16 0x0000f650 in rb_call (klass=1948820, recv=1944040, mid=9377,  
argc=1, argv=0xbfff3560, scope=1) at eval.c:6006
#17 0x00009448 in rb_eval (self=1944040, n=0x9086e410) at eval.c:3450
#18 0x00004500 in eval_node (self=1944040, node=0x1badb4) at eval.c:1420
#19 0x000104dc in eval (self=1944040, src=1837040, scope=3174060,  
file=0x4b0760 "(irb)", line=1) at eval.c:6400
#20 0x00010954 in rb_f_eval (argc=4, argv=0x9086e410, self=3174500)  
at eval.c:6517
#21 0x0000f020 in call_cfunc (func=0x107a4 <rb_f_eval>, recv=3174500,  
len=2, argc=16, argv=0xa07ba2f0) at eval.c:5620
#22 0x0000e740 in rb_call0 (klass=1948820, recv=3174500, id=3905,  
oid=3905, argc=4, argv=0xbfff4360, body=0x1da268, flags=2) at eval.c: 
5776
#23 0x0000f650 in rb_call (klass=1948820, recv=3174500, mid=3905,  
argc=4, argv=0xbfff4360, scope=1) at eval.c:6006
#24 0x00009448 in rb_eval (self=3174500, n=0x9086e410) at eval.c:3450
#25 0x0000ec8c in rb_call0 (klass=1762080, recv=3174500, id=10609,  
oid=10609, argc=4, argv=0xbfff4c60, body=0x1aee4c, flags=1765220) at  
eval.c:5912
#26 0x0000f650 in rb_call (klass=1762080, recv=3174500, mid=10609,  
argc=4, argv=0xbfff4c60, scope=0) at eval.c:6006
#27 0x00009200 in rb_eval (self=3174540, n=0x9086e410) at eval.c:3435
#28 0x000092c4 in rb_eval (self=3174540, n=0x9086e410) at eval.c:3445
#29 0x0000ec8c in rb_call0 (klass=1762020, recv=3174540, id=10609,  
oid=10609, argc=2, argv=0xbfff59d0, body=0x1b1ed0, flags=1777740) at  
eval.c:5912
#30 0x0000f650 in rb_call (klass=1762020, recv=3174540, mid=10609,  
argc=2, argv=0xbfff59d0, scope=0) at eval.c:6006
#31 0x00009200 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3435
#32 0x00008838 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3250
#33 0x0000c8a8 in rb_yield_0 (val=6, self=3174840, klass=0, flags=0,  
avalue=0) at eval.c:4953
#34 0x000087b4 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3239
#35 0x00008a18 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3299
#36 0x0000ec8c in rb_call0 (klass=3183500, recv=3174840, id=10529,  
oid=10529, argc=1, argv=0xbfff76b0, body=0x1c4a08, flags=1854280) at  
eval.c:5912
#37 0x0000f650 in rb_call (klass=3183500, recv=3174840, mid=10529,  
argc=1, argv=0xbfff76b0, scope=1) at eval.c:6006
#38 0x00009448 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3450
#39 0x00008364 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3163
#40 0x0000c8a8 in rb_yield_0 (val=1816060, self=3174840, klass=0,  
flags=0, avalue=2) at eval.c:4953
#41 0x000087b4 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3239
#42 0x00008838 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3250
#43 0x0000c8a8 in rb_yield_0 (val=6, self=3173680, klass=0, flags=0,  
avalue=0) at eval.c:4953
#44 0x0000cde8 in rb_f_loop () at eval.c:5097
#45 0x0000f034 in call_cfunc (func=0xcd98 <rb_f_loop>, recv=3173680,  
len=2, argc=16, argv=0xa07ba2f0) at eval.c:5623
#46 0x0000e740 in rb_call0 (klass=1948820, recv=3173680, id=3929,  
oid=3929, argc=0, argv=0x0, body=0x1da128, flags=2) at eval.c:5776
#47 0x0000f650 in rb_call (klass=1948820, recv=3173680, mid=3929,  
argc=0, argv=0x0, scope=1) at eval.c:6006
#48 0x00009448 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3450
#49 0x00008364 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3163
#50 0x0000c8a8 in rb_yield_0 (val=3421454, self=3173680, klass=0,  
flags=0, avalue=0) at eval.c:4953
#51 0x0001baa8 in rb_f_catch (dmy=0, tag=2424759312) at eval.c:12927
#52 0x0000f04c in call_cfunc (func=0x1ba08 <rb_f_catch>,  
recv=3173680, len=2, argc=16, argv=0xa07ba2f0) at eval.c:5626
#53 0x0000e740 in rb_call0 (klass=1948820, recv=3173680, id=3993,  
oid=3993, argc=1, argv=0xbfffb2f0, body=0x1d9ed0, flags=2) at eval.c: 
5776
#54 0x0000f650 in rb_call (klass=1948820, recv=3173680, mid=3993,  
argc=1, argv=0xbfffb2f0, scope=1) at eval.c:6006
#55 0x00009448 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3450
#56 0x00008364 in rb_eval (self=3173680, n=0x9086e410) at eval.c:3163
#57 0x0000ec8c in rb_call0 (klass=3312940, recv=3173680, id=10585,  
oid=10585, argc=0, argv=0x0, body=0x34ddc0, flags=3467540) at eval.c: 
5912
#58 0x0000f650 in rb_call (klass=3312940, recv=3173680, mid=10585,  
argc=0, argv=0x0, scope=0) at eval.c:6006
#59 0x00009200 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3435
#60 0x00008364 in rb_eval (self=3174840, n=0x9086e410) at eval.c:3163
#61 0x0000ec8c in rb_call0 (klass=3183500, recv=3174840, id=10265,  
oid=10265, argc=0, argv=0x0, body=0x1c7a3c, flags=1871500) at eval.c: 
5912
#62 0x0000f650 in rb_call (klass=3183500, recv=3174840, mid=10265,  
argc=0, argv=0x0, scope=0) at eval.c:6006
#63 0x00009200 in rb_eval (self=1799280, n=0x9086e410) at eval.c:3435
#64 0x0000c8a8 in rb_yield_0 (val=2626830, self=1799280, klass=0,  
flags=0, avalue=0) at eval.c:4953
#65 0x0001baa8 in rb_f_catch (dmy=0, tag=2424759312) at eval.c:12927
#66 0x0000f04c in call_cfunc (func=0x1ba08 <rb_f_catch>,  
recv=1799280, len=2, argc=16, argv=0xa07ba2f0) at eval.c:5626
#67 0x0000e740 in rb_call0 (klass=1948820, recv=1799280, id=3993,  
oid=3993, argc=1, argv=0xbfffe0b0, body=0x1d9ed0, flags=2) at eval.c: 
5776
#68 0x0000f650 in rb_call (klass=1948820, recv=1799280, mid=3993,  
argc=1, argv=0xbfffe0b0, scope=1) at eval.c:6006
#69 0x00009448 in rb_eval (self=1799280, n=0x9086e410) at eval.c:3450
#70 0x00008364 in rb_eval (self=1799280, n=0x9086e410) at eval.c:3163
(gdb) quit
The program is running.  Exit anyway? (y or n) y

$ ruby -rreadline
require 'postgres'
^D

$ irb
irb(main):001:0> require 'readline'
=> false
irb(main):002:0> require 'postgres'
=> true

$ cat ~/.irbrc
cat: /Users/drbrain/.irbrc: No such file or directory


-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com