This is the mail archive of the cygwin@sourceware.cygnus.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]

[patch] Re: dlopen bug!


Jorrit Tyberghein <Jorrit.Tyberghein@uz.kuleuven.ac.be> writes:
> Hi, I'm using CygWin B20 on NT4 (SP3) and I think I have found a bug
> in dlopen.

Thanks for the bug report. Here's a fix:

Wed Nov 11 14:10:01 CST 1998  Mumit Khan  <khan@xraylith.wisc.edu>

	* dlfcn.cc (get_full_path_of_dll): Reinitialize ret each time.

Index: dlfcn.cc
===================================================================
RCS file: /mounts/sdb5/src/cdk-b20/CVSROOT/b20/winsup/dlfcn.cc,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 dlfcn.cc
--- dlfcn.cc	1998/11/05 21:47:13	1.1.1.1
+++ dlfcn.cc	1998/11/11 20:09:31
@@ -56,7 +56,7 @@ get_full_path_of_dll (const char* str)
   if (str == 0)
     return str;
 
-  static const char *ret = 0;
+  static const char *ret;
   char buf[MAX_PATH];
   char name[MAX_PATH];
 
@@ -67,6 +67,8 @@ get_full_path_of_dll (const char* str)
   // empty string?
   if (len == 0)
     return str;
+  
+  ret = 0;				// remember that ret is static!
 
   // trailing "." => no extension
   if (str[len - 1] == '.')

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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