freebsd-skq/libexec
dillon 0dbb92d539 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.

Sleuthing work by: Martin Blapp <mb@imp.ch>
X-MFC after:	Before or after the 4.6 release depending on the release engineers
2002-06-10 18:52:31 +00:00
..
atrun Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00
bootpd Assume __STDC__, remove non-__STDC__ code. Remove private __P. 2002-05-28 18:39:53 +00:00
comsat o Eliminate __P 2002-02-03 15:53:02 +00:00
fingerd Add used include of <string.h>. 2002-05-30 21:35:39 +00:00
ftpd Assume __STDC__, remove non-__STDC__ code. 2002-05-28 18:57:20 +00:00
getNAME o __P removal 2002-02-06 16:38:40 +00:00
getty #include <sys/time.h> instead of depending on namespace pollution in 2002-02-25 02:30:04 +00:00
lukemftpd Fixed CLEANFILES. 2002-05-13 15:21:51 +00:00
mail.local Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
makekey o Remove __P 2002-02-06 16:51:09 +00:00
mknetid o __P removal 2002-02-17 19:09:20 +00:00
named-xfer Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00
pppoed Understand the new NGM_PPPOE_SESSIONID message and set SESSIONID 2002-05-14 12:33:40 +00:00
rbootd o __P removal 2002-02-07 23:57:01 +00:00
revnetgroup Include <string.h> for some prototypes, rather than depending on 2002-04-01 21:13:17 +00:00
rexecd Unbreak static build and remove usage() that isn't usage(). 2002-05-03 13:12:06 +00:00
rlogind Use <paths.h> rather than "pathnames.h", and fix a couple of whitespace nits. 2002-05-08 00:47:01 +00:00
rpc.rquotad Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
rpc.rstatd Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
rpc.rusersd Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
rpc.rwalld Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
rpc.sprayd Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
rshd PAMify. 2002-05-08 00:43:46 +00:00
rtld-aout Assume __STDC__, remove non-__STDC__ code. 2002-05-28 18:57:20 +00:00
rtld-elf In tracking down an installation seg fault with then openoffice port 2002-06-10 18:52:31 +00:00
save-entropy beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
smrsh Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
talkd o Move NTOHL() and associated macros into <sys/param.h>. These are 2002-02-18 20:35:27 +00:00
tcpd Build the TCP-wrapper helper "daemon" tcpd. This is not much use in 2002-01-12 13:31:30 +00:00
telnetd Don't risk catching a signal while handling a signal for a dying child, as we 2002-05-27 08:10:24 +00:00
tftpd Correct indent. 2002-04-26 12:27:55 +00:00
xtend Add missing commas. At least I didn't miss a period. 2002-03-18 16:10:00 +00:00
ypxfr Spell void * as void * rather than caddr_t. This is complicated by the 2002-04-28 15:18:50 +00:00
Makefile Add lukemftpd to the mix. 2002-02-27 18:37:21 +00:00
Makefile.inc Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00