summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2019-09-14Add comment line saying S is described vaguely on purpose.Otto Moerbeek
Prompted by guenther@
2019-07-05improve verb-tense for explaining the calling convention of __Theo de Raadt
ok guenther jmc
2019-07-05The last consumer of pre-posix realpath behaviour has stoppedTheo de Raadt
requiring it (sftp-server). Remove the /exists///// behaviour from here. The /nonexistant behaviour remains in the kernel and needs to be shot next. There may be ports fallout, but we doubt it. ok beck djm
2019-06-30tweak previous; ok guentherJason McIntyre
2019-06-29Document that getcwd() and realpath() are built on system calls thatPhilip Guenther
have a different calling convention than the standard function...as seen in kdump output. ok deraadt@ schwarze@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-27The C89 standard only requires that atexit(3) returns a non-zero valueIngo Schwarze
on error, so checking for -1 only is potentially non-portable. Also mention that the C89 standard does not require errno to be set. OK deraadt@ millert@
2019-06-17Remove old realpath(3), and the userland-vs-kernel realpath verificationTheo de Raadt
code. We now user the simple userland wrapper on top of __realpath(2). The non-POSIX behaviour still remains, that is the next component to fix. From a diff by beck, but I managed to chainsaw it a bit further. Tested in snaps for a couple of days. ok beck
2019-06-15oops - missing .El in previous;Jason McIntyre
2019-06-15realpath(3) doesn't use lstat(2), readlink(2), or getcwd(3) anymore,Theo de Raadt
it is a thin wrapper over the syscall __readlink(2). Improve the list of possible errors. ok millert beck jmc
2019-06-02Complete the ld.so boot cleanup: move most libc initialization fromPhilip Guenther
_csu_finish() to _libc_preinit(), which is an .init_array function in shared libc (and mark it INITFIRST) or a .preinit_array function in static libc, grabbing the _dl_cb callback there from ld.so. Then in _csu_finish(), invoke the dl_clean_boot() callback to free ld.so's startup bits before main() gets control. Other cleanups this permits: - move various startup structures into .data.rel.ro - the dl* stubs in libc can be strong and call the callbacks provided via _dl_cb - no longer need to conditionalize dlctl() calls on presence of _DYNAMIC original concept and full diff ok kettenis@ ok deraadt@
2019-05-30__realpath(2) appears to have improved, so re-enable the code thatTheo de Raadt
checks userland-parsing vs kernel parsing, we are hoping to spot another bug..
2019-05-29There are some bugs in __realpath(2) -- it isn't quite ready so disableTheo de Raadt
calling it until those are fixed.
2019-05-28Enable the use of the kernel __realpath() system call in the libc wrapper.Bob Beck
For now, this also still uses the existing realpath implmentation and emits a syslog if we see differening results. Once we have run with that for a little while we will remove the old code ok deraadt@
2019-05-23Only override size of chunk if we're not given the actual length.Otto Moerbeek
Fixes malloc_conceal...freezero with malloc options C and/or G.
2019-05-19clarify that later flags modify earlier flags;Ingo Schwarze
triggered by a question from Jan Stary <hans at stare dot cz> on misc@; OK otto@
2019-05-15delete two stray blank linesIngo Schwarze
2019-05-13Mention introduction of *_conceal.Otto Moerbeek
2019-05-10Inroduce malloc_conceal() and calloc_conceal(). Similar to theirOtto Moerbeek
counterparts but return memory in pages marked MAP_CONCEAL and on free() freezero() is actually called.
2019-03-20escape backslashes;Ingo Schwarze
patch from Peter Piwowarski <peterjpiwowarski at gmail dot com>
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2019-01-22sort sections, and add a missing verb to the EXAMPLES text;Jason McIntyre
2019-01-22Wrap long lineOtto Moerbeek
2019-01-21a few tweaksTed Unangst
2019-01-21Add example showing a proper comparison function, as many examples showOtto Moerbeek
the wrong idiom. ok tedu@ but probably needs some tweakin
2019-01-18Replace the vague, incorrect, and confusing BUGS sections with CAVEATSIngo Schwarze
clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
2019-01-16For all functions known to be infected by LC_NUMERIC, add shortIngo Schwarze
CAVEATS pointing to the new CAVEATS section in setlocale(3). Make those in wprintf(3) and wscanf(3) more concise since duplicate information is a bad idea. Incompleteness of information originally pointed out by millert@. OK millert@
2019-01-10Move default numer of pools in the multi-threaded case to 8. Various testsOtto Moerbeek
by me and others indicate that it is the optimum.
2019-01-10Make the "not my pool" searching loop a tiny bit smarter, whileOtto Moerbeek
making the number of pools variable. Do not document the malloc conf settings atm, don't know yet if they will stay. Thanks to all the testers. ok deraadt@
2018-12-10Improve speed for the multi-threaded case by reducing lock contention.Otto Moerbeek
tested by many; ok florian@
2018-12-09style; OK ottoFlorian Obser
2018-12-05remove a stray line accidentally left behind in rev. 1.120;Ingo Schwarze
patch from Hiltjo Posthuma <hiltjo at codemadness dot org>
2018-11-27Refactor "find the right pool" code into a function. ok djm@ tb@Otto Moerbeek
2018-11-21fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,Jason McIntyre
now that there is essentially no malloc.conf; text tweaked by deraadt; ok otto deraadt
2018-11-21Introducing malloc_usable_size() was a mistake. While some otherOtto Moerbeek
libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
2018-11-19Fix compilation on alpha, where DEF_WEAK() really must be paired withPhilip Guenther
PROTO_NORMAL(). Problem noted by deraadt@
2018-11-18Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageOtto Moerbeek
2018-11-08zap last remains of malloc.conf; prompted by and ok jmc@Otto Moerbeek
2018-11-06rm FILES section; prompted by Janne JohanssonOtto Moerbeek
2018-11-06Use the new vm.malloc_conf sysctl; ok millert@ deraadt@Otto Moerbeek
2018-11-05Implement C11's aligned_alloc(3). ok guenther@Otto Moerbeek
2018-04-07sys/uio.h is not used anymoreOtto Moerbeek
2018-03-30fix MALLOC_STATS; spotted by and ok semarie@Otto Moerbeek
2018-03-06use _ALIGN() which is uhm a bit OpenBSD-specific, but it means weTheo de Raadt
don't need to use sys/param.h at all, guess which one i believe is greater namespace polution ok otto
2018-03-05Use _MAX_PAGE_SHIFT, rather than #ifdef mips64Theo de Raadt
ok guenther kettenis
2018-02-07use consistent style for for loop in unmap(), no functional changeOtto Moerbeek
2018-01-30keep in sync with ld.so malloc.cOtto Moerbeek
2018-01-30word fix; from edgar pettijohnJason McIntyre
2018-01-28- An error in the multithreaded case could print the wrong function nameOtto Moerbeek
- Start with a full page of struct region_info's - Save an mprotect in the init code: allocate 3 pages with none and make the middle page r/w instead of a r/w allocation and two calls to make the guard pages none
2018-01-26- do not junk pages returned by free_bytes(), all freed chunks are alreadyOtto Moerbeek
junked - freezero(): only clear requested size