Issue #5993 has been updated by nagachika (Tomoyuki Chikanaga).


Fiber?????? rb_fatal() ?????若??????????????? http://bugs.ruby-lang.org/issues/7570 ???????違?????????宴????????篏?????????障????????
----------------------------------------
Bug #5993: Thread.new{ Fiber.new { Thread.exit }.resume }.join ??т??紊?
https://bugs.ruby-lang.org/issues/5993#change-34770

Author: nagachika (Tomoyuki Chikanaga)
Status: Closed
Priority: Normal
Assignee: nagachika (Tomoyuki Chikanaga)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-02-09 trunk 34514) [x86_64-darwin10.8.0]


篁ヤ???????????? Fiber ?????? Thread.exit ?????????<????祉?若?吾??腥冴?? RuntimeError ?????榊???????障?????

Thread.new{ Fiber.new { Thread.exit }.resume }.join #=> RuntimeError:

rb_fiber_start() ??? Thread.exit ?????? TAG_FATAL ??с?? TAG_JUMP ?????喝???????????????????????????????障??????????????????篁ヤ????????????????????紊???????????????障?????
?????? th->errinfo ??腥??? Qnil ??????????????? th->thrown_errinfo ??? 0 (Qfalse)???腥冴?с????????????腓冴?????篏??c?????????с????????????????????? thrown_errinfo ??? Qnil ?????ャ????????障?c??????(rb_vm_make_jump_tag_but_local_jump() ?????????? Qnil ????)?????????????????????с???????<??????????????????鴻????????????????障?????????????????? thrown_errinfo ???腥冴??????潟?????????????? Qnil ???篏帥??????????????????????????

--- a/cont.c
+++ b/cont.c
@@ -1152,6 +1152,9 @@ rb_fiber_start(void)
        if (state == TAG_RAISE) {
            th->thrown_errinfo = th->errinfo;
        }
+       else if (state == TAG_FATAL && th->errinfo == INT2FIX(TAG_FATAL)) {
+           /* terminating */
+       }
        else {
            th->thrown_errinfo =
              rb_vm_make_jump_tag_but_local_jump(state, th->errinfo);




-- 
http://bugs.ruby-lang.org/