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
jmc
963b22afaf
un-vax;
8 years ago
deraadt
90378d363e
refactor option letter parsing into a subfunction, to increase clarity
about which options are turned on/off by 's' and 'S'
ok tedu
8 years ago
mmcc
27f8788cff
compare pointer to NULL in example code
8 years ago
espie
5e809bc8f9
be more forceful about not using these.
improvements sthen@, jmc@. okay millert@, jca@ jmc@
8 years ago
schwarze
5595524148
Fix err(3) calls after allocation failures in examples.
There is long-standing consensus that err(1, NULL) is the best idiom
after failure of malloc(3) and friends.
Quirk in the manual noticed by tb@.
8 years ago
otto
0af523ebbd
Don't crash dumping malloc stats if malloc_init hasn't been called, noted by
David CARLIER
8 years ago
tedu
c3dcc81b75
Long ago, malloc internally had two kinds of failures, warnings and errors.
The 'A' option elevated warnings to errors, and has been the default for some
time. Then warnings were effectively eliminated in favor of everything
being an error, but then the 'a' flag turned real errors into warnings!
Remove the 'a' option entirely. You shouldn't have used it anyway.
ok tb tdeval
8 years ago
tb
d5584793c3
Follow style(9) and drop lint /* NOTREACHED */ annotations from
the examples.
Diff from Juuso Lapinlampi < wub () partyvan ! eu >, thanks!
ok schwarze@
8 years ago
tedu
5724f1ae45
another case where bad things would happen after wrterror
8 years ago
tedu
57beaad82f
if somebody makes the mistake of disabling abort, don't deref null in
validate_junk. from Michal Mazurek
8 years ago
mmcc
7766921240
Remove NULL-checks before free() and a few related dead assignments.
ok and valuable input from millert@
8 years ago
chl
0edf23d663
remove unused variable
ok tedu@
8 years ago
tb
90b17882f1
Simplify return call of rand() and rand_r() to make it easier to read.
This is slightly less robust, but RAND_MAX must be one below a power
of two in both variants anyway.
Based on a suggestion by Matthew Martin.
ok tedu@
8 years ago
tedu
acb3665fb0
tiny sanity check on file size
8 years ago
tedu
1bd8c9e70f
Integrate two patches originally from Daniel Micay.
1. Optionally add random "canaries" to the end of an allocation. This
requires increasing the internal size of the allocation slightly, which
probably results in a large effective increase with current power of two
sizing. Therefore, this option is only enabled via 'C'.
2. When writing junk (0xdf) to freed chunks (current default behavior),
check that the junk is still intact when finally freeing the delayed chunk
to catch some potential use after free. This should be pretty cheap so
there's no option to control it separately.
ok deraadt tb
8 years ago
mmcc
11bd1912a3
Phrase allocation failure more clearly. ok deraadt@
8 years ago
jmc
d892e4384e
change Xrs from now-defunct db(3) to dbopen(3); this wasn;t a
straight replace: thanks both to schwarze and maja for feedback
on how to rewrite parts;
i've snuck in an rcs id->openbsd id change in dev_mkdb too;
8 years ago
guenther
c7b217f282
Wrap <icdb.h> so that calls go direct and the symbols are all weak
ok tedu@
8 years ago
daniel
bc3b5c8183
Document that these functions are now in strings.h.
ok millert@
8 years ago
bentley
490b2e24b5
Don't fake a bulleted list by prefixing items with 'o'.
ok jmc@
8 years ago
tedu
7a4ef21e60
add a version field to prevent mayhem if different data gets stored
8 years ago
tedu
b15fab3fb6
update for new symbols and code
8 years ago
tedu
1df731e22c
Add icdb, the internal c database. A simpler replacement for the old
Berzerkeley DB code.
8 years ago
jmc
657bd2849a
update NAME section to include all documented functions,
or otherwise change Dt to reflect the name of an existing function;
feedback/ok schwarze
8 years ago