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

ruby-changes:15718

From: nobu <ko1@a...>
Date: Thu, 6 May 2010 17:17:01 +0900 (JST)
Subject: [ruby-changes:15718] Ruby:r27641 (trunk): * time.c (rb_localtime_r2): get rid of infinite loop bug of

nobu	2010-05-06 17:16:45 +0900 (Thu, 06 May 2010)

  New Revision: 27641

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

  Log:
    * time.c (rb_localtime_r2): get rid of infinite loop bug of
      localtime() on x86_64-darwin.  [ruby-core:30031]

  Modified files:
    trunk/ChangeLog
    trunk/time.c

Index: time.c
===================================================================
--- time.c	(revision 27640)
+++ time.c	(revision 27641)
@@ -863,6 +863,9 @@
 static struct tm *
 rb_localtime_r2(const time_t *t, struct tm *result)
 {
+#if defined __APPLE__ && defined __LP64__
+    if (*t != (time_t)(int)*t) return NULL;
+#endif
     result = rb_localtime_r(t, result);
 #if defined(HAVE_MKTIME) && defined(LOCALTIME_OVERFLOW_PROBLEM)
     if (result) {
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27640)
+++ ChangeLog	(revision 27641)
@@ -1,3 +1,8 @@
+Thu May  6 17:16:42 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* time.c (rb_localtime_r2): get rid of infinite loop bug of
+	  localtime() on x86_64-darwin.  [ruby-core:30031]
+
 Thu May  6 15:56:12 2010  Aaron Patterson <aaron@t...>
 
 	* ext/fiddle/*: Adding fiddle library to wrap libffi

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

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