aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2017-09-21 12:14:41 -0700
committerPaul Pluzhnikov <ppluzhnikov@google.com>2017-09-21 12:14:41 -0700
commite5e4d7cc056ffae51fc55b66d9dd0abd99927486 (patch)
tree2290540b926efebc5936d984a773688247a5f736 /ChangeLog
parentc10c5267a8c95ffea1fad70e2bf047c1dd3dfd48 (diff)
downloadglibc-e5e4d7cc056ffae51fc55b66d9dd0abd99927486.zip
glibc-e5e4d7cc056ffae51fc55b66d9dd0abd99927486.tar.gz
glibc-e5e4d7cc056ffae51fc55b66d9dd0abd99927486.tar.bz2
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.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog9
1 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 399f30d..f7c8b91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-09-21 Paul Pluzhnikov <ppluzhnikov@google.com>
+ Carlos O'Donell <carlos@redhat.com>
+
+ [BZ #22180]
+ * stdlib/Makefile (tests): Add test-dlclose-exit-race.
+ * stdlib/test-dlclose-exit-race.c: New file.
+ * stdlib/test-dlclose-exit-race-helper.c: New file.
+ * stdlib/exit.c (__run_exit_handlers): Mark slot as free.
+
2017-09-21 Joseph Myers <joseph@codesourcery.com>
* crypt/Banner: Remove file.