glibc 2.1.97 (ldconfig has a bug)

Denis Zaitsev zzz@cd-club.ru
Sun Nov 5 07:09:00 GMT 2000


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


More information about the Libc-alpha mailing list