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

ruby-changes:3322

From: ko1@a...
Date: 31 Dec 2007 22:57:11 +0900
Subject: [ruby-changes:3322] matz - Ruby:r14815 (trunk): * thread_pthread.c (native_sleep): timespec tv_sec may overflow on

matz	2007-12-31 22:56:42 +0900 (Mon, 31 Dec 2007)

  New Revision: 14815

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c

  Log:
    * thread_pthread.c (native_sleep): timespec tv_sec may overflow on
      some platform.  a patch from zunda <zunda616e AT yahoo.co.jp> in 
      [ruby-dev:32904].

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14815&r2=14814
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread_pthread.c?r1=14815&r2=14814

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14814)
+++ ChangeLog	(revision 14815)
@@ -1,3 +1,9 @@
+Mon Dec 31 22:53:29 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* thread_pthread.c (native_sleep): timespec tv_sec may overflow on
+	  some platform.  a patch from zunda <zunda616e AT yahoo.co.jp> in 
+	  [ruby-dev:32904].
+
 Mon Dec 31 19:35:20 2007  Tanaka Akira  <akr@f...>
 
 	* string.c (IS_7BIT): removed.
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 14814)
+++ thread_pthread.c	(revision 14815)
@@ -432,7 +432,7 @@
 	    thread_debug("native_sleep: interrupted before sleep\n");
 	}
 	else {
-	    if (tv == 0) {
+	    if (tv == 0 || ts.tv_sec < tvn.tv_sec /* overflow */ ) {
 		thread_debug("native_sleep: pthread_cond_wait start\n");
 		pthread_cond_wait(&th->native_thread_data.sleep_cond,
 				  &th->interrupt_lock);

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

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