[Fwd: dlopen regression in 1.7? (or is it just me?)]

Dave Korn dave.korn.cygwin@googlemail.com
Wed Aug 12 15:47:00 GMT 2009


Dave Korn wrote:
> Corinna Vinschen wrote:
> 
>> But I'm still not clear on
>>
>>   newu->cxx_malloc = &__cygwin_cxx_malloc;
>>
>> vs.
>>
>>   *newu->cxx_malloc = __cygwin_cxx_malloc;
>>
>> What's the better approach now?
> 
>   Absolutely the second one.  We'll have the dll's internal per-process *always*
> point to the internal _cxx_malloc_struct, and everything write back its changes
> to there, because it will always be there.  We won't ever have it point into a
> DLL, regardless of statically or dynamically loaded.
> 
>   Just want to make sure I've covered all the bases for forward/backward
> compatibility against old and new cygwin-dependent DLLs.

  ... like, for instance, old DLLs might still reset the pointer at static load
time, so I'll need to add something in the startup sequence to copy the result
back and reset the pointer somewhere after all the DLLs initialise and before we
enter main.

    cheers,
      DaveK



More information about the Cygwin-developers mailing list