This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: glibc 2.1.97 (ldconfig has a bug)


ld.so has a problem again. Now it segfaults after ldconfig --format new.
It's because cache_new is used before it is initialized. So, here is
the patch.


--- glibc-2.1.97/sysdeps/generic/dl-cache.c	Sun Nov  5 16:17:34 2000
+++ glibc-2.1.97/sysdeps/generic/dl-cache.c	Sun Nov  5 16:18:36 2000
@@ -183,7 +183,7 @@
 	    cache_new = (void *) -1;
 	}
       else if (file != NULL && cachesize > sizeof *cache_new
-	       && memcmp (cache_new->magic, CACHEMAGIC_VERSION_NEW,
+	       && memcmp (file, CACHEMAGIC_VERSION_NEW,
 			  sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
 	{
 	  cache_new = file;


In the patches I had sent before this thing works...

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