[Gc] Segmentation fault on Mac OSX intel

Boehm, Hans hans.boehm at hp.com
Wed Mar 22 12:34:26 PST 2006


Paolo -

Thanks.

But I don't understand this patch.  It may reflect a divergence in the
Mono source tree.  GC_config_macros.h should, and appears to, define
GC_PTHREADS if GC_DARWIN_THREADS is set.  And I think that
GC_MACOSX_THREADS should no longer be used at all.  GC_PTHREADS is
really intended to indicate any threads implementation with a
(nominally) pthreads interface.

Either I'm overlooking something, or there's another issue here.

Hans

----------------------

Index: include/gc_pthread_redirects.h
===================================================================
--- include/gc_pthread_redirects.h	(revision 58192)
+++ include/gc_pthread_redirects.h	(working copy)
@@ -46,7 +46,7 @@
 #endif /* SOLARIS_THREADS || SOLARIS_PTHREADS */
 
 
-#if !defined(GC_USE_LD_WRAP) && defined(GC_PTHREADS) &&
!defined(GC_SOLARIS_PTHREADS)
+#if !defined(GC_USE_LD_WRAP) && (defined(GC_PTHREADS) ||
defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS)) &&
!defined(GC_SOLARIS_PTHREADS)
 /* We treat these similarly. */
 # include <pthread.h>
 # include <signal.h>
Index: include/gc.h
===================================================================
--- include/gc.h	(revision 58192)
+++ include/gc.h	(working copy)
@@ -894,7 +894,7 @@
 /* thread library calls.  We do that here by macro defining them.
*/
 
 #if !defined(GC_USE_LD_WRAP) && \
-    (defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS))
+    (defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) ||
defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
 #if defined(_IN_LIBGC) || defined(USE_INCLUDED_LIBGC)
 # include "gc_pthread_redirects.h"
 #else

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Paolo Molaro
> Sent: Tuesday, March 21, 2006 8:53 AM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Segmentation fault on Mac OSX intel
> 
> On 03/20/06 Andrea Cavalli wrote:
> > Code that works on Linux-intel and Mac OSX PPC generates 
> segmentation 
> > fault on Mac OSX Intel.
> > 
> > GC version 6.7 compiled with options  --disable-shared --enable- 
> > cplusplus.
> 
> OSX/x86 threaded support requires the attached patch.
> The same should also be needed for ppc with the xlc target if 
> I'm not missing something: when DARWIN_DONT_PARSE_STACK is 
> defined we need to intercept the pthread functions to keep 
> track of the stack boundaries.
> 
> lupus
> 
> --
> -----------------------------------------------------------------
> lupus at debian.org                                     debian/rules
> lupus at ximian.com                             Monkeys do it better
> 



More information about the Gc mailing list