次のバグの件なんですが、現時点では原因究明を含めて未解決という
ことでしょうか。

[ruby-list:33547] racc fails on alpha-freebsd
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-list/33547?33469-34526+split-mode-vertical

 このスレッドでも、関連する ruby-talk のスレッド

[ruby-talk:31735] installing mod_ruby --> seg fault in ruby-rdtool
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/31735?31680-34560+split-mode-vertical

でも、ちゃんとしたバックトレースが出ていなかったので、以下に私が
再現できた結果を示しておきます。FreeBSD/alpha 4.7-PRERELEASE 上で
RDTool 0.6.11 に同梱のrd/rdinlineparser.ry を racc で処理し、
segv したところです。

knu@axp0[1]% uname -a
FreeBSD axp0.freebsd.org 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #2: Tue Sep 10 23:22:55 PDT 2002     kris / axp0.freebsd.org:/local0/src/sys/compile/MIATA  alpha
knu@axp0[1]% gcc --version
2.95.4
knu@axp0[1]% ruby -v
ruby 1.6.7 (2002-09-12) [alpha-freebsd4.7]
knu@axp0[1]% gdb =ruby
GNU gdb 4.18 (FreeBSD)
Copyright 1998 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 "alpha-unknown-freebsd"...
(gdb) run /home/knu/alpha/bin/racc rdinlineparser.ry
Starting program: /home/knu/alpha/bin/ruby /home/knu/alpha/bin/racc rdinlineparser.ry

Program received signal SIGSEGV, Segmentation fault.
0x120079b08 in init_regs (regs=0x1200f57c0, num_regs=10) at ../regex.c:3469
3469        regs->beg[i] = regs->end[i] = -1;
(gdb) where
#0  0x120079b08 in init_regs (regs=0x1200f57c0, num_regs=10) at ../regex.c:3469
#1  0x120079bf8 in ruby_re_match (bufp=0x11fdc1a8,
    string_arg=0x1 <Error reading address 0x1: Bad address>, size=301841768, pos=537876416,
    regs=0x0) at ../regex.c:3564
#2  0x120079898 in ruby_re_search (bufp=0x1204a8100,
    string=0x120380000 '-' <repeats 200 times>..., size=10240, startpos=0, range=10240,
    regs=0x1202032f0) at ../regex.c:3260
#3  0x12006b984 in rb_reg_search (re=4833958560, str=4833948400, pos=0, reverse=0) at ../re.c:603
#4  0x120087ba8 in rb_str_index_m (argc=537876416, argv=0x1, str=4833948400) at ../string.c:684
#5  0x1200184d4 in call_cfunc (func=0x1200879a0 <rb_str_index_m>, recv=4833948400, len=0,
    argc=10240, argv=0x4f94f5ea6c1e9b28) at ../eval.c:4274
#6  0x120018d6c in rb_call0 (klass=301843568, recv=4833218240, id=4833892840, argc=539226984,
    argv=0x23d, body=0x4, nosuper=1612951944) at ../eval.c:4411
#7  0x1200197f8 in rb_call (klass=301842024, recv=4833948400, mid=4017, argc=1, argv=0x11fdc1a8,
    scope=0) at ../eval.c:4635
#8  0x1200123e4 in rb_eval (self=4835477544, n=0x1) at ../eval.c:2562
#9  0x120012f50 in rb_eval (self=337, n=0x1) at ../eval.c:2714
#10 0x120010510 in rb_eval (self=0, n=0x1) at ../eval.c:2043
#11 0x12001633c in rb_yield_0 (val=1, self=4833892840, klass=0, acheck=301856352) at ../eval.c:3639
#12 0x120016660 in rb_yield (val=4832843712) at ../eval.c:3727
#13 0x12009bec4 in rb_ary_each (ary=4834352520) at ../array.c:630
#14 0x1200184ec in call_cfunc (func=0x12009be80 <rb_ary_each>, recv=4834352520, len=0, argc=10240,
    argv=0x4f94f5ea6c1e9b28) at ../eval.c:4277
#15 0x120018d6c in rb_call0 (klass=4831937748, recv=4834194280, id=301857456, argc=-1393706275,
    argv=0x1, body=0x1200dcf80, nosuper=0) at ../eval.c:4411
#16 0x1200197f8 in rb_call (klass=4294967296, recv=4834352520, mid=3569, argc=0, argv=0x0, scope=0)
    at ../eval.c:4635
#17 0x1200123e4 in rb_eval (self=4833948320, n=0x1) at ../eval.c:2562
#18 0x120011080 in rb_eval (self=66, n=0x1) at ../eval.c:2294
#19 0x1200192c4 in rb_call0 (klass=0, recv=4831941316, id=5, argc=538887544, argv=0x0,
    body=0x1201f59e8, nosuper=301889696) at ../eval.c:4542
#20 0x1200197f8 in rb_call (klass=4834447960, recv=4833732120, mid=14425, argc=5, argv=0x11fe1e08,
    scope=1) at ../eval.c:4635
(...)

 注目は frame #7 前後です。少し追ってみたんですが、 rb_call() は
ものすごい回数呼ばれるので、condition を設定してもうまく落ちる
直前のコールでブレークすることができませんでした。ただ、再現性は
100% です。

 どこで(argc/argv が)破壊されているんだろう。

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"When I leave I don't know what I'm hoping to find
              When I leave I don't know what I'm leaving behind.."