This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] an alternative to rebasing


--- Steven O'Brien <steven.obrien2@ntlworld.com> wrote:
> I may have found a way of getting cygwin fork() to load dlls
> reliably
> without the need for rebasing dlls.
> 
> I described my understanding of the problem in a previous post
> (http://www.cygwin.com/ml/cygwin/2002-07/msg01260), but basically
> it
> boils down to the fact that during fork() the child process does
> not
> load dlls in the same order as the parent, and consequently cannot
> always get them to the same address. I would be difficult to record
> and
> reproduce the full sequence of LoadLibrary/FreeLibrary calls, but
> after
> some experimentation I believe that there is an alternative. If the
> child loads dlls in the order that they are in memory in the
> parent,
> then it appears to get the correct addresses. To test this I
> patched
> cygwin1.dll so that a list of loaded dlls, in address order, is
> maintained, and the child walks this list instead of the existing
> list
> of all dlls.
> 
> I have done some simple tests that fail with cygwin1.dll-1.3.12-2,
> but
> succeed with my patched dll. I am also running the gnome desktop
> and
> core apps which depend on run-time loaded dlls to function and that
> is
> OK. I would like package maintainers who would otherwise need
> rebasing 
> (Jason?) to try my patch and report results here if they can find
> time.
> 
> If this approach proves successful, then rebasing would still
> improve
> load time for dlls, but apps using run-time loading of dlls would
> no
> longer depend on rebase to function. 
> 
> Attached is the patch and a Changelog entry

Steve,

If this works, I can't thank you enough.  I'll report back on how it
does with our problem child - Apache...

Cheers,
Nicholas

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]