glibc/sysdeps/nptl
Carlos O'Donell 2827ab990a libc: Extend __libc_freeres framework (Bug 23329).
The __libc_freeres framework does not extend to non-libc.so objects.
This causes problems in general for valgrind and mtrace detecting
unfreed objects in both libdl.so and libpthread.so.  This change is
a pre-requisite to properly moving the malloc hooks out of malloc
since such a move now requires precise accounting of all allocated
data before destructors are run.

This commit adds a proper hook in libc.so.6 for both libdl.so and
for libpthread.so, this ensures that shm-directory.c which uses
freeit () to free memory is called properly.  We also remove the
nptl_freeres hook and fall back to using weak-ref-and-check idiom
for a loaded libpthread.so, thus making this process similar for
all DSOs.

Lastly we follow best practice and use explicit free calls for
both libdl.so and libpthread.so instead of the generic hook process
which has undefined order.

Tested on x86_64 with no regressions.

Signed-off-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2018-06-29 22:39:06 -04:00
..
bits Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sys Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
aio_misc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
allocrtsig.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fork.c Refactor Linux ARCH_FORK implementation 2018-03-07 17:39:40 -03:00
fork.h Refactor atfork handlers 2018-02-22 16:43:59 -03:00
futex-internal.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gai_misc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Implies
internaltypes.h Fix comment typo 2018-05-08 14:59:13 +02:00
jmp-unwind.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-lock.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-lockP.h Refactor atfork handlers 2018-02-22 16:43:59 -03:00
librt-cancellation.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lowlevellock-futex.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lowlevellock.h Fix blocking pthread_join. [BZ #23137] 2018-05-04 10:00:59 +02:00
Makeconfig nptl: Move pthread_atfork to libc_nonshared.a 2018-03-01 08:18:48 +01:00
Makefile Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
malloc-machine.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread-functions.h libc: Extend __libc_freeres framework (Bug 23329). 2018-06-29 22:39:06 -04:00
pthread.h Revert Intel CET changes to __jmp_buf_tag (Bug 22743) 2018-01-25 23:43:46 -08:00
setxid.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
shm-directory.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stdio-lock.h Mechanically remove _IO_ name aliases for types and constants. 2018-02-21 14:11:05 -05:00
Subdirs
tcb-offsets.h
timer_routines.h Move NPTL-specific code to NPTL-specific header 2018-02-27 00:48:24 +01:00
tst-mqueue8x.c
unwind-forcedunwind.c libc: Extend __libc_freeres framework (Bug 23329). 2018-06-29 22:39:06 -04:00