Project

General

Profile

Actions

Bug #7570

closed

rb_fatal() in Fiber don't terminate process

Added by nagachika (Tomoyuki Chikanaga) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-12-16 trunk 38414) [x86_64-darwin10.8.0]
Backport:
[ruby-core:50917]

Description

rb_fatal() (C function) should terminate whole script.

Thread.start{
rb_fatal() # a extension library method calling rb_fatal()
}.resume
p :ng # => never reached here

But rb_fatal() inside Fiber could be ignored.

Fiber.start{
rb_fatal()
}.resume
p :ng # => reached here!

I think it's because TAG_FATAL is ignored in rb_vm_make_jump_tag_but_local_jump().
I'll attach a patch with a testcase.


Files

fatal_in_fiber.patch (1.63 KB) fatal_in_fiber.patch nagachika (Tomoyuki Chikanaga), 12/16/2012 02:01 AM

Updated by ko1 (Koichi Sasada) about 12 years ago

  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 2.0.0

Thank you for your report.

Your patch seems good and passed test-all on my environment.
Could you commit it?

Updated by nagachika (Tomoyuki Chikanaga) about 12 years ago

  • Status changed from Open to Closed

Thank you for your review.
I've committed at r38441.

Actions

Also available in: Atom PDF

Like0
Like0Like0