なかだです。

At Tue, 5 Jun 2007 00:00:38 +0900,
sheepman wrote in [ruby-dev:30888]:
> Fiber のブロックの中で return を呼ぶと segv します。

[ruby-dev:30889]も原因は同じだと思います。


Index: cont.c =================================================================== --- cont.c (revision 12440) +++ cont.c (working copy) @@ -437,5 +437,5 @@ rb_fiber_start(void) if (state) { - th->thrown_errinfo = th->errinfo; + th->thrown_errinfo = th_make_jump_tag_but_local_jump(state, th->errinfo); th->interrupt_flag = 1; } Index: eval_intern.h =================================================================== --- eval_intern.h (revision 12440) +++ eval_intern.h (working copy) @@ -123,5 +123,5 @@ char *strrchr _((const char *, const cha } \ else { \ - rb_fiber_start(th); \ + rb_fiber_start(); \ } while (0) @@ -194,4 +194,6 @@ VALUE rb_f_eval(int argc, VALUE *argv, V VALUE rb_make_exception _((int argc, VALUE *argv)); +NORETURN(void rb_fiber_start(void)); + NORETURN(void rb_raise_jump _((VALUE))); NORETURN(void print_undef _((VALUE, ID))); @@ -204,4 +206,5 @@ NODE *th_get_cref(rb_thread_t *th, rb_is NODE *th_cref_push(rb_thread_t *th, VALUE, int); NODE *th_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE * cref_stack); +VALUE th_make_jump_tag_but_local_jump(int state, VALUE val); static rb_control_frame_t *
-- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦