Bug #7570

rb_fatal() in Fiber don't terminate process

Added by Tomoyuki Chikanaga over 1 year ago. Updated over 1 year ago.

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

Description

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

Thread.start{
rbfatal() # a extension library method calling rbfatal()
}.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 TAGFATAL is ignored in rbvmmakejumptagbutlocaljump().
I'll attach a patch with a testcase.

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

History

#1 Updated by Koichi Sasada over 1 year ago

  • Assignee set to 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?

#2 Updated by Tomoyuki Chikanaga over 1 year ago

  • Status changed from Open to Closed

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

Also available in: Atom PDF