[Mono-bugs] [Bug 75498][Nor] New - Libgc - GCC workaround breaks
non-linux build
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jul 7 02:45:24 EDT 2005
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 flashdict at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75498
--- shadow/75498 2005-07-07 02:45:24.000000000 -0400
+++ shadow/75498.tmp.873 2005-07-07 02:45:24.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 75498
+Product: Mono: Runtime
+Version: unspecified
+OS: other
+OS Details: FreeBSD (all)
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: GC
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: flashdict at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Libgc - GCC workaround breaks non-linux build
+
+Description of Problem:
+
+At (or about) line 560 of libgc/pthread_support.c (46962) is a function
+which has been defined for __GNUC__, which is named
+get_gc_thread_key_addr(). This function is needed due to miscompilaton
+problems from gcc 3.3.6. Unfortunately, the definition is not restrictive
+enough, only specifying __GNUC__, and breaks the BSD build - presumably
+along with others who define __GNUC__ but not THREAD_LOCAL_ALLOC.
+
+Since the function is only called in the case where THREAD_LOCAL_ALLOC is
+true and DBG_HDRS_ALL is false, the following patch should be acceptable:
+
+Index: pthread_support.c
+===================================================================
+--- pthread_support.c (revision 47008)
++++ pthread_support.c (working copy)
+@@ -560,7 +560,7 @@
+ * gcc-3.3.6 miscompiles the &GC_thread_key+sizeof(&GC_thread_key)
+expression so
+ * put it into a separate function.
+ */
+-# ifdef __GNUC__
++# if defined(__GNUC__) && defined(THREAD_LOCAL_ALLOC) &&
+!defined(DBG_HDRS_ALL)
+ static __attribute__((noinline)) unsigned char* get_gc_thread_key_addr
+GC_PROTO((void))
+ {
+ return (unsigned char*)&GC_thread_key;
More information about the mono-bugs
mailing list