This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: glibc 2.1.94 (ldconfig has a bug)
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: glibc 2.1.94 (ldconfig has a bug)
- From: Denis Zaitsev <zzz at cd-club dot ru>
- Date: Mon, 9 Oct 2000 23:40:00 +0600
- Cc: GNU libc testers <libc-alpha at sourceware dot cygnus dot com>,VGER gcc list <linux-gcc at vger dot kernel dot org>
- References: <m34s3dnp2o.fsf@otr.mynet.cygnus.com> <20001001083123.A3141@zzz.zzz> <m3og0yapmn.fsf@otr.mynet.cygnus.com>
Sorry, ldconfig has not the problem, but ld.so has. So, it is the
patch:
--- glibc-2.1.94/sysdeps/generic/dl-cache.c Sat May 27 01:38:36 2000
+++ glibc-2.1.94/sysdeps/generic/dl-cache.c Mon Oct 9 16:11:46 2000
@@ -184,7 +184,8 @@
}
else if (file && cachesize > sizeof *cache_new)
{
- cache_new = (struct cache_file_new *) file;
+ cache_new = (struct cache_file_new *)
+ cache = file;
if (memcmp (cache_new->magic, CACHEMAGIC_NEW,
sizeof CACHEMAGIC_NEW - 1)
|| memcmp (cache_new->version, CACHE_VERSION,
In the case when ld.so.cache has the pure new format, the cache var
was left unassigned, so _dl_unload_cache didn't unmap ld.so.cache. And
we had the problem with unmounting...
By the way, it seems not to be the only patch is need for
dl-cache.c. We have
#define _dl_cache_verify_ptr(ptr) (ptr < cachesize - sizeof *cache)
there. What does this macro do when we have the new-format cache
again? So, if it is not against the rules, I would like to send the
corrections...