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

Jim Hourihan jimhourihan at earthlink.net
Thu Jul 23 11:38:46 PDT 2009


Ok, new patch attached.

    -Jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: has_static_roots_darwin2.patch
Type: application/octet-stream
Size: 1731 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090723/00c0337f/has_static_roots_darwin2-0001.obj
-------------- next part --------------


On Jul 23, 2009, at 11:14 AM, Ivan Maidanski wrote:

> Hi!
>
> Jim Hourihan <jimhourihan at earthlink.net> wrote:
>>
>> On Jul 23, 2009, at 10:30 AM, Ivan Maidanski wrote:
>>
>>> 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.
>>
>> If you cvs update, apply your patch, then apply my patch you'll have
>> the same state that I do. I can do something differently if you like.
>> Make sense?
>
> Discard the above, now I'm looking in your patch...
>
> The following should be changed, I think:
> 1. "GC_has_static_roots_func callback" decl should be before any  
> statement (i.e. before "if (GC_no_dls) return;");
> 2. also add "DCL_LOCK_STATE;" local var decl.
> 3. if "callback var is 0 then there's no need to execute  
> GC_dyld_name_for_hdr();
> 3. replace GC_add_roots() call with
>    LOCK();
> // DARWIN_DEBUG goes here...
>    GC_add_roots_inner((ptr_t)..., (ptr_t)..., FALSE);
>    UNLOCK();
> 4. put callback call after LOCK (since currently the callback is  
> invoked with the alloc lock held).
>
> Bye.
>
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list