先程 1.9 を make test-all したところ、

..........basic_auth is not supported under soap4r + net/http for now.
......................................................................................................................................................................................................../home/akr/ruby/tmp-ruby/ruby/lib/runit/testcase.rb:37: [BUG] Segmentation fault
ruby 1.9.0 (2004-12-18) [i686-linux]

make: *** [test-all] Aborted (core dumped)

というように core を吐きました。

調べてみると、local_append_gen 内の ALLOC_N(ID, 4) で GC が起きたとき
に問題が起きているようで、

Index: parse.y
===================================================================
RCS file: /src/ruby/parse.y,v
retrieving revision 1.363
diff -u -p -r1.363 parse.y
--- parse.y	8 Dec 2004 02:46:37 -0000	1.363
+++ parse.y	19 Dec 2004 15:55:50 -0000
@@ -7634,6 +7634,7 @@ local_append_gen(parser, id)
     ID id;
 {
     if (lvtbl->tbl == 0) {
+        rb_gc();
 	lvtbl->tbl = ALLOC_N(ID, 4);
 	lvtbl->tbl[0] = 0;
 	lvtbl->tbl[1] = '_';

という変更を加えて make すれば再現でき、make の途中で
./miniruby ./ext/extmk.rb --dest-dir="" --make="make" --mflags="-n" --make-flags="n" --extout=".ext" --extension  --extstatic  --
というのが動いたときに core を吐きます。

make test-all で core を吐いた時の backtrace は以下のとおりです。

% gdb ruby test/core
GNU gdb 6.1-debian
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-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `runner.rb RUNIT::TestTestResult#test_failur'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/etc.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/etc.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/socket.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/socket.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/fcntl.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/fcntl.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/openssl.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/openssl.so
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.7
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.7
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/md5.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/md5.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/rmd160.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/rmd160.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/sha1.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/sha1.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/sha2.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/digest/sha2.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/strscan.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/strscan.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/stringio.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/stringio.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/zlib.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/zlib.so
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/iconv.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/iconv.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/syck.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/syck.so
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/gdbm.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/gdbm.so
Reading symbols from /usr/lib/libgdbm.so.3...done.
Loaded symbols for /usr/lib/libgdbm.so.3
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/dbm.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/dbm.so
Reading symbols from /usr/lib/libgdbm_compat.so.3...done.
Loaded symbols for /usr/lib/libgdbm_compat.so.3
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/readline.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/readline.so
Reading symbols from /lib/libreadline.so.4...done.
Loaded symbols for /lib/libreadline.so.4
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/ripper.so...done.
Loaded symbols for /home/akr/ruby/tmp-ruby/ruby/.ext/i686-linux/ripper.so
#0  0x4009e6b1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x4009e6b1 in kill () from /lib/libc.so.6
#1  0x4009e435 in raise () from /lib/libc.so.6
#2  0x4009f978 in abort () from /lib/libc.so.6
#3  0x080d6296 in rb_bug (fmt=0x0) at error.c:214
#4  0x080b3212 in sigsegv (sig=11) at signal.c:446
#5  <signal handler called>
#6  0x0809a4b5 in local_append_gen (parser=0x8936108, id=126) at parse.y:7638
#7  0x0809b16b in special_local_set (c=126 '~', val=145029232) at parse.y:8103
#8  0x0809b1f5 in rb_backref_set (val=1091249112) at parse.y:8127
#9  0x080a2547 in rb_reg_search (re=1082738248, str=1091249132, pos=1091249112, reverse=0) at re.c:949
#10 0x080b94de in rb_str_sub_bang (argc=1, argv=0xbffeea38, str=1091249132) at string.c:1966
#11 0x080b979c in rb_str_sub (argc=145029232, argv=0x8a4f870, str=1091249132) at string.c:2042
#12 0x0806aeca in call_cfunc (func=0x80b9770 <rb_str_sub>, recv=1091249172, len=1075466412, argc=136, argv=0xbffeea38)
    at eval.c:5418
#13 0x0805eb42 in rb_call0 (klass=1075668916, recv=1091249172, id=4561, oid=145029232, argc=2, argv=0xbffeea38, 
    body=0x401d5e7c, nosuper=0) at eval.c:5559
#14 0x0805ee08 in rb_call (klass=1075668916, recv=1091249172, mid=4561, argc=2, argv=0xbffeea38, scope=0) at eval.c:5781
#15 0x0805991a in rb_eval (self=1082685668, n=0x8a4f870) at ruby.h:635
#16 0x0805e647 in rb_call0 (klass=1082722068, recv=1082685668, id=3441, oid=145029232, argc=0, argv=0x0, body=0x40894580, 
    nosuper=0) at eval.c:5688
#17 0x0805ee08 in rb_call (klass=1082722068, recv=1082685668, mid=3441, argc=0, argv=0x0, scope=2) at eval.c:5781
#18 0x0805991a in rb_eval (self=1082685668, n=0x8a4f870) at ruby.h:635
#19 0x0805a056 in rb_eval (self=1082685668, n=0x8a4f870) at eval.c:3551
#20 0x0805a18a in rb_eval (self=1082685668, n=0x8a4f870) at eval.c:2988
#21 0x0805e647 in rb_call0 (klass=1076033020, recv=1082685668, id=5161, oid=145029232, argc=0, argv=0xbfff075c, 
    body=0x401b8f70, nosuper=0) at eval.c:5688
#22 0x0805ee08 in rb_call (klass=1076033020, recv=1082685668, mid=5161, argc=1, argv=0xbfff0758, scope=3) at eval.c:5781
#23 0x0805f382 in rb_call_super (argc=145029232, argv=0x8a4f870) at eval.c:5903
#24 0x08059e5f in rb_eval (self=1082685668, n=0x8a4f870) at eval.c:3262
#25 0x08064470 in block_pass (self=1082685668, node=0x408943c8) at eval.c:8526
#26 0x0805a5aa in rb_eval (self=1082685668, n=0x8a4f870) at eval.c:2905
#27 0x0805e647 in rb_call0 (klass=1082722068, recv=1082685668, id=5161, oid=145029232, argc=0, argv=0xbfff178c, 
    body=0x408944b8, nosuper=0) at eval.c:5688
#28 0x0805ee08 in rb_call (klass=1082722068, recv=1082685668, mid=5161, argc=1, argv=0xbfff1788, scope=0) at eval.c:5781
#29 0x0805991a in rb_eval (self=1082686268, n=0x8a4f870) at ruby.h:635
#30 0x08064470 in block_pass (self=1082686268, node=0x402305c4) at eval.c:8526
#31 0x0805a5aa in rb_eval (self=1082686268, n=0x8a4f870) at eval.c:2905
#32 0x0805ca07 in rb_yield_0 (val=1082685668, self=1082686268, klass=4, flags=0, avalue=0) at eval.c:4755
#33 0x0805d049 in rb_yield (val=145029232) at eval.c:4837
---Type <return> to continue, or q <return> to quit---
#34 0x080c8d8f in rb_ary_each (ary=1082685848) at array.c:1255
#35 0x0806aed1 in call_cfunc (func=0x80c8d60 <rb_ary_each>, recv=1082685848, len=1075466412, argc=136, argv=0x0)
    at eval.c:5421
#36 0x0805eb42 in rb_call0 (klass=1075647656, recv=1082685848, id=3865, oid=145029232, argc=0, argv=0x0, body=0x401d1084, 
    nosuper=0) at eval.c:5559
#37 0x0805ee08 in rb_call (klass=1075647656, recv=1082685848, mid=3865, argc=0, argv=0x0, scope=0) at eval.c:5781
#38 0x0805991a in rb_eval (self=1082686268, n=0x8a4f870) at ruby.h:635
#39 0x08058cc9 in rb_eval (self=1082686268, n=0x8a4f870) at eval.c:2919
#40 0x0805e647 in rb_call0 (klass=1076033800, recv=1082686268, id=5161, oid=145029232, argc=0, argv=0xbfff38dc, 
    body=0x4023072c, nosuper=0) at eval.c:5688
#41 0x0805ee08 in rb_call (klass=1076033800, recv=1082686268, mid=5161, argc=1, argv=0xbfff38d8, scope=3) at eval.c:5781
#42 0x0805f382 in rb_call_super (argc=145029232, argv=0x8a4f870) at eval.c:5903
#43 0x08059e5f in rb_eval (self=1082686268, n=0x8a4f870) at eval.c:3262
#44 0x08064470 in block_pass (self=1082686268, node=0x408929ec) at eval.c:8526
#45 0x0805a5aa in rb_eval (self=1082686268, n=0x8a4f870) at eval.c:2905
#46 0x0805e647 in rb_call0 (klass=1082730508, recv=1082686268, id=5161, oid=145029232, argc=0, argv=0xbfff490c, 
    body=0x40892adc, nosuper=0) at eval.c:5688
#47 0x0805ee08 in rb_call (klass=1082730508, recv=1082686268, mid=5161, argc=1, argv=0xbfff4908, scope=0) at eval.c:5781
#48 0x0805991a in rb_eval (self=1082778268, n=0x8a4f870) at ruby.h:635
#49 0x08064470 in block_pass (self=1082778268, node=0x402305c4) at eval.c:8526
#50 0x0805a5aa in rb_eval (self=1082778268, n=0x8a4f870) at eval.c:2905
#51 0x0805ca07 in rb_yield_0 (val=1082686268, self=1082778268, klass=4, flags=0, avalue=0) at eval.c:4755
#52 0x0805d049 in rb_yield (val=145029232) at eval.c:4837
#53 0x080c8d8f in rb_ary_each (ary=1082778228) at array.c:1255
#54 0x0806aed1 in call_cfunc (func=0x80c8d60 <rb_ary_each>, recv=1082778228, len=1075466412, argc=136, argv=0x0)
    at eval.c:5421
#55 0x0805eb42 in rb_call0 (klass=1075647656, recv=1082778228, id=3865, oid=145029232, argc=0, argv=0x0, body=0x401d1084, 
    nosuper=0) at eval.c:5559
#56 0x0805ee08 in rb_call (klass=1075647656, recv=1082778228, mid=3865, argc=0, argv=0x0, scope=0) at eval.c:5781
#57 0x0805991a in rb_eval (self=1082778268, n=0x8a4f870) at ruby.h:635
#58 0x08058cc9 in rb_eval (self=1082778268, n=0x8a4f870) at eval.c:2919
#59 0x0805e647 in rb_call0 (klass=1076033800, recv=1082778268, id=5161, oid=145029232, argc=0, argv=0xbfff6a2c, 
    body=0x4023072c, nosuper=0) at eval.c:5688
#60 0x0805ee08 in rb_call (klass=1076033800, recv=1082778268, mid=5161, argc=1, argv=0xbfff6a28, scope=0) at eval.c:5781
#61 0x0805991a in rb_eval (self=1082990268, n=0x8a4f870) at ruby.h:635
#62 0x08064470 in block_pass (self=1082990268, node=0x402305c4) at eval.c:8526
#63 0x0805a5aa in rb_eval (self=1082990268, n=0x8a4f870) at eval.c:2905
#64 0x0805ca07 in rb_yield_0 (val=1082778268, self=1082990268, klass=4, flags=0, avalue=0) at eval.c:4755
#65 0x0805d049 in rb_yield (val=145029232) at eval.c:4837
---Type <return> to continue, or q <return> to quit---
#66 0x080c8d8f in rb_ary_each (ary=1082990228) at array.c:1255
#67 0x0806aed1 in call_cfunc (func=0x80c8d60 <rb_ary_each>, recv=1082990228, len=1075466412, argc=136, argv=0x0)
    at eval.c:5421
#68 0x0805eb42 in rb_call0 (klass=1075647656, recv=1082990228, id=3865, oid=145029232, argc=0, argv=0x0, body=0x401d1084, 
    nosuper=0) at eval.c:5559
#69 0x0805ee08 in rb_call (klass=1075647656, recv=1082990228, mid=3865, argc=0, argv=0x0, scope=0) at eval.c:5781
#70 0x0805991a in rb_eval (self=1082990268, n=0x8a4f870) at ruby.h:635
#71 0x08058cc9 in rb_eval (self=1082990268, n=0x8a4f870) at eval.c:2919
#72 0x0805e647 in rb_call0 (klass=1076033800, recv=1082990268, id=5161, oid=145029232, argc=0, argv=0xbfff8b4c, 
    body=0x4023072c, nosuper=0) at eval.c:5688
#73 0x0805ee08 in rb_call (klass=1076033800, recv=1082990268, mid=5161, argc=1, argv=0xbfff8b48, scope=0) at eval.c:5781
#74 0x0805991a in rb_eval (self=1084600448, n=0x8a4f870) at ruby.h:635
#75 0x08064470 in block_pass (self=1084600448, node=0x402305c4) at eval.c:8526
#76 0x0805a5aa in rb_eval (self=1084600448, n=0x8a4f870) at eval.c:2905
#77 0x0805ca07 in rb_yield_0 (val=1082990268, self=1084600448, klass=4, flags=0, avalue=0) at eval.c:4755
#78 0x0805d049 in rb_yield (val=145029232) at eval.c:4837
#79 0x080c8d8f in rb_ary_each (ary=1084600308) at array.c:1255
#80 0x0806aed1 in call_cfunc (func=0x80c8d60 <rb_ary_each>, recv=1084600308, len=1075466412, argc=136, argv=0x0)
    at eval.c:5421
#81 0x0805eb42 in rb_call0 (klass=1075647656, recv=1084600308, id=3865, oid=145029232, argc=0, argv=0x0, body=0x401d1084, 
    nosuper=0) at eval.c:5559
#82 0x0805ee08 in rb_call (klass=1075647656, recv=1084600308, mid=3865, argc=0, argv=0x0, scope=0) at eval.c:5781
#83 0x0805991a in rb_eval (self=1084600448, n=0x8a4f870) at ruby.h:635
#84 0x08058cc9 in rb_eval (self=1084600448, n=0x8a4f870) at eval.c:2919
#85 0x0805e647 in rb_call0 (klass=1076033800, recv=1084600448, id=5161, oid=145029232, argc=0, argv=0xbfffac6c, 
    body=0x4023072c, nosuper=0) at eval.c:5688
#86 0x0805ee08 in rb_call (klass=1076033800, recv=1084600448, mid=5161, argc=1, argv=0xbfffac68, scope=0) at eval.c:5781
#87 0x0805991a in rb_eval (self=1082280688, n=0x8a4f870) at ruby.h:635
#88 0x08058cc9 in rb_eval (self=1082280688, n=0x8a4f870) at eval.c:2919
#89 0x0805e647 in rb_call0 (klass=1079474892, recv=1082280688, id=27033, oid=145029232, argc=0, argv=0x0, body=0x4057ca04, 
    nosuper=0) at eval.c:5688
#90 0x0805ee08 in rb_call (klass=1079474892, recv=1082280688, mid=27033, argc=0, argv=0x0, scope=0) at eval.c:5781
#91 0x0805991a in rb_eval (self=1082299768, n=0x8a4f870) at ruby.h:635
#92 0x0805e647 in rb_call0 (klass=1079474252, recv=1082299768, id=26921, oid=145029232, argc=0, argv=0x0, body=0x4057eac0, 
    nosuper=0) at eval.c:5688
#93 0x0805ee08 in rb_call (klass=1079474252, recv=1082299768, mid=26921, argc=0, argv=0x0, scope=2) at eval.c:5781
#94 0x0805991a in rb_eval (self=1082299768, n=0x8a4f870) at ruby.h:635
#95 0x0805e647 in rb_call0 (klass=1079474252, recv=1082299768, id=5081, oid=145029232, argc=0, argv=0x0, body=0x4057f650, 
    nosuper=0) at eval.c:5688
---Type <return> to continue, or q <return> to quit---
#96 0x0805ee08 in rb_call (klass=1079474252, recv=1082299768, mid=5081, argc=0, argv=0x0, scope=0) at eval.c:5781
#97 0x0805991a in rb_eval (self=1079474252, n=0x8a4f870) at ruby.h:635
#98 0x0805e647 in rb_call0 (klass=1079474152, recv=1079474252, id=5161, oid=145029232, argc=0, argv=0xbfffd390, 
    body=0x402291e8, nosuper=0) at eval.c:5688
#99 0x0805ee08 in rb_call (klass=1079474152, recv=1079474252, mid=5161, argc=2, argv=0xbfffd388, scope=0) at eval.c:5781
#100 0x0805991a in rb_eval (self=1075860000, n=0x8a4f870) at ruby.h:635
#101 0x080597ec in rb_eval (self=1075860000, n=0x8a4f870) at eval.c:3193
#102 0x0805e647 in rb_call0 (klass=1075861680, recv=1075860000, id=5161, oid=145029232, argc=0, argv=0x0, body=0x40229a6c, 
    nosuper=0) at eval.c:5688
#103 0x0805ee08 in rb_call (klass=1075861680, recv=1075860000, mid=5161, argc=0, argv=0x0, scope=0) at eval.c:5781
#104 0x0805991a in rb_eval (self=1075861680, n=0x8a4f870) at ruby.h:635
#105 0x0805e647 in rb_call0 (klass=1075861660, recv=1075861680, id=5161, oid=145029232, argc=0, argv=0xbfffea50, 
    body=0x4022eea4, nosuper=0) at eval.c:5688
#106 0x0805ee08 in rb_call (klass=1075861660, recv=1075861680, mid=5161, argc=2, argv=0xbfffea48, scope=0) at eval.c:5781
#107 0x0805991a in rb_eval (self=1075673536, n=0x8a4f870) at ruby.h:635
#108 0x08059c4b in rb_eval (self=1075673536, n=0x8a4f870) at ruby.h:664
#109 0x08055eed in ruby_exec_internal () at eval.c:1470
#110 0x08055f06 in ruby_exec () at eval.c:1488
#111 0x08055f50 in ruby_run () at eval.c:1505
#112 0x08053f5b in main (argc=145029232, argv=0x8a4f870, envp=0xbffff8ac) at main.c:47
(gdb) 

また、最近、最後に GC が起きた時の backtrace のようなものを記録するこ
とを試しているのですが、それによれば、最後に起きた GC は次の文脈で呼び
出されたようです。(return address の系列なため、関数呼び出しそのものじゃ
なくて、その直後の行を指していることがあります)

(gdb) gcbt
0x8070515 is in ruby_xmalloc (gc.c:123).
118         }
119         if (size == 0) size = 1;
120         malloc_increase += size;
121
122         if (malloc_increase > malloc_limit) {
123             garbage_collect();
124         }
125         RUBY_CRITICAL(mem = malloc(size));
126         if (!mem) {
127             garbage_collect();
0x809a4ad is in local_append_gen (parse.y:7637).
7632    local_append_gen(parser, id)
7633        struct parser_params *parser;
7634        ID id;
7635    {
7636        if (lvtbl->tbl == 0) {
7637            lvtbl->tbl = ALLOC_N(ID, 4);
7638            lvtbl->tbl[0] = 0;
7639            lvtbl->tbl[1] = '_';
7640            lvtbl->tbl[2] = '~';
7641            lvtbl->cnt = 2;
0x809b16b is in special_local_set (parse.y:8104).
8099        int cnt;
8100        struct parser_params *parser = parser_new();
8101
8102        top_local_init();
8103        cnt = local_cnt(c);
8104        top_local_setup();
8105        ruby_scope->local_vars[cnt] = val;
8106    }
8107
8108    VALUE
0x809b1f5 is in rb_backref_set (parse.y:8127).
8122        VALUE *var = rb_svar(1);
8123        if (var) {
8124            *var = val;
8125        }
8126        else {
---Type <return> to continue, or q <return> to quit---
8127            special_local_set('~', val);
8128        }
8129    }
8130
8131    VALUE
0x80a2547 is in rb_reg_search (re.c:951).
946
947         re_copy_registers(RMATCH(match)->regs, &regs);
948         RMATCH(match)->str = rb_str_new4(str);
949         rb_backref_set(match);
950
951         OBJ_INFECT(match, re);
952         OBJ_INFECT(match, str);
953         return result;
954     }
955
0x80b94de is in rb_str_sub_bang (string.c:2001).
1996            RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
1997            if (tainted) OBJ_TAINT(str);
1998
1999            return str;
2000        }
2001        return Qnil;
2002    }
2003
2004
2005    /*
0x80b979c is in rb_str_sub (string.c:2044).
2039        VALUE str;
2040    {
2041        str = rb_str_dup(str);
2042        rb_str_sub_bang(argc, argv, str);
2043        return str;
2044    }
2045
2046    static VALUE
2047    str_gsub(argc, argv, str, bang)
2048        int argc;
0x806aeca is in call_cfunc (eval.c:5418).
---Type <return> to continue, or q <return> to quit---
5413        switch (len) {
5414          case -2:
5415            return (*func)(recv, rb_ary_new4(argc, argv));
5416            break;
5417          case -1:
5418            return (*func)(argc, argv, recv);
5419            break;
5420          case 0:
5421            return (*func)(recv);
5422            break;
0x805eb42 is in rb_call0 (eval.c:5559).
5554                    ruby_current_node = ruby_frame->node;
5555                    call_trace_func("c-return", ruby_current_node, recv, id, klass);
5556                    if (state) JUMP_TAG(state);
5557                }
5558                else {
5559                    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
5560                }
5561            }
5562            break;
5563
0x805ee08 is in rb_call (eval.c:5782).
5777                    return method_missing(recv, mid, argc, argv, CSTAT_PROT);
5778            }
5779        }
5780
5781        return rb_call0(klass, recv, mid, id, argc, argv, body, noex & NOEX_NOSUPER);
5782    }
5783
5784    VALUE
5785    rb_apply(recv, mid, args)
5786        VALUE recv;
(gdb) 

うぅむ。SEGV の直前の行に ALLOC_N があったのか...
-- 
[田中 哲][たなか あきら][Tanaka Akira]