summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 04:40:01 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 04:40:01 +0000
commit874127452910c0e8ef2f92923b00d0d318520f7f (patch)
treec4d44064cd44b3a502593da9be57505cb1590b06 /eval.c
parent4ad2d02a49b0ec009599c3a2c8683bd45119792b (diff)
* thread.c (thread_unlock_all_locking_mutexes): rename to
rb_threadptr_unlock_all_locking_mutexes and remove static. * vm_core.h: add rb_threadptr_unlock_all_locking_mutexes declaration. * thread.c (thread_start_func_2): adjust the above rename. * eval.c (ruby_cleanup): call rb_threadptr_unlock_all_locking_mutexes again after finalizer. [Bug #4988] [ruby-dev:44049] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index feb543d461..783335d9d9 100644
--- a/eval.c
+++ b/eval.c
@@ -145,6 +145,9 @@ ruby_cleanup(volatile int ex)
th->errinfo = errs[1];
ex = error_handle(ex);
ruby_finalize_1();
+
+ /* unlock again if finalizer took mutexes. */
+ rb_threadptr_unlock_all_locking_mutexes(GET_THREAD());
POP_TAG();
rb_thread_stop_timer_thread(1);