summaryrefslogtreecommitdiff
path: root/libexec/ld.so/malloc.c
AgeCommit message (Collapse)Author
2018-02-07sync with libc malloc: use consistent style for for loop in unmap(),Otto Moerbeek
no functional change
2018-02-01don't forget to increment loop var; infinite loops spotted by sthen@Otto Moerbeek
2018-01-30kill a gcc warningOtto Moerbeek
2018-01-30port over the malloc changes from libc. prompted by deraadt@Otto Moerbeek
2017-12-01Redo the calculation of the alignment and placement of static TLS data toPhilip Guenther
correctly take into account the segment p_align. Previously, anything with a size belong the natural alignment or with alignment larger than the natural one would either not be intialized correctly, be misaligned, or result in the TIB being misaligned. Problems reported by Charles Collicutt (charles (at) collicutt.co.uk) ok kettenis@
2017-10-05Sync with libc malloc, doing delayed free double-free check alwaysOtto Moerbeek
2017-07-23from libc malloc: only access offset if canaries are enabled *and* size > 0Otto Moerbeek
and initialize ->offset to a definite value in the size == 0 case
2017-05-08Always use the same callback to unlock as was used to lock. PermitsPhilip Guenther
libpthread initialization from a shared object's init (or fini, I suppose) routines. ok kurt@ kettenis@ espie@
2017-02-18Add NULL tests to wrterror() to avoid a NULL deref when called fromPhilip Guenther
malloc initialization or a free() error path. Prompted by libc's malloc.c rev 1.214; with correction from jsg@ and otto@ ok jsg@ krw@
2017-01-24On fatal errors, kill ourselves with thrkill(0,9,NULL) instead ofPhilip Guenther
simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom(). prompted by a complaint from jsing@ ok jsing@ deraadt@
2016-11-03small tweak to also check canaries if F is in effectOtto Moerbeek
2016-10-31sync to libc: malloc_move is not an option anymoreOtto Moerbeek
2016-10-25bring canaries for > page sized objects from libc to ld.so; ok guenther@Otto Moerbeek
2016-10-140xd0 -> 0xdb from libc mallocOtto Moerbeek
2016-10-14move better canary code and validate_junk() over from libc mallocOtto Moerbeek
2016-09-18merge form libc malloc:Otto Moerbeek
move page junking tp unmap(), right before we stick the region in the cache; ok tedu@
2016-09-04Redundant memset and some better style wrt exiting functions after error.Otto Moerbeek
ok guenther@
2016-09-03cherry-pick a few diffs from libc malloc; ok guenther@Otto Moerbeek
2016-08-12the slimmed down random functions inside ld.so are strict clones of theTheo de Raadt
libc arc4random API, so call them _dl_{arc4random,arcrandombuf} ok tedu guenther
2016-05-19ld.so can now be entered by multiple threads via _dl_{allocate,free}_tib(),Philip Guenther
so do locking in ld.so's malloc subsystem, (re)using the existing _dl_thread_kern_{stop,go}() callbacks. problem diagnosed by jsing@ in the 'go' port; fix tested there and by semarie@ in the 'rust' port
2015-01-22delete annoying white space that annoyTheo de Raadt
2015-01-16<sys/param.h> to <limits.h> conversion. Verified binariesTheo de Raadt
ok millert, thanks to doug for process advice
2014-11-03arc4random_uniform() transformation was off, resulting in badly skewedPhilip Guenther
distribution in the placement of malloc's dir_info. ok otto@ deraadt@
2014-07-06this version of malloc does not need string.hOtto Moerbeek
2014-06-21Move to a non-zeroing _dl_malloc, a _dl_calloc and _dl_reallocarry andOtto Moerbeek
fix _dl_strdup to return NULL instead of crash; ok deraadt@
2014-06-15move to a smaller rbytes buffer; ok miod@ deraadt@Otto Moerbeek
2014-06-05Move to (slightly stripped) version of libc malloc; ok deraadt@Otto Moerbeek