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.94 (ldconfig has a bug)


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

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