Skip to content

Commit

Permalink
* eval.c (ruby_cleanup): delay THREAD_KILLED timing.
Browse files Browse the repository at this point in the history
  It should be located just before rb_thread_terminate_all().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed Nov 29, 2012
1 parent 3d47e7b commit 98ed344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Thu Nov 29 09:36:09 2012 Koichi Sasada <[email protected]>

* eval.c (ruby_cleanup): delay THREAD_KILLED timing.
It should be located just before rb_thread_terminate_all().

Thu Nov 29 09:10:17 2012 Koichi Sasada <[email protected]>

* vm_backtrace.c (vm_backtrace_to_ary): support range argument
Expand Down
6 changes: 3 additions & 3 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ ruby_cleanup(volatile int ex)
rb_thread_t *th = GET_THREAD();
int nerr;

/* protect from thread.raise */
th->status = THREAD_KILLED;

rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);
PUSH_TAG();
Expand All @@ -180,6 +177,9 @@ ruby_cleanup(volatile int ex)
}
POP_TAG();

/* protect from Thread#raise */
th->status = THREAD_KILLED;

errs[0] = th->errinfo;
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {
Expand Down

0 comments on commit 98ed344

Please sign in to comment.