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: bug report - DLL failure on win ME with gcc-3


Hi
I think I've found the problem with dlopen()/fork() on Win ME as
reported in
http://cygwin.com/ml/cygwin/2003-02/msg02221.html
If I'm right, it also applies to win 95/98.

in dll_init.cc: (dll_list::load_after_fork) a call is made to 
LoadLibraryEx (d.name, NULL, DONT_RESOLVE_DLL_REFERENCES);

According to the MSDN library, at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibraryex.asp
the symbol DONT_RESOLVE_DLL_REFERENCES is not supported on win 9x/Me. It
does not say what the result of using this value on those platforms is.
I suspect that this breaks the LoadLibraryEx call, so that the
subsequent FreeLibrary call ends up deallocating memory that was never
allocated, hence the crash.

I have tried a patched version of dll_init.cc that uses plain
LoadLibrary instead of LoadLibraryEx on win 9x/Me, and with this patched
cygwin1.dll my test program runs correctly on all platforms. I have
attached the patch (cvs diff -up dll_init.cc). Could someone please
review this patch and apply it if it is acceptable?

By the way, the current CVS has a problem with unix sockets - they are
verrrry slow - like several minutes to get a simple message through in
some cases. 

Regards,
Steven

Attachment: dlldiff.txt
Description: Text document

--
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]