summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2016-09-04fix Dt;Jason McIntyre
2016-09-04Set errno more consistently, and fix a warning, ok teduNicholas Marriott
2016-09-04rmTed Unangst
2016-09-04oops, name file after main functionTed Unangst
2016-09-04it doesn't say anything yet, but start adding a man pageTed Unangst
2016-09-04Make the key sizes and offsets arrays const, ok teduNicholas Marriott
2016-09-01Less lock contention by using more pools for mult-threaded programs.Otto Moerbeek
tested by many (thanks!) ok tedu, guenther@
2016-09-01black magic for sparc page size can goTed Unangst
2016-08-28Don't call lstat() before readlink() just to see if it's a symlink,Philip Guenther
as readlink() will tell you that more cheaply. ok millert@
2016-08-17wrterror() is fatal, delete dead code; ok tom@ natano@ tedu@Otto Moerbeek
2016-08-15add a bit of spacing to previous, to keep the notes about deprecatedJason McIntyre
functions out the way of the main body; ok guenther
2016-08-14Reduce qabs() and qdiv() to aliases of llabs() and lldiv().Philip Guenther
Merge the manual pages and call them deprecated there. ok and manpage tweak jmc@, ok natano@
2016-07-06J/j is a three valued option, document and fix code to actuall support thatOtto Moerbeek
with a little help from jmc@ for the man page bits ok jca@ and a reluctant tedu@
2016-06-30adapt S option: add C, rm F (not relevant with 0 cache and disablesOtto Moerbeek
chunk rnd), rm P: is default
2016-06-28Back out previous; otto saw a potential race that could lead to aTheo Buehler
double unmap and I experienced a much more unstable firefox. discussed with otto on icb
2016-06-27defer munmap to after unlocking malloc. this can (unfortunately) be anTed Unangst
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
2016-06-02Fix typo; the period should be outside the parens. From Michael McConvilleTodd C. Miller
2016-05-30The icdb magic number doesn't need to be visible to static linksPhilip Guenther
ok tedu@
2016-05-29Remove dead support for changing BDB hash algorithm and cache of alternativesPhilip Guenther
ok natano@ millert@ deraadt@
2016-05-02Remove a vax remnant (that was really a no-op anyway).Todd C. Miller
2016-04-25Allow setenv(3) and putenv(3) to operate on a NULL environ pointer.Todd C. Miller
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@
2016-04-12two times a define to an inline function, from Michael McConville; ok djm@Otto Moerbeek
2016-04-09tweak MALLOC_STATS printing (switched off by default), prodded byOtto Moerbeek
Michael McConville
2016-04-09redundant memset(3), from Michael McConville, ok armani@Otto Moerbeek
2016-04-05Prefer _MUTEX_*LOCK over _THREAD_PRIVATE_MUTEX_*LOCK() when thread-specificPhilip Guenther
data isn't necessary. ok mpi@, ok&tweak natano@
2016-04-03Document ``use after free'' error messageOtto Moerbeek
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
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
2016-03-17properly guard to macrosmmcc
ok otto@
2016-03-14small step towards multiple pools: move two globls into the struct dir_infoOtto Moerbeek
ok @stefan armani@
2016-03-13environ and __progname are not declared in a public header; declare themPhilip Guenther
in libc's hidden/stdlib.h instead of in each .c file that needs one ok deraadt@ gsoares@ mpi@
2016-03-12Remove sentences in RETURN VALUES sections saying that functions withmmcc
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@
2016-02-25refactor option letter parsing into a subfunction, to increase clarityTheo de Raadt
about which options are turned on/off by 's' and 'S' ok tedu
2016-02-07compare pointer to NULL in example codemmcc
2016-02-05be more forceful about not using these.Marc Espie
improvements sthen@, jmc@. okay millert@, jca@ jmc@
2016-02-05Fix err(3) calls after allocation failures in examples.Ingo Schwarze
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@.
2016-01-26Don't crash dumping malloc stats if malloc_init hasn't been called, noted byOtto Moerbeek
David CARLIER
2016-01-06Long ago, malloc internally had two kinds of failures, warnings and errors.Ted Unangst
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
2016-01-04Follow style(9) and drop lint /* NOTREACHED */ annotations fromtb
the examples. Diff from Juuso Lapinlampi < wub () partyvan ! eu >, thanks! ok schwarze@
2015-12-30another case where bad things would happen after wrterrorTed Unangst
2015-12-30if somebody makes the mistake of disabling abort, don't deref null inTed Unangst
validate_junk. from Michal Mazurek
2015-12-28Remove NULL-checks before free() and a few related dead assignments.mmcc
ok and valuable input from millert@
2015-12-27remove unused variableCharles Longeau
ok tedu@
2015-12-18Simplify return call of rand() and rand_r() to make it easier to read.tb
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@
2015-12-10tiny sanity check on file sizeTed Unangst
2015-12-09Integrate two patches originally from Daniel Micay.Ted Unangst
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
2015-11-30change Xrs from now-defunct db(3) to dbopen(3); this wasn;t aJason McIntyre
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;
2015-11-25Wrap <icdb.h> so that calls go direct and the symbols are all weakPhilip Guenther
ok tedu@
2015-11-24Don't fake a bulleted list by prefixing items with 'o'.Anthony J. Bentley
ok jmc@
2015-11-18add a version field to prevent mayhem if different data gets storedTed Unangst
2015-11-18update for new symbols and codeTed Unangst