glibc/malloc
Adhemerval Zanella c32c868ab8 posix: Add _Fork [BZ #4737]
Austin Group issue 62 [1] dropped the async-signal-safe requirement
for fork and provided a async-signal-safe _Fork replacement that
does not run the atfork handlers.  It will be included in the next
POSIX standard.

It allow to close a long standing issue to make fork AS-safe (BZ#4737).
As indicated on the bug, besides the internal lock for the atfork
handlers itself; there is no guarantee that the handlers itself will
not introduce more AS-safe issues.

The idea is synchronize fork with the required internal locks to allow
children in multithread processes to use mostly of standard function
(even though POSIX states only AS-safe function should be used).  On
signal handles, _Fork should be used intead and only AS-safe functions
should be used.

For testing, the new tst-_Fork only check basic usage.  I also added
a new tst-mallocfork3 which uses the same strategy to check for
deadlock of tst-mallocfork2 but using threads instead of subprocesses
(and it does deadlock if it replaces _Fork with fork).

[1] https://austingroupbugs.net/view.php?id=62
2021-06-28 15:55:56 -03:00
..
alloc_buffer_alloc_array.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_allocate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_copy_bytes.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_copy_string.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloc_buffer_create_failure.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arena.c malloc: Make tunable callback functions static 2021-05-07 11:11:46 -07:00
Depend added rt to malloc/Depend [BZ #27132] 2021-02-23 10:04:45 +01:00
dynarray_at_failure.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_emplace_enlarge.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_finalize.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dynarray_resize_clear.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray_resize.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray-skeleton.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
dynarray.h malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
hooks.c Missing ENOMEM in realloc_check wrapper (bug 27870) 2021-05-17 21:39:23 +02:00
Makefile posix: Add _Fork [BZ #4737] 2021-06-28 15:55:56 -03:00
malloc-hooks.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc-internal.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc.c fix typo 2021-06-02 12:16:49 +02:00
malloc.h Enable support for GCC 11 -Wmismatched-dealloc. 2021-05-16 15:21:18 -06:00
mallocbug.c Reformat malloc to gnu style. 2014-01-02 09:40:10 +01:00
mcheck-init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcheck.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcheck.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.sh Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash instead 2021-05-12 07:47:11 +05:30
memusagestat.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
morecore.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mtrace.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mtrace.pl Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
obstack.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
obstack.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
reallocarray.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_dupfree.c malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
scratch_buffer_grow_preserve.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_grow.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
scratch_buffer_set_array_size.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
set-freeres.c nptl: Move stack cache management, __libpthread_freeres into libc 2021-05-11 11:22:33 +02:00
thread-freeres.c dlfcn: dlerror needs to call free from the base namespace [BZ #24773] 2021-04-21 19:49:51 +02:00
tst-alloc_buffer.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-calloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-dynarray-at-fail.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-dynarray-fail.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-dynarray-shared.h malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-dynarray.c malloc: Sync dynarray with gnulib 2021-02-09 16:57:54 -03:00
tst-free-errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-aux.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-skeleton.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-static-nothread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-static-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-interpose-thread.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallinfo2.c tst-mallinfo2.c: Use correct multiple for total variable 2021-05-25 16:47:01 -04:00
tst-malloc_info.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-backtrace.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-check.c tst-mcheck: Rename to tst-malloc-check 2021-06-22 14:31:40 +05:30
tst-malloc-fork-deadlock.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-stats-cancellation.c malloc: Run tst-malloc-stats-cancellation via test-driver.c 2021-04-07 02:35:50 +02:00
tst-malloc-tcache-leak.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-thread-exit.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-thread-fail.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-too-large.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc-usable-static-tunables.c Initialize tunable list with the GLIBC_TUNABLES environment variable 2016-12-31 23:49:24 +05:30
tst-malloc-usable-static.c Add framework for tunables 2016-12-31 23:49:24 +05:30
tst-malloc-usable-tunables.c Initialize tunable list with the GLIBC_TUNABLES environment variable 2016-12-31 23:49:24 +05:30
tst-malloc-usable.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-malloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallocfork2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mallocfork3.c posix: Add _Fork [BZ #4737] 2021-06-28 15:55:56 -03:00
tst-mallocfork.c Fix malloc tests build with GCC 10. 2019-06-10 22:12:08 +00:00
tst-mallocstate.c malloc: Turn tst-mallocstate into a non-internal test 2021-03-09 21:07:24 +01:00
tst-mallopt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-memalign.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mtrace.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mtrace.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mxfast.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-obstack.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-posix_memalign.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-pvalloc-fortify.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-pvalloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-realloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-reallocarray.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-safe-linking.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-scratch_buffer.c malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
tst-tcfree1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-tcfree2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-tcfree3.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-trim1.c * malloc/tst-trim1.c: New file. 2007-12-16 22:57:57 +00:00
tst-valloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions malloc: Drop __malloc_initialized from Versions 2021-06-22 20:14:31 +05:30