From: Minero Aoki Date: 2002-11-03T12:32:13+09:00 Subject: [ruby-dev:18621] Re: racc segv revisited あおきです。 追加です。家では allocated はこんな感じです。 (gdb) run bin.racc --no-extentions src.y Starting program: /usr/local/bin/ruby-1.6.7 bin.racc --no-extentions src.y Program received signal SIGSEGV, Segmentation fault. 0x12008ccd4 in init_regs (regs=0x120104268, num_regs=538837240) at regex.c:3468 3468 regs->beg[i] = regs->end[i] = -1; (gdb) list 3463 TREALLOC(regs->beg, num_regs, int); 3464 TREALLOC(regs->end, num_regs, int); 3465 regs->allocated = num_regs; 3466 } 3467 for (i=0; ibeg[i] = regs->end[i] = -1; 3469 } 3470 } 3471 3472 /* Match the pattern described by BUFP against STRING, which is of (gdb) p regs $1 = (struct re_registers *) 0x120104268 (gdb) p *regs $2 = {allocated = 6353, num_regs = 0, beg = 0x18d1, end = 0x12016cbd8} (gdb) allocated は微妙に壊れてて、beg が破壊されてるみたいです。 ------------------------------------------------------------------- 青木峰郎