From: yamamoto madoka Date: 2003-06-27T14:39:34+09:00 Subject: [ruby-dev:20471] Re: 原因不明のSEGV 山本です。 こちらも、直っているようです。 手元の環境では、再現しなくなりました。 調べてる途中気づいたのですが、 ruby-list:36161 のバグももしかしたら同じ原因かもしれません。  エラーメッセージが   [BUG] gc_sweep(): unknown data type 52(手元ではtype 48でした)  ElectricFence付きだと落ちるところが #0 mark_locations_array (x=0x44a84000, n=0) at gc.c:505 という点が一緒でした。 > > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread 1024 (LWP 24325)] > > mark_locations_array (x=0x4616f2dc, n=0) at gc.c:505 > > 505 { > > (gdb) bt > > #0 mark_locations_array (x=0x4616f2dc, n=0) at gc.c:505 > > #1 0x08061349 in thread_mark (th=0x41f5dd54) at eval.c:8020 > > ここで、th->stk_ptrとth->stk_lenおよびth->stk_ptr[th->stk_len] > の値はどうなってるでしょうか。 (gdb) p th->stk_ptr $1 = (VALUE *) 0x461be5cc (gdb) p th->stk_len $2 = 2701 (gdb) p th->stk_ptr[th->stk_len] $3 = 0 となっていました。 th全部も乗せておきます。 (gdb) p *(struct thread *)th $4 = {next = 0x46184d54, prev = 0x46184d54, context = {{__jmpbuf = {1073859392, 1106926932, 1106926932, -1073754168, -1073754656, 134618401}, __mask_was_saved = 0, __saved_mask = {__val = {0 }}}}, result = 0, stk_len = 2701, stk_max = 2701, stk_ptr = 0x461be5cc, stk_pos = 0xbfffcda8, frame = 0xbfffd210, scope = 0x400e5394, dyna_vars = 0x0, block = 0x0, iter = 0xbfffd138, tag = 0xbfffdf00, klass = 1074847704, wrapper = 0, cref = 0x400e6604, flags = 0, node = 0x400f8d68, tracing = 0, errinfo = 4, last_status = 1074681124, last_line = 4, last_match = 4, safe = 0, status = THREAD_STOPPED, wait_for = 1, fd = 5, readfds = {__fds_bits = {0 }}, writefds = {__fds_bits = { 0 }}, exceptfds = {__fds_bits = {0 }}, select_value = 0, delay = 0, join = 0x0, abort = 0, priority = 0, gid = 1, locals = 0x45f57ff0, thread = 1074823644} 正直このバグにはかなり困っていたのでとても助かりました。 ruby-dev:20351の件と合わせ、お礼申し上げます。 山本 円 dan@xa2.so-net.ne.jp