public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: Fix bug 27170
@ 2006-04-20 23:54 Bryce McKinlay
  0 siblings, 0 replies; 4+ messages in thread
From: Bryce McKinlay @ 2006-04-20 23:54 UTC (permalink / raw)
  To: Java Patches

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

This is a variant on Anthony Green's patch to fix PR 27170, a deadlock 
in Boehm GC during dlopen(). Instead if calling GC_dlopen directly, this 
patch includes the gc.h header which will override dlopen.

I'm checking this in to HEAD and the 4.1 branch.

Bryce



[-- Attachment #2: libgcj-PR27170.patch --]
[-- Type: text/x-patch, Size: 674 bytes --]

2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>

        PR libgcj/27170
        * gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h to override
        dlopen(). From Anthony Green.

Index: gnu/gcj/runtime/natSharedLibLoader.cc
===================================================================
--- gnu/gcj/runtime/natSharedLibLoader.cc	(revision 113122)
+++ gnu/gcj/runtime/natSharedLibLoader.cc	(working copy)
@@ -10,6 +10,11 @@
 
 #include <config.h>
 
+// If we're using the Boehm GC, then we need this include to override dlopen.
+#ifdef HAVE_BOEHM_GC
+#include <gc.h>
+#endif /* HAVE_BOEHM_GC */
+
 #include <gcj/cni.h>
 #include <jvm.h>
 #include <execution.h>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: Fix bug 27170
  2006-04-25 15:09 ` Tom Tromey
@ 2006-04-25 15:50   ` Rutger Ovidius
  0 siblings, 0 replies; 4+ messages in thread
From: Rutger Ovidius @ 2006-04-25 15:50 UTC (permalink / raw)
  To: Tom Tromey; +Cc: java-patches, Bryce McKinlay

Tuesday, April 25, 2006, 8:01:51 AM, you wrote:

>>>>>> "Rutger" == Rutger Ovidius <r_ovidius@eml.cc> writes:

Rutger>> This patch breaks bootstrap on mingw. Somehow it pulls in windef.h
Rutger>> which causes a #define STRICT 1, which breaks Modifier.h:

TT> I'm checking this in.  I think it will fix the problem, because
TT> platform.h (included from cni.h) on Windows has '#undef STRICT'.
TT> I also moved the gc.h include a bit later.

TT> Let me know if this works for you.

WORKSFORME, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: Fix bug 27170
  2006-04-24 17:46 Rutger Ovidius
@ 2006-04-25 15:09 ` Tom Tromey
  2006-04-25 15:50   ` Rutger Ovidius
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2006-04-25 15:09 UTC (permalink / raw)
  To: Rutger Ovidius; +Cc: java-patches, Bryce McKinlay

>>>>> "Rutger" == Rutger Ovidius <r_ovidius@eml.cc> writes:

Rutger> This patch breaks bootstrap on mingw. Somehow it pulls in windef.h
Rutger> which causes a #define STRICT 1, which breaks Modifier.h:

I'm checking this in.  I think it will fix the problem, because
platform.h (included from cni.h) on Windows has '#undef STRICT'.
I also moved the gc.h include a bit later.

Let me know if this works for you.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h later.
	Include platform.h.  Set GC_DEBUG before including gc.h, if
	needed.

Index: gnu/gcj/runtime/natSharedLibLoader.cc
===================================================================
--- gnu/gcj/runtime/natSharedLibLoader.cc	(revision 113226)
+++ gnu/gcj/runtime/natSharedLibLoader.cc	(working copy)
@@ -1,6 +1,6 @@
 // natSharedLibLoader.cc - Implementation of SharedLibHelper native methods.
 
-/* Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation
+/* Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -9,12 +9,8 @@
 details.  */
 
 #include <config.h>
+#include <platform.h>
 
-// If we're using the Boehm GC, then we need this include to override dlopen.
-#ifdef HAVE_BOEHM_GC
-#include <gc.h>
-#endif /* HAVE_BOEHM_GC */
-
 #include <gcj/cni.h>
 #include <jvm.h>
 #include <execution.h>
@@ -24,6 +20,15 @@
 #include <java/lang/UnsupportedOperationException.h>
 #include <java/lang/UnknownError.h>
 
+// If we're using the Boehm GC, then we need this include to override dlopen.
+#ifdef HAVE_BOEHM_GC
+// Set GC_DEBUG before including gc.h!
+#ifdef LIBGCJ_GC_DEBUG
+# define GC_DEBUG
+#endif
+#include <gc.h>
+#endif /* HAVE_BOEHM_GC */
+
 #ifdef HAVE_DLOPEN
 #include <dlfcn.h>
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch: Fix bug 27170
@ 2006-04-24 17:46 Rutger Ovidius
  2006-04-25 15:09 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Rutger Ovidius @ 2006-04-24 17:46 UTC (permalink / raw)
  To: java-patches; +Cc: Bryce McKinlay

This patch breaks bootstrap on mingw. Somehow it pulls in windef.h
which causes a #define STRICT 1, which breaks Modifier.h:

./java/lang/reflect/Modifier.h:41: error: expected unqualified-id before numeric constant

Moving the "#include <gc.h>" right after the line #include <gcj/cni.h>, makes everything
work again.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-25 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 23:54 Patch: Fix bug 27170 Bryce McKinlay
2006-04-24 17:46 Rutger Ovidius
2006-04-25 15:09 ` Tom Tromey
2006-04-25 15:50   ` Rutger Ovidius

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).