This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR 29068
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 14 Sep 2006 11:54:37 -0600
- Subject: Patch: FYI: PR 29068
- Reply-to: tromey at redhat dot com
I'm checking this in.
This is the minimal patch to fix PR 29068. A better fix will be
possible when we import GC 7, but that won't happen until after 4.2.
Tom
Index: libjava/ChangeLog
from Tom Tromey <tromey@redhat.com>
PR boehm-gc/29068:
* boehm.cc (_Jv_GCAttachThread): Disable on Solaris.
(_Jv_GCDetachThread): Likewise.
Index: boehm-gc/ChangeLog
from Tom Tromey <tromey@redhat.com>
PR boehm-gc/29068.
* misc.c (GC_init_inner): Don't use GC_get_thread_stack_base on
Solaris.
Index: boehm-gc/misc.c
===================================================================
--- boehm-gc/misc.c (revision 116849)
+++ boehm-gc/misc.c (working copy)
@@ -674,7 +674,7 @@
# if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \
|| defined(GC_SOLARIS_THREADS)
if (GC_stackbottom == 0) {
- # ifdef GC_PTHREADS
+ # if defined(GC_PTHREADS) && ! defined(GC_SOLARIS_THREADS)
/* Use thread_stack_base if available, as GC could be initialized from
a thread that is not the "main" thread. */
GC_stackbottom = GC_get_thread_stack_base();
Index: libjava/boehm.cc
===================================================================
--- libjava/boehm.cc (revision 116891)
+++ libjava/boehm.cc (working copy)
@@ -701,7 +701,8 @@
{
// The registration interface is only defined on posixy systems and
// only actually works if pthread_getattr_np is defined.
-#ifdef HAVE_PTHREAD_GETATTR_NP
+ // FIXME: until gc7 it is simpler to disable this on solaris.
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
GC_register_my_thread ();
#endif
}
@@ -709,7 +710,7 @@
void
_Jv_GCDetachThread ()
{
-#ifdef HAVE_PTHREAD_GETATTR_NP
+#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
GC_unregister_my_thread ();
#endif
}