]> git.ipfire.org Git - people/ms/gcc.git/commit
libstdc++: eh_globals: gthreads: reset _S_init before deleting key
authorAlexandre Oliva <oliva@adacore.com>
Wed, 22 Jun 2022 02:11:02 +0000 (23:11 -0300)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 19 Oct 2022 20:29:05 +0000 (21:29 +0100)
commit362e56d042f2d37337eea50b97b993f5ac6db86d
tree15d158b40c384a4e1d4a8a2bd710cad97044a800
parente8bd12887e5f242bc45c9df14384db052e885d80
libstdc++: eh_globals: gthreads: reset _S_init before deleting key

Clear __eh_globals_init's _S_init in the dtor before deleting the
gthread key.

This ensures that, in case any code involved in deleting the key
interacts with eh_globals, the key that is being deleted won't be
used, and the non-thread-specific eh_globals fallback will.

for  libstdc++-v3/ChangeLog

* libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
(__eh_globals_init::~__eh_globals_init): Clear _S_init first.

(cherry picked from commit a33dda016e5acf9c6325ce8a72a1b0238130374e)
libstdc++-v3/libsupc++/eh_globals.cc