[前][次][番号順一覧][スレッド一覧]

ruby-changes:8690

From: nobu <ko1@a...>
Date: Wed, 12 Nov 2008 03:50:07 +0900 (JST)
Subject: [ruby-changes:8690] Ruby:r20225 (ruby_1_8): * eval.c (load_lock): makes circular require deadlock.

nobu	2008-11-12 03:49:45 +0900 (Wed, 12 Nov 2008)

  New Revision: 20225

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20225

  Log:
    * eval.c (load_lock): makes circular require deadlock.
      [ruby-core:19821]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/eval.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20224)
+++ ruby_1_8/ChangeLog	(revision 20225)
@@ -1,3 +1,8 @@
+Wed Nov 12 03:49:42 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* eval.c (load_lock): makes circular require deadlock.
+	  [ruby-core:19821]
+
 Tue Nov 11 23:54:12 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (rb_feature_p): returns found feature name if loading.
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 20224)
+++ ruby_1_8/eval.c	(revision 20225)
@@ -1440,6 +1440,8 @@
 
 int ruby_in_eval;
 
+int rb_thread_join _((VALUE, double));
+
 static void rb_thread_cleanup _((void));
 static void rb_thread_wait_other_threads _((void));
 
@@ -7241,8 +7243,9 @@
 	return (char *)ftptr;
     }
     do {
-	if ((rb_thread_t)th == curr_thread) return 0;
-	CHECK_INTS;
+	rb_thread_t owner = (rb_thread_t)th;
+	if (owner == curr_thread) return 0;
+	rb_thread_join(owner->thread, -1.0);
     } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
     return 0;
 }
@@ -11387,7 +11390,6 @@
 }
 
 static int rb_thread_join0 _((rb_thread_t, double));
-int rb_thread_join _((VALUE, double));
 
 static int
 rb_thread_join0(th, limit)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]