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

ruby-changes:16724

From: mame <ko1@a...>
Date: Thu, 22 Jul 2010 22:14:14 +0900 (JST)
Subject: [ruby-changes:16724] Ruby:r28720 (ruby_1_9_2): merge revision(s) 28716:

mame	2010-07-22 22:13:57 +0900 (Thu, 22 Jul 2010)

  New Revision: 28720

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

  Log:
    merge revision(s) 28716:
    
    * thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory
      must be called even when pthread_getattr_np is used.
      [ruby-core:31269]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/thread_pthread.c

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28719)
+++ ruby_1_9_2/ChangeLog	(revision 28720)
@@ -1,3 +1,9 @@
+Thu Jul 22 22:13:48 2010  Yusuke Endoh  <mame@t...>
+
+	* thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory
+	  must be called even when pthread_getattr_np is used.
+	  [ruby-core:31269]
+
 Wed Jul 21 12:39:15 2010  Yusuke Endoh  <mame@t...>
 
 	* lib/cmath.rb (CMath#cbrt): cbrt should accept a negative real
Index: ruby_1_9_2/thread_pthread.c
===================================================================
--- ruby_1_9_2/thread_pthread.c	(revision 28719)
+++ ruby_1_9_2/thread_pthread.c	(revision 28720)
@@ -234,9 +234,7 @@
 # endif
     CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
     *size -= guard;
-# ifndef HAVE_PTHREAD_GETATTR_NP
     pthread_attr_destroy(&attr);
-# endif
 #elif defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP
     pthread_t th = pthread_self();
     *addr = pthread_get_stackaddr_np(th);

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

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