[Mono-bugs] [Bug 74223][Maj] Changed - memory leaks when creating threads on solaris
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 6 Apr 2005 12:28:35 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by jan.reitz@lanxess.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74223
--- shadow/74223 2005-04-06 12:11:17.000000000 -0400
+++ shadow/74223.tmp.29516 2005-04-06 12:28:35.000000000 -0400
@@ -10,12 +10,13 @@
Component: remoting
AssignedTo: vargaz@gmail.com
ReportedBy: jan.reitz@lanxess.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
+Cc:
Summary: memory leaks when creating threads on solaris
Maybe this Bug is for GC or for remoting.... had to choose one, so its now here
sorry for my english in advance
@@ -222,6 +223,53 @@
------- Additional Comments From jan.reitz@lanxess.com 2005-04-06 12:11 -------
can you tell me how and where so i can patch my local version...
i havnt used svn and would like to stick to release versions
+
+------- Additional Comments From jan.reitz@lanxess.com 2005-04-06 12:28 -------
+think i found it myself,
+is it that ?
+
+--- trunk/mono/libgc/solaris_pthreads.c 2004/11/11 02:30:00 35994
++++ trunk/mono/libgc/solaris_pthreads.c 2005/04/06 14:21:51 42607
+@@ -63,6 +63,22 @@
+ return GC_thr_join((thread_t)wait_for, NULL, status);
+ }
+
++int GC_pthread_detach(pthread_t thread)
++{
++ GC_thread t;
++
++ LOCK();
++ t=GC_lookup_thread(thread);
++ UNLOCK();
++ if (t) {
++ LOCK();
++ t->flags |= DETACHED;
++ UNLOCK();
++ return 0;
++ }
++ else
++ return pthread_detach(thread);
++}
+
+ int
+ GC_pthread_create(pthread_t *new_thread,
+
+--- trunk/mono/libgc/include/gc_pthread_redirects.h 2004/11/11
+02:30:00 35994
++++ trunk/mono/libgc/include/gc_pthread_redirects.h 2005/04/06
+14:04:22 42606
+@@ -35,8 +35,10 @@
+ const pthread_attr_t *attr,
+ void * (*thread_execp)(void *), void *arg);
+ extern int GC_pthread_join(pthread_t wait_for, void **status);
++ extern int GC_pthread_detach(pthread_t thread);
+ # define pthread_join GC_pthread_join
+ # define pthread_create GC_pthread_create
++# define pthread_detach GC_pthread_detach
+ #endif
+
+ #if defined(GC_SOLARIS_PTHREADS) || defined(GC_SOLARIS_THREADS)
+