[Gc] Crash with tiny static roots on darwin

Jim Hourihan jimhourihan at earthlink.net
Wed Jul 22 18:22:12 PDT 2009


Hi, I've been getting a crash during marking on darwin x86_64 if and  
only if I link my app with a particular 3rd party framework. I don't  
even need to call any functions in the framework, just include it on  
the link line. The crash is deterministic happening in the same spot  
during execution each time.

Hacking GC_dyld_image_add() I noticed that this code will add  
sections smaller than sizeof(void*). By preventing that behavior the  
crashing has disappeared. (The framework in question had multiple tiny  
sections). I'm wondering if this filter should be applied in  
GC_add_roots_inner() since clearly no reference to GC memory can be  
stored in anything less than pointer sized regions.

Also, it looks like GC_register_has_static_roots_callback() is not  
implemented at all for this platform and so I started to do so only to  
become confused by its intended usage: the docs seem to indicate that  
its called during each collection but it seems like it should be  
called only when adding static roots initially.

     -Jim


More information about the Gc mailing list