[Gc] Re[2]: Fix for crash in GC_dyld_image_add and some more adjustments

Ivan Maidanski ivmai at mail.ru
Thu Jul 23 10:30:58 PDT 2009


Hi!

Jim Hourihan <jimhourihan at earthlink.net> wrote:
> 
> Ivan, the attached patch is against the current CVS code + your patch.  
> It only involves dyn_load.c.

Not clear. Do you apply only part of the patch? - it won't work in this case.

> I'm still not completely sure how this is  
> supposed to work relative to the way the linux code uses the callback.  
> I think this is what you're after.

Not very clear again but...

On any platform where the dylib filename is known - this should be relatively easy - just before adding a data section call that callback function (if it returns 0 when skip this section).
Note: since currently the callback is invoked with the alloc lock held, GC_add_roots_inner()+locking should be used instead of GC_add_roots(). 

> 
> Also, there are a couple of unrelated problems:
> 
> Some of the dyld functions called by dyn_load.c are deprecated in 10.5  
> and its not clear what the replacements should be. The existing calls  
> still work so no worries there yet.
> 
> I'm getting this on linking:
> 
>      Undefined symbols:
>        "_GC_with_callee_saves_pushed", referenced from:
>            _GC_push_regs_and_stack in mark_rts.o
>            _GC_do_blocking in pthread_support.o
> 
> So I can't test this code in the CVS cut + your patch. However, my  
> slightly older cut seems to work fine.

OK. You've solved it already.

> 
>      -Jim

Bye.


More information about the Gc mailing list