Author: zoltan
Date: 2005-06-19 05:59:53 -0400 (Sun, 19 Jun 2005)
New Revision: 46213
Modified:
branches/mono-1-1-8/mono/libgc/ChangeLog
branches/mono-1-1-8/mono/libgc/pthread_support.c
Log:
Merge from HEAD.
Modified: branches/mono-1-1-8/mono/libgc/ChangeLog
===================================================================
--- branches/mono-1-1-8/mono/libgc/ChangeLog 2005-06-19 09:57:57 UTC (rev
46212)
+++ branches/mono-1-1-8/mono/libgc/ChangeLog 2005-06-19 09:59:53 UTC (rev
46213)
@@ -1,3 +1,7 @@
+2005-06-17 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * pthread_support.c: Workaround gcc-3.3 compiler bug.
+
2005-05-26 Sebastien Pouliot <[EMAIL PROTECTED]>
* libgc.vcproj: Project file for libgc.
Modified: branches/mono-1-1-8/mono/libgc/pthread_support.c
===================================================================
--- branches/mono-1-1-8/mono/libgc/pthread_support.c 2005-06-19 09:57:57 UTC
(rev 46212)
+++ branches/mono-1-1-8/mono/libgc/pthread_support.c 2005-06-19 09:59:53 UTC
(rev 46213)
@@ -556,15 +556,38 @@
volatile GC_thread GC_threads[THREAD_TABLE_SZ];
+/*
+ * gcc-3.3.6 miscompiles the &GC_thread_key+sizeof(&GC_thread_key) expression
so
+ * put it into a separate function.
+ */
+# ifdef __GNUC__
+static __attribute__((noinline)) unsigned char* get_gc_thread_key_addr
GC_PROTO((void))
+{
+ return (unsigned char*)&GC_thread_key;
+}
+
void GC_push_thread_structures GC_PROTO((void))
{
GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
+ GC_push_all((ptr_t)get_gc_thread_key_addr(),
+ (ptr_t)(get_gc_thread_key_addr())+sizeof(&GC_thread_key));
+# endif
+}
+
+#else
+
+void GC_push_thread_structures GC_PROTO((void))
+{
+ GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
+# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
GC_push_all((ptr_t)(&GC_thread_key),
(ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
# endif
}
+#endif
+
#ifdef THREAD_LOCAL_ALLOC
/* We must explicitly mark ptrfree and gcj free lists, since the free */
/* list links wouldn't otherwise be found. We also set them in the */
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches