aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/cppopts.texi
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2023-02-22 14:35:18 -0300
committerAlexandre Oliva <oliva@gnu.org>2023-02-22 14:38:17 -0300
commitd70f49e98245f80fcf8b2e68a9f06955f52e1de7 (patch)
tree93bdea2b13844a22c91ff9395678592cec06e7e2 /gcc/doc/cppopts.texi
parent2ff710857fd315770d71061e1a938324c1654d81 (diff)
downloadgcc-d70f49e98245f80fcf8b2e68a9f06955f52e1de7.zip
gcc-d70f49e98245f80fcf8b2e68a9f06955f52e1de7.tar.gz
gcc-d70f49e98245f80fcf8b2e68a9f06955f52e1de7.tar.bz2
[libstdc++] do not destruct mutex_pool mutexes
On vxworks, after destroying the semaphore used to implement a mutex, __gthread_mutex_lock fails and __gnu_cxx::__mutex::lock calls __throw_concurrence_lock_error. Nothing ensures the mutex_pool mutexes survive init-once objects containing _Safe_sequence_base. If such an object completes construction before mutex_pool initialization, it will be registered for atexit destruction after the mutex_pool mutexes, so the _M_detach_all() call in the _Safe_sequence_base dtor will use already-destructed mutexes, and basic_string/requirements/citerators_cc fails calling terminate. This patch fixes this problem by ensuring the mutex pool mutexes are constructed on demand, on a statically-allocated buffer, but never destructed. for libstdc++-v3/ChangeLog * src/c++11/shared_ptr.cc (__gnu_internal::get_mutex): Avoid destruction of the mutex pool.
Diffstat (limited to 'gcc/doc/cppopts.texi')
0 files changed, 0 insertions, 0 deletions