e$BEOJUE/Li$G$9!#e(B
ruby 1.9.0 (2007-05-17 patchlevel 0) [i686-linux]
e$B>e$Ge(B core e$B$7$FMn$A$^$9$N$GJs9p$7$^$9!#e(B
$ ./ruby-1.9.0 -Ke /tmp/j.rb *.c *.h /.c
zsh: 29641 segmentation fault (core dumped) ./ruby-1.9.0 -Ke /tmp/j.rb
*.c *.h /.c
-Ke e$B$O$J$/$F$be(B core e$B$7$^$9!#e(B
gdb e$B$Ne(B backtrace e$B$Oe(B string.c tr_setup_table
e$B$G$G$F$$$k$N$G$9$,!"$I$&$be(B
e$BIT0BDj$N$h$&$G$9!#e(B(string.c tr_setup_table
e$B$=$N$b$N$O0JA0$HF1$8$h$&$Ge(B
e$B$9$N$Ge(B)
#0 0x080a884b in tr_setup_table (str=1080892200, table=0xbf800150
“\200”, init=1) at string.c:3144
3144 tr.p = RSTRING_PTR(str); tr.pend = tr.p + RSTRING_LEN(str);
(gdb) bt
#0 0x080a884b in tr_setup_table (str=1080892200, table=0xbf800150
“\200”, init=1) at string.c:3144
#1 0x080a8d6b in rb_str_count (argc=1, argv=0x40309024, str=1080892240)
at string.c:3384
#2 0x080bd325 in call_cfunc (func=0x80a8d06 <rb_str_count>,
recv=1080892240, len=1080892200, argc=1, argv=0x7) at call_cfunc.ci:36
#3 0x080bb4a4 in th_eval (th=0x814fef0, initial=0) at insns.def:1279
#4 0x080bcc76 in th_eval_body (th=0x814fef0) at vm.c:1620
#5 0x080bd15f in rb_thread_eval (th=0x814fef0, iseqval=1076863380) at
vm.c:1826
#6 0x080be51d in yarvcore_eval_iseq (iseq=1076863380) at yarvcore.c:97
#7 0x080be5ba in yarvcore_eval_parsed (node=0x402fa1d0,
file=1076863420) at yarvcore.c:129
#8 0x08059057 in ruby_exec_internal () at eval.c:210
#9 0x08059087 in ruby_exec () at eval.c:223
#10 0x080590bd in ruby_run () at eval.c:242
#11 0x08056abd in main () at main.c:47
#12 0x400d9c1f in __libc_start_main () from /lib/i686/libc.so.6
#0 0x080a890c in tr_setup_table (str=0, table=0xbf800170 ‘\001’
<repeats 200 times>…, init=1) at string.c:3160
3160 buf[c & 0xff] = !cflag;
(gdb) bt
#0 0x080a890c in tr_setup_table (str=0, table=0xbf800170 ‘\001’
<repeats 200 times>…, init=1) at string.c:3160
#1 0x080a8d6b in rb_str_count (argc=1, argv=0x40309024, str=1080892240)
at string.c:3384
#2 0x080bd325 in call_cfunc (func=0x80a8d06 <rb_str_count>,
recv=1080892240, len=0, argc=1, argv=0x406d1b30) at call_cfunc.ci:36
#3 0x080bb4a4 in th_eval (th=0x814fef0, initial=0) at insns.def:1279
#4 0x080bcc76 in th_eval_body (th=0x814fef0) at vm.c:1620
#5 0x080bd15f in rb_thread_eval (th=0x814fef0, iseqval=1076863380) at
vm.c:1826
#6 0x080be51d in yarvcore_eval_iseq (iseq=1076863380) at yarvcore.c:97
#7 0x080be5ba in yarvcore_eval_parsed (node=0x402fa1d0,
file=1076863420) at yarvcore.c:129
#8 0x08059057 in ruby_exec_internal () at eval.c:210
#9 0x08059087 in ruby_exec () at eval.c:223
#10 0x080590bd in ruby_run () at eval.c:242
#11 0x08056abd in main () at main.c:47
#12 0x400d9c1f in __libc_start_main () from /lib/i686/libc.so.6
e$B:F8=%9%/%j%W%He(B
require ‘nkf’
while gets("\n")
l = $_
break if l.count("\n") > 1
l = NKF.nkf(’-Se’, l)
if l =~ /SIGV/
end
end
e$B:F8=%9%/%j%W%H$N$I$N9T$b:G>.8BI,MW$=$&$G$9!#=hM}NL4X78$G$O$J$$$+e(B?
e$B$H$O;W$&$N$G$9$,!#e(B
e$B:F8=J}K!e(B
$ cd ruby-1.9 e$B7O%=!<%9$N%H%C%We(B
$ ./ruby e$B:F8=%9%/%j%W%He(B *.c *.h /.c
strace e$B$N7k2L$G$O$[$\Kh2se(B win32/win32.c
e$B$G5/$-$F$$$k$h$&$J$N$G$9$,!"C1e(B
e$B=c$K=hM}NL$H;W$o$l$^$9!#e(Bwin32/win32.c
e$B$N%U%!%$%k0l$D$G$O5/$-$^$;$s!#e(B
e$B3NG’$7$?%7%9%F%`$Oe(B
Vine Linux 3.2 glibc-2.3.3-3vl1.3
Vine Linux 4.1 glibc-2.3.4-2vl3
e$B$G$9!#e(B
Ruby
e$B$N%=!<%9%3!<%I%l%Y%k$N$b$N$r07$C$F5$$,IU$$$?$N$G$9$,!"$$$D$4$m$+e(B
e$B$i$+e(B?
e$B$H$$$&$N$O$O$C$-$j$7$^$;$s!#IaCJ$+$i;H$C$F$$$k%9%/%j%W%H$G5/$-$?e(B
e$B$N$G$9$,!“07$&NL$K0MB8$7$F$$$k$h$&$J$N$G!”$O$C$-$j$7$^$;$s$G$9!#$9$$$^e(B
e$B$;$s!#e(B