freebsd-dev/lib/libc
Peter Wemm ce04fea445 Remove last remaining references to malloc/realloc and functions that
call them.  All the execX() libc functions should be vfork() safe now.
Specifically:
- execlp() does the argument count-and-build into a vector from alloca
    (like the others) - buildargv() is no longer used (and gone).
- execvp() uses alloca/strcpy rather than strdup().
- the ENOEXEC handler uses alloca rather than malloc.
- a couple of free() calls removed - alloca works on the local stack and
    the allocations are freed on function exit (which is why buildargv
    wasn't useful - it's alloca() context would disappear on return).
Along the way:
- If alloca() fails (can it?), set errno = ENOMEM explicitly.
- The ENOEXEC recovery routine that trys again with /bin/sh appeared to
    not be terminating the new argv[] array for /bin/sh, allowing it to
    walk off the end of the list.

I dithered a bit about using alloca() even more as it's most commonly
associated with gcc.  However, standalone portable (using malloc) and
machine-specific assembler alloca implementations appear to be available
on just about all the architectures we're likely to want to port to.
alloca will be the least of our problems if ever going to another compiler.
1999-03-23 16:40:34 +00:00
..
alpha [This is a null commit to supply the correct log entry] 1998-12-23 11:55:42 +00:00
amd64 Simplify implementation and eliminate a register preservation problem. 1998-09-18 05:50:52 +00:00
compat-43 Add missing period. We don't allow maternity leaves. 1998-07-29 05:13:39 +00:00
db Replace memory leaking instances of realloc with non-leaking reallocf. 1998-09-16 04:17:47 +00:00
gen Remove last remaining references to malloc/realloc and functions that 1999-03-23 16:40:34 +00:00
gmon Change a test for NETBSD_SYSCALLS to __alpha__. We're not ready to 1998-09-05 07:57:43 +00:00
i386 EACESS -> EACCES 1999-03-15 00:14:57 +00:00
include Implement compile time debug support for spinlocks. 1998-06-09 08:28:49 +00:00
locale Fixed tab lossage in previous commit. 1999-02-25 11:27:52 +00:00
mips Bring in initial libc support for mips. These files were taken from 1999-03-03 07:06:17 +00:00
mipseb These were missing from the previous commit. 1999-03-03 07:08:03 +00:00
mipsel These were missing from the previous commit. 1999-03-03 07:08:03 +00:00
net Mention that getservbyport requires its port parameter to be in 1999-03-02 02:34:23 +00:00
nls Provide meaningful errno value on error return 1998-07-14 18:27:43 +00:00
quad - Fix modulo bug that was masked by the correct code in libgcc.a which is 1998-11-30 20:25:37 +00:00
regex Replace memory leaking instances of realloc with non-leaking reallocf. 1998-09-16 04:17:47 +00:00
rpc Document type for 'req' argument to clnt_control. 1999-01-31 16:13:25 +00:00
stdio Add support for long long modifier (e.g. %llx, %lld). 1999-03-11 22:44:02 +00:00
stdlib Correct synopsys: getsubopt is declared in unistd.h, not stdlib.h. 1999-03-02 02:35:57 +00:00
stdtime Merge from vendor branch: timezone file structure changes and doco. 1999-01-21 17:22:59 +00:00
string Corrected use of backslash escaping in sample code. 1999-02-27 00:54:40 +00:00
sys Add a sysctl variable which can help stop chroot(2) escapes. 1999-03-23 14:26:40 +00:00
xdr Add support for the RPC 64-bit integer type ``hyper''. 1998-09-08 17:33:12 +00:00
yp Fixed the usual missing dependencies on headers generated by rpcgen. 1998-05-09 15:10:53 +00:00
Makefile Change i386 in a few paths to ${MACHINE} to support MACHINE=pc98. 1998-09-09 11:22:28 +00:00
Makefile.inc Define empty variables in case no names are added to them. This avoids 1998-03-09 06:21:41 +00:00