From 6a35c26b2dfbd2a516e450e916eb8d13c3ff5ddf Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 22 Dec 2012 06:45:28 +0000 Subject: * cont.c (rb_fiber_start): in case of jump with TAG_FATAL, enqueue error into async_errinfo_queue, because you cannot call TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993] * thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL) can be popped from async_errinfo_queue. * vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441. rb_vm_make_jump_tag_but_local_jump() shouldn't return exception in case of state == TAG_FATAL. * test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate Thread.exit should terminate current Thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index efc675fd8b..86a4349775 100644 --- a/thread.c +++ b/thread.c @@ -1834,8 +1834,9 @@ rb_threadptr_execute_interrupts(rb_thread_t *th, int blocking_timing) if (err == Qundef) { /* no error */ } - else if (err == eKillSignal /* Thread#kill receieved */ || - err == eTerminateSignal /* Terminate thread */ ) { + else if (err == eKillSignal /* Thread#kill receieved */ || + err == eTerminateSignal /* Terminate thread */ || + err == INT2FIX(TAG_FATAL) /* Thread.exit etc. */ ) { rb_threadptr_to_kill(th); } else { -- cgit v1.2.3