From: "Toshihiko SHIMOKAWA / 下川俊彦" Date: 1999-08-19T15:02:25+09:00 Subject: [ruby-list:16218] ruby-1.4.0 [BUG] Segmentation fault ruby-1.4.0 が Segmentation fault で落ちちゃいました。OS は FreeBSD 3.1-RELEASE です。 -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- ./DNS.rb:251: [BUG] Segmentation fault zsh: abort (core dumped) sudo ./tenbin -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- DNS.rb の 250行前後はこんな感じです。ここを実行する度に問題が出るわけで はありません。残念ながら Segmentation fault が落ちる条件は掴みきれていま せん。 -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- 246 def parseQuestion(mesg) 247 parsedAnswer = Array.new 248 counter = Array.new(3) 249 id, flags, qdcount, counter[0], counter[1], counter[2] = 250 mesg[0, 12].unpack('nnnnnn') 251 parsedAnswer << [ id, flags ] 252 -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- ruby の core を where した結果は以下のとおりです。 -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- (gdb) where #0 0x2810bc44 in _kill () #1 0x2813fcf4 in abort () #2 0x809e840 in rb_check_type (x=134929803, t=-272651804) at error.c:154 #3 0x808b421 in sigsegv (sig=11) at signal.c:377 #4 #5 0x808d34a in st_lookup (table=0x8282da0, key=0x14f
, value=0xefbfaa04) at st.c:216 #6 0x804f99a in search_method (klass=135987812, id=335, origin=0xefbfaa2c) at eval.c:150 #7 0x804f9e2 in rb_get_method_body (klassp=0xefbfaa64, idp=0xefbfaa58, noexp=0xefbfaa54) at eval.c:171 #8 0x8057295 in rb_call (klass=135987812, recv=135987832, mid=335, argc=1, argv=0xefbfaa7c, scope=0) at eval.c:3984 #9 0x80533d0 in rb_eval (self=135095156, node=0x80daa28) at eval.c:2183 #10 0x805206a in rb_eval (self=135095156, node=0x80daa00) at eval.c:1740 #11 0x8057051 in rb_call0 (klass=135142756, recv=135095156, id=8433, argc=0, argv=0xefbfafcc, body=0x80dadc0, nosuper=0) at eval.c:3917 #12 0x8057378 in rb_call (klass=135142756, recv=135095156, mid=8433, argc=1, argv=0xefbfafc8, scope=0) at eval.c:4007 #13 0x80533d0 in rb_eval (self=136170652, node=0x80e3f88) at eval.c:2183 #14 0x8053c8e in rb_eval (self=136170652, node=0x80e3fd8) at eval.c:2322 #15 0x805206a in rb_eval (self=136170652, node=0x80e3f60) at eval.c:1740 #16 0x8057051 in rb_call0 (klass=135062816, recv=136170652, id=8417, argc=0, argv=0xefbfb728, body=0x80e403c, nosuper=0) at eval.c:3917 #17 0x8057378 in rb_call (klass=135062816, recv=136170652, mid=8417, argc=3, argv=0xefbfb71c, scope=1) at eval.c:4007 #18 0x80533d0 in rb_eval (self=136170652, node=0x80e462c) at eval.c:2183 #19 0x805206a in rb_eval (self=136170652, node=0x80e4500) at eval.c:1740 #20 0x805595f in rb_yield_0 (val=135987992, self=136170652, klass=0, acheck=0) at eval.c:3189 #21 0x805c47d in rb_thread_yield (arg=0, th=0x84f1500) at eval.c:7046 #22 0x805c2f5 in rb_thread_create_0 (fn=0x805c458 , arg=0x0, klass=135190696) at eval.c:6995 #23 0x805c4af in rb_thread_start (klass=135190696) at eval.c:7056 #24 0x805689b in call_cfunc (func=0x805c484 , recv=135190696, len=0, argc=0, argv=0x0) at eval.c:3677 #25 0x8056d1a in rb_call0 (klass=135190676, recv=135190696, id=5113, argc=0, argv=0x0, body=0x80ed858, nosuper=1) at eval.c:3813 #26 0x8057378 in rb_call (klass=135190676, recv=135190696, mid=5113, argc=0, argv=0x0, scope=0) at eval.c:4007 #27 0x80533d0 in rb_eval (self=136170652, node=0x80e46cc) at eval.c:2183 #28 0x80526f7 in rb_eval (self=136170652, node=0x80e44c4) at eval.c:1932 #29 0x805206a in rb_eval (self=136170652, node=0x80e449c) at eval.c:1740 #30 0x805595f in rb_yield_0 (val=4, self=136170652, klass=0, acheck=0) at eval.c:3189 #31 0x8055abd in rb_f_loop () at eval.c:3235 #32 0x805689b in call_cfunc (func=0x8055aac , recv=136170652, len=0, argc=0, argv=0x0) at eval.c:3677 #33 0x8056d1a in rb_call0 (klass=135208076, recv=136170652, id=3585, argc=0, argv=0x0, body=0x80f06d4, nosuper=1) at eval.c:3813 #34 0x8057378 in rb_call (klass=135208076, recv=136170652, mid=3585, argc=0, argv=0x0, scope=2) at eval.c:4007 #35 0x80533d0 in rb_eval (self=136170652, node=0x80e4a28) at eval.c:2183 #36 0x80526f7 in rb_eval (self=136170652, node=0x80e435c) at eval.c:1932 #37 0x805206a in rb_eval (self=136170652, node=0x80e4320) at eval.c:1740 #38 0x8057051 in rb_call0 (klass=135062816, recv=136170652, id=8361, argc=0, argv=0x0, body=0x80e4334, nosuper=0) at eval.c:3917 #39 0x8057378 in rb_call (klass=135062816, recv=136170652, mid=8361, argc=0, argv=0x0, scope=2) at eval.c:4007 #40 0x80533d0 in rb_eval (self=136170652, node=0x80e2e30) at eval.c:2183 #41 0x8057051 in rb_call0 (klass=135062816, recv=136170652, id=5193, argc=0, argv=0x0, body=0x80e2e08, nosuper=0) at eval.c:3917 #42 0x8057378 in rb_call (klass=135062816, recv=136170652, mid=5193, argc=0, argv=0x0, scope=0) at eval.c:4007 #43 0x80533d0 in rb_eval (self=135204556, node=0x80e566c) at eval.c:2183 #44 0x8050984 in eval_node (self=135204556) at eval.c:987 #45 0x8050a64 in ruby_run () at eval.c:1023 #46 0x804f868 in main (argc=2, argv=0xefbfd2a8, envp=0xefbfd2b4) at main.c:39 #47 0x804f7e1 in _start () -=-=- cut here -=-=- cut here -=-=- cut here -=-=- cut here -=-=- -- としちゃん // toshi@csce.kyushu-u.ac.jp, toshi@tea.forus.or.jp