Date: 10 Jun 2002 17:43:27 -0400 From: Joe Marcus Clarke <marcus@marcuscom.com> To: Matt Dillon <dillon@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/libexec/rtld-elf/i386 reloc.c Message-ID: <1023745407.46871.2.camel@gyros.marcuscom.com> In-Reply-To: <200206101852.g5AIqWd98998@freefall.freebsd.org> References: <200206101852.g5AIqWd98998@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2002-06-10 at 14:52, Matt Dillon wrote: > dillon 2002/06/10 11:52:32 PDT > > Modified files: > libexec/rtld-elf/i386 reloc.c > Log: > In tracking down an installation seg fault with then openoffice port > Martin Blapp determined that the elf dynamic loader was at fault. In > particular, the loader uses alloca() to allocate a symbol cache on the > stack. Normally this would work just fine, but if the loader is called > from a threaded program and the object being loaded is fairly large the > alloca() can blow away the thread stack and effect other nearby thread > stacks as well. My testing showed that the symbol cache can be as large > as 250KBytes during the openoffice port build and install sequence. Martin > was able to work around the problem by disabling the symbol cache > (cache = NULL;). However, this solution is not adequate for commit because > it can cause an enormous cpu burden for applications which do a lot of > dynamic loading (e.g. like konqueror). > > The solution is to use anonymous mmap() to temporarily allocate space to > hold the symbol cache. In testing I found that replacing the alloca() > with mmap() has no observable degredation in performance. > > It should be noted that this bug does not necessarily cause an immediate > crash but can instead result in long term corruption and instability in > applications that load modules from threads. The bug is almost certainly > responsible for some of the instabilities found in konqueror, for example, > and possibly netscape too. This may also fix the seg fault encountered while building Mozilla. I'll investigate. Joe > > Sleuthing work by: Martin Blapp <mb@imp.ch> > X-MFC after: Before or after the 4.6 release depending on the release engineers > > Revision Changes Path > 1.9 +20 -8 src/libexec/rtld-elf/i386/reloc.c > -- PGP Key : http://www.marcuscom.com/pgp.asc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1023745407.46871.2.camel>