e$BEOJUE/Li$G$9!#e(B
SEGV e$B$7$F$$$k$N$G$*CN$i$;$7$^$9!#=EJ#$7$F$$$?$i$9$$$^$;e(B
e$B$s$G$9!#e(B
ruby 1.9.0 (2008-10-24 revision 19913) [i686-linux]
e$B:F8=%9%/%j%W%H$G$9!#e(B
e$B:F8=J}K!$O!“F~NO9T$,e(B 82 e$B9T$”$k$H:F8=$7$F$$$^$9!#e(B
#! /usr/local/bin/ruby -Ke
-- mode:ruby; coding:euc-jp --
/tmp/j.rb
created: October 23,2008 Thursday 06:09:10
author: tetsu(WATANABE Tetsuya)
$Id$
usage:
require ‘nkf’
while l = gets
p $.
l = NKF.nkf(’-e’, l)
if l =~ /^a/ # j.rb:14
end
end
e$B<!$N<B9T;~$O!"%-!<%!<%I$+$i2~9T$re(B 82 e$B2sBG$A9~$_$^$7$?!#e(B
81
82
j.rb:14: [BUG] Segmentation fault
ruby 1.9.0 (2008-10-24 revision 19913) [i686-linux]
– control frame ----------
c:0003 p:0060 s:0007 b:0007 l:000006 d:000006 TOP j.rb:14
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17
DBG> : “j.rb:14:in `’”
– backtrace of native function call (Use addr2line) –
0x80f7e67
0x811b242
0x811b26e
0x80b8788
0x4002d02d
0x400ff900
0x80efeb7
0x80efeff
0x80f6a34
0x80f16d9
0x80ec577
0x80f42a4
0x80f4610
0x805a499
0x805a4fd
0x8059316
0x400ecc1f
0x8059239
zsh: 15680 abort (core dumped) ruby -Ke j.rb
gdb e$B$K$h$j%P%C%/%H%l!<%9$G$9!#e(B
#0 0x400ffc11 in kill () from /lib/i686/libc.so.6
#1 0x4002a341 in pthread_kill () from /lib/i686/libpthread.so.0
#2 0x4002a6bb in raise () from /lib/i686/libpthread.so.0
#3 0x400ff8a4 in raise () from /lib/i686/libc.so.6
#4 0x40101008 in abort () from /lib/i686/libc.so.6
#5 0x0811b273 in rb_bug () at error.c:226
#6 0x080b8788 in sigpipe (sig=11) at signal.c:545
#7 0x4002d02d in __pthread_clock_settime () from
/lib/i686/libpthread.so.0
#8 0x400ff900 in killpg () from /lib/i686/libc.so.6
#9 0x080efeb7 in search_method (klass=1073937284, id=1073946176,
klassp=0x0) at vm_method.c:227
#10 0x080efeff in rb_get_method_body (klass=143217460, id=332,
idp=0xbffff1b8) at vm_method.c:254
#11 0x080f6a34 in rb_call0 (klass=143217460, recv=143217720, mid=332,
argc=1, argv=0xbffff1f0, scope=1, self=6) at vm_eval.c:210
#12 0x080f16d9 in rb_funcall (recv=143217720, mid=332, n=1) at
vm_eval.c:260
#13 0x080ec577 in vm_exec_core (th=0x817aef0, initial=0) at
insns.def:1981
#14 0x080f42a4 in vm_exec (th=0x817aef0) at vm.c:1041
#15 0x080f4610 in rb_iseq_eval (iseqval=135781500) at vm.c:1246
#16 0x0805a499 in ruby_exec_node (n=0x817dc7c, file=0x0) at eval.c:205
#17 0x0805a4fd in ruby_run_node (n=0x817dc7c) at eval.c:233
#18 0x08059316 in main (argc=3, argv=0xbffff664) at main.c:35
#19 0x400ecc1f in __libc_start_main () from /lib/i686/libc.so.6
e$B$h$m$7$/$*4j$$$7$^$9!#e(B
19892 e$B$/$i$$$K5$$,IU$-$^$7$?!#%l%]!<%H$,CY$/$J$j$9$$$^e(B
e$B$;$s!#e(B