glibc/stdlib
Paul Pluzhnikov e5e4d7cc05 Fix BZ# 22180.
POSIX requires that dlclose() and exit() be thread safe, therefore
you can have one thread in the middle of dlclose() and another thread
executing exit() without causing any undefined behaviour on the part
of the implementation.

The existing implementation had a flaw that exit() exit handler processing
did not consider a concurrent dlclose() and would not mark already run
exit handlers using the ef_free flavour. The consequence of this is that
a concurrent exit() with dlclose() will run all the exit handlers that
dlclose() had not yet run, but then will block on the loader lock. The
concurrent dlclose() will continue to run all the exit handlers again
(twice) in violation of the Itanium C++ ABI requirements for __cxa_atexit().

This commit fixes this by having exit() mark all handlers with ef_free to
ensure that concurrent dlclose() won't re-run registered exit handlers that
have already run.
2017-09-21 12:14:41 -07:00
..
bits
sys
a64l.c
abort.c
abs.c
add_n.c
addmul_1.c
alloca.h
at_quick_exit.c
atexit.c
atof.c
atoi.c
atol.c
atoll.c
bsearch.c
bug-fmtmsg1.c
bug-getcontext.c
bug-strtod2.c
bug-strtod.c
canonicalize.c
cmp.c
cxa_at_quick_exit.c
cxa_atexit.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
cxa_finalize.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
cxa_thread_atexit_impl.c
dbl2mpn.c
Depend
div.c
divmod_1.c
divrem.c
drand48_r.c
drand48-iter.c
drand48.c
erand48_r.c
erand48.c
errno.h
exit.c Fix BZ# 22180. 2017-09-21 12:14:41 -07:00
exit.h Fix BZ 14333 2017-09-20 09:31:48 -07:00
fmtmsg.c stdlib: Remove internal_function attribute 2017-08-31 18:52:00 +02:00
fmtmsg.h
fpioconst.c
fpioconst.h
gen-fpioconst.c
gen-tst-strtod-round.c
getcontext.c
getentropy.c Fix the return type of the getentropy stub 2017-08-03 22:35:48 +00:00
getenv.c
getrandom.c
getsubopt.c
gmp-impl.h
gmp.h
grouping.c
grouping.h
groupingwc.c
inlines.c
isomac.c
jrand48_r.c
jrand48.c
l64a.c
labs.c
lcong48_r.c
lcong48.c
ldbl2mpn.c
ldiv.c
llabs.c
lldiv.c
longlong.h
lrand48_r.c
lrand48.c
lshift.c
makecontext.c
Makefile Fix BZ# 22180. 2017-09-21 12:14:41 -07:00
mblen.c
mbstowcs.c
mbtowc.c
mod_1.c
monetary.h
mp_clz_tab.c
mpn2dbl.c
mpn2flt.c
mpn2ldbl.c
mrand48_r.c
mrand48.c
msort.c
mul_1.c
mul_n.c
mul.c
nrand48_r.c
nrand48.c
old_atexit.c
on_exit.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
putenv.c
qsort.c
quick_exit.c
rand_r.c
rand.c
random_r.c
random.c
rpmatch.c
rshift.c
secure-getenv.c
seed48_r.c
seed48.c
setcontext.c
setenv.c
srand48_r.c
srand48.c
stdlib.h
strfmon_l.c Hide internal printf functions [BZ #18822/21986] 2017-08-22 07:50:57 -07:00
strfmon.c
strfrom-skeleton.c
strfromd.c
strfromf.c
strfroml.c
strtod_l.c
strtod_nan_double.h
strtod_nan_float.h
strtod_nan_main.c Remove internal_function attribute from string-to-float functions 2017-08-13 21:11:47 +02:00
strtod_nan_narrow.h
strtod_nan_wide.h
strtod_nan.c
strtod.c
strtof_l.c
strtof_nan.c
strtof.c
strtoimax.c
strtol_l.c
strtol.c
strtold_l.c
strtold_nan.c
strtold.c
strtoll_l.c
strtoll.c
strtoul_l.c
strtoul.c
strtoull_l.c
strtoull.c
strtoumax.c
sub_n.c
submul_1.c
swapcontext.c
system.c
tens_in_limb.c
test-a64l.c
test-at_quick_exit-race.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
test-atexit-race-common.c Oops. stdlib/test-atexit-race-common.c should have been part of 26e70aec70 2017-09-20 09:51:02 -07:00
test-atexit-race.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
test-canon2.c
test-canon.c
test-cxa_atexit-race.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
test-dlclose-exit-race-helper.c Fix BZ# 22180. 2017-09-21 12:14:41 -07:00
test-dlclose-exit-race.c Fix BZ# 22180. 2017-09-21 12:14:41 -07:00
test-on_exit-race.c Fix BZ 14333 2017-09-20 09:31:48 -07:00
testdiv.c
testdiv.input
testmb2.c
testmb.c
testrand.c
testsort.c
tst-at_quick_exit.c 2017-08-27 Paul Pluzhnikov <ppluzhnikov@google.com> 2017-08-27 19:10:40 -07:00
tst-atexit-common.c 2017-09-01 Paul Pluzhnikov <ppluzhnikov@google.com> 2017-09-01 11:35:55 -07:00
tst-atexit.c 2017-08-27 Paul Pluzhnikov <ppluzhnikov@google.com> 2017-08-27 19:10:40 -07:00
tst-atof1.c
tst-atof2.c
tst-bsearch.c
tst-cxa_atexit.c 2017-08-27 Paul Pluzhnikov <ppluzhnikov@google.com> 2017-08-27 19:10:40 -07:00
tst-empty-env.c
tst-environ.c
tst-fmtmsg.c
tst-fmtmsg.sh
tst-getrandom.c
tst-limits.c
tst-makecontext2.c
tst-makecontext3.c
tst-makecontext.c
tst-on_exit.c 2017-08-27 Paul Pluzhnikov <ppluzhnikov@google.com> 2017-08-27 19:10:40 -07:00
tst-putenv.c
tst-putenvmod.c
tst-qsort2.c
tst-qsort.c
tst-quick_exit.cc
tst-rand48-2.c
tst-rand48.c
tst-random2.c
tst-random.c
tst-secure-getenv.c
tst-setcontext2.c
tst-setcontext3.c
tst-setcontext3.sh
tst-setcontext.c
tst-strfmon_l.c Adapt test case data to the changes in the thousands separators 2017-08-12 17:20:24 +02:00
tst-strfrom-locale.c
tst-strfrom.c
tst-strfrom.h
tst-strtod1i.c
tst-strtod2.c
tst-strtod3.c
tst-strtod4.c Adapt test case data to the changes in the thousands separators 2017-08-12 17:20:24 +02:00
tst-strtod5.c
tst-strtod5i.c Adapt test case data to the changes in the thousands separators 2017-08-12 17:20:24 +02:00
tst-strtod6.c
tst-strtod-nan-locale-main.c
tst-strtod-nan-locale.c
tst-strtod-overflow.c
tst-strtod-round-data
tst-strtod-round-data.h
tst-strtod-round-skeleton.c
tst-strtod-round.c
tst-strtod-underflow.c
tst-strtod.c
tst-strtod.h Provide an additional macro expansion for F128 in stdlib/tst-strtod.h 2017-06-22 13:04:56 -03:00
tst-strtol-locale-main.c
tst-strtol-locale.c
tst-strtol.c
tst-strtoll.c
tst-system.c
tst-thread-quick_exit.cc
tst-tininess.c
tst-tls-atexit-lib.c
tst-tls-atexit-nodelete.c
tst-tls-atexit.c Implement xdlopen, xdlsym and xdlclose routines which terminate test 2017-09-20 19:37:45 -07:00
tst-unsetenv1.c
tst-width-stdint.c
tst-width.c
tst-xpg-basename.c
ucontext.h
udiv_qrnnd.c
Versions
wcstoimax.c
wcstombs.c
wcstoumax.c
wctomb.c
xpg_basename.c