glibc 2.1.94 (ldconfig has a bug)

Andreas Jaeger aj@suse.de
Wed Oct 11 01:05:00 GMT 2000


>>>>> Denis Zaitsev writes:

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

Thanks, I've added your patch.  I'm trying to look into the other
issues next week - patches are always welcome!

Andreas

2000-10-11  Andreas Jaeger  <aj@suse.de>

	* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Set cache.
	Patch by Denis Zaitsev <zzz@cd-club.ru>.



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


More information about the Libc-alpha mailing list