guenther
71af4d5f52
Wrap _malloc_init() so internal calls go directly
prodded by otto@
ok kettenis@ otto@
8 years ago
dtucker
db6e1f035d
Cast pointers to uintptr_t to avoid potential signedness errors.
Based on patch from yuanjie.huang at windriver.com via OpenSSH bz#2608,
with & ok millert, ok deraadt.
8 years ago
otto
c00ceb22a8
0xd0 -> 0xdb; ok deraadt@ millert@ tedu@
8 years ago
otto
8b706cc40e
optimize canary code a bit by storing offset of sizes table instead of
recomputing it all the time
8 years ago
otto
1ae413d0f7
make clear the length printed is the requested length
8 years ago
jmc
ede9249779
grammar fix previous;
8 years ago
otto
41daf65553
document "chunk canary corrupted" error
8 years ago
otto
3eeb2e7bb1
stray tab
8 years ago
otto
2c67f40d2b
Beter implementation of chunk canaries: store size in chunk meta data
instead of chunk itself; does not change actual allocated size; ok tedu@
8 years ago
guenther
1a1f277cca
Delete casts to off_t and size_t that are implied by assignments
or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64)
ok natano@ abluhm@ deraadt@ millert@
8 years ago
otto
814803d97e
move page junking tp unmap(), right before we stick the region in the cache;
ok tedu@
8 years ago
jmc
ea651fa3ce
fix Dt;
8 years ago
nicm
51319d983d
Set errno more consistently, and fix a warning, ok tedu
8 years ago
tedu
acdfcc40f1
rm
8 years ago
tedu
80b2ef3b15
oops, name file after main function
8 years ago
tedu
3e338df556
it doesn't say anything yet, but start adding a man page
8 years ago
nicm
1e41004f15
Make the key sizes and offsets arrays const, ok tedu
8 years ago
tedu
0146b434d2
jmc says you can never have too many functions in one man page, so list
the SHA512/256 functions as well.
8 years ago
tedu
676996bb23
remove caveats that are either misleading or unhelpful.
ok jmc naddy
8 years ago
tedu
aeb17a716b
Add functions for SHA512/256. The standard says you're supposed to start
with different magic numbers, so we need to add some functions instead
of just asking the user to truncate as desired. Sigh.
SHA512 is quite a bit faster than SHA256 on 64 bit CPUs,
but 256 bit hashes are usually quite sufficient. Best of both.
ok deraadt tom
8 years ago
otto
7f29e95497
Less lock contention by using more pools for mult-threaded programs.
tested by many (thanks!) ok tedu, guenther@
8 years ago
tedu
6c73827bf7
black magic for sparc page size can go
8 years ago
guenther
4c8fdca0ed
Don't call lstat() before readlink() just to see if it's a symlink,
as readlink() will tell you that more cheaply.
ok millert@
8 years ago
guenther
d798523e75
Pull in <time.h> for clock_gettime()
ok deraadt@
8 years ago
otto
8b9a47cd4e
wrterror() is fatal, delete dead code; ok tom@ natano@ tedu@
8 years ago
jmc
25a95fab09
add a bit of spacing to previous, to keep the notes about deprecated
functions out the way of the main body;
ok guenther
8 years ago
guenther
502002cd1a
Reduce qabs() and qdiv() to aliases of llabs() and lldiv().
Merge the manual pages and call them deprecated there.
ok and manpage tweak jmc@, ok natano@
8 years ago
tedu
2fe63f9197
RMD160Update actually takes size_t length
8 years ago
otto
48a1ebbb9c
J/j is a three valued option, document and fix code to actuall support that
with a little help from jmc@ for the man page bits
ok jca@ and a reluctant tedu@
8 years ago
otto
4e61a98ad4
adapt S option: add C, rm F (not relevant with 0 cache and disables
chunk rnd), rm P: is default
8 years ago
tb
071457b57b
Back out previous; otto saw a potential race that could lead to a
double unmap and I experienced a much more unstable firefox.
discussed with otto on icb
8 years ago
tedu
86a8b4eb22
defer munmap to after unlocking malloc. this can (unfortunately) be an
expensive syscall, and we don't want to tie up other threads. there's no
need to hold the lock, so defer it to afterwards.
from Michael McConville
ok deraadt
8 years ago
tedu
81f4b4678c
increase the minimum for auto rounds to 6. that was the previous low bound
for login.conf, and we don't want to go lower.
8 years ago
millert
c3b677fe8e
Fix typo; the period should be outside the parens. From Michael McConville
8 years ago
guenther
f143152775
The icdb magic number doesn't need to be visible to static links
ok tedu@
8 years ago
guenther
05aa77af36
Remove dead support for changing BDB hash algorithm and cache of alternatives
ok natano@ millert@ deraadt@
8 years ago
millert
c0459b49c2
The destination string is declared as "s" but referred to as "dst"
in some cases. Be consistent and use "dst" everywhere like for
strlcat(3) and strncat(3). From Tim Kuijsten.
8 years ago
schwarze
4e4aac21c9
Add RETURN VALUES section and .Xr to memmem(3).
From Michal Mazurek <akfaew at jasminek dot net>.
OK tedu@
8 years ago
millert
b2278edbad
Remove a vax remnant (that was really a no-op anyway).
8 years ago
millert
96b30ff942
Allow setenv(3) and putenv(3) to operate on a NULL environ pointer.
The getenv(3) and unsetenv(3) functions already support this.
This will make it easier to emulate the glibc clearenv() function in ports.
Based on a diff from and OK jca@
8 years ago
otto
6ff3199d0a
two times a define to an inline function, from Michael McConville; ok djm@
8 years ago
otto
dc2fbbc2b1
tweak MALLOC_STATS printing (switched off by default), prodded by
Michael McConville
8 years ago
otto
848e061151
redundant memset(3), from Michael McConville, ok armani@
8 years ago
guenther
f99de10a1e
Prefer _MUTEX_*LOCK over _THREAD_PRIVATE_MUTEX_*LOCK() when thread-specific
data isn't necessary.
ok mpi@, ok&tweak natano@
8 years ago
otto
ddedb031ae
Document ``use after free'' error message
8 years ago
jmc
813a539cd3
for some time now mandoc has not required MLINKS to function
correctly - logically complete that now by removing MLINKS from base;
authors need only to ensure there is an entry in NAME for any function/
util being added. MLINKS will still work, and remain for perl to ease
upgrades;
ok nicm (curses) bcook (ssl)
ok schwarze, who provided a lot of feedback and assistance
ok tb natano jung
8 years ago
mmcc
71aec69783
properly guard to macros
ok otto@
8 years ago
otto
32c6baecf9
small step towards multiple pools: move two globls into the struct dir_info
ok @stefan armani@
8 years ago
guenther
34213b2037
environ and __progname are not declared in a public header; declare them
in libc's hidden/stdlib.h instead of in each .c file that needs one
ok deraadt@ gsoares@ mpi@
8 years ago
mmcc
a54180971c
Remove sentences in RETURN VALUES sections saying that functions with
void return types 'return no value'. This is obvious and therefore
unneccessary to mention.
We spare rewind(3)'s sentence because espie@ pointed out that it's a
warning - the function masks a potential error.
This commit also adds a sentence to X509_free clarifying that it's
NULL-safe. This bit was discussed with doug@.
ok martijn@, sentiment supported by schwarze@
8 years ago