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

ruby-changes:49663

From: normal <ko1@a...>
Date: Fri, 12 Jan 2018 09:15:40 +0900 (JST)
Subject: [ruby-changes:49663] normal:r61779 (trunk): thread.c (thread_cleanup_func): document small leak

normal	2018-01-12 09:15:28 +0900 (Fri, 12 Jan 2018)

  New Revision: 61779

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61779

  Log:
    thread.c (thread_cleanup_func): document small leak
    
    It's minor, I haven't analyzed how fixable it is, but we should
    at least note it, here.

  Modified files:
    trunk/thread.c
Index: thread.c
===================================================================
--- thread.c	(revision 61778)
+++ thread.c	(revision 61779)
@@ -554,6 +554,10 @@ thread_cleanup_func(void *th_ptr, int at https://github.com/ruby/ruby/blob/trunk/thread.c#L554
      * Unfortunately, we can't release native threading resource at fork
      * because libc may have unstable locking state therefore touching
      * a threading resource may cause a deadlock.
+     *
+     * FIXME: Skipping native_mutex_destroy(pthread_mutex_destroy) is safe
+     * with NPTL, but native_thread_destroy calls pthread_cond_destroy
+     * which calls free(3), so there is a small memory leak atfork, here.
      */
     if (atfork)
 	return;

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

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