ささだです。

Yukihiro Matsumoto wrote:
> というか、単なる関数呼出しでsegvするのは納得が行きません。た
> ぶん、inline化されているのでしょう。-Oを下げる、または外すと
> 症状が消えたりしないでしょうか。

 encoding.o を -O0 でやってみたら以下の様になりました。

>                           resolv.rb: c.............ccc........c..............ccccccccccccmmccmc
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to process 28759, thread 0x89083000]
> 0x1c054fdb in match_at (reg=0x7eea7400, str=0x8c796a88 " ", end=0x8c796a89 "",
>     sstart=0x8c796a88 " ", sprev=0x0, msa=0xcf7feb20)
>     at ../trunk/regexec.c:1288
> 1288      STACK_PUSH_ENSURED(STK_ALT, FinishCode);  /* bottom stack */
> (gdb) bt
> #0  0x1c054fdb in match_at (reg=0x7eea7400, str=0x8c796a88 " ",
>     end=0x8c796a89 "", sstart=0x8c796a88 " ", sprev=0x0, msa=0xcf7feb20)
>     at ../trunk/regexec.c:1288
> #1  0x1c0599bd in onig_search (reg=0x7eea7400, str=0x8c796a88 " ",
>     end=0x8c796a89 "", start=0xcf7feb14 "\210jy\214\210jy\214",
>     range=0x8c796a89 "", region=0x3c07cbf8, option=0)
>     at ../trunk/regexec.c:3605
> #2  0x1c049dae in rb_reg_search (re=2125043500, str=2356767360, pos=0,
>     reverse=0) at ../trunk/re.c:1054
> #3  0x1c04b6af in reg_match_pos (re=2125043500, strp=0xcf7fec74, pos=0)
>     at ../trunk/re.c:2175
> #4  0x1c04b708 in rb_reg_match (re=2125043500, str=2356767360)
>     at ../trunk/re.c:2222
> #5  0x1c089ad7 in vm_eval (th=0x8a32e400, initial=0) at insns.def:2029
> #6  0x1c089cce in vm_eval_body (th=0x8a32e400) at ../trunk/vm.c:1148
> #7  0x1c08558b in invoke_block (th=0x8a32e400, block=0x8673bd40,
>     self=2357098940, argc=2, argv=0x7dc5732c, blockptr=0x0)
>     at ../trunk/vm.c:573

-- 
// SASADA Koichi at atdot dot net