Support exception propagation without lock-free atomic int
authorPauli Nieminen <suokkos@gmail.com>
Wed, 4 Jan 2017 10:54:59 +0000 (10:54 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 4 Jan 2017 10:54:59 +0000 (10:54 +0000)
commited3cb4970392edfbae74c82d7e25b7cd961ce70f
treea919cdc92c61faa689f062dc8895b39ea5465098
parent165ba2e9c7a6a86dbb12182486359edefba1dd9d
Support exception propagation without lock-free atomic int

2017-01-04  Pauli Nieminen  <suokkos@gmail.com>
    Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/64735
* acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
* config.h.in: Regenerate.
* config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
(GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
exports for exception_ptr, nested_exception, and future conditional.
[HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
exports for exception_ptr, nested_exception, and future conditional.
* configure: Regenerate.
* configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
* libsupc++/eh_atomics.h: New file for internal use only.
(__eh_atomic_inc, __eh_atomic_dec): New.
* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
(rethrow_exception): Use eh_atomics.h reference counting helpers.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
* libsupc++/nested_exception.cc: Remove check for
ATOMIC_INT_LOCK_FREE.
* libsupc++/nested_exception.h: Likewise.
* src/c++11/future.cc: Likewise.
* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
* testsuite/18_support/nested_exception/*: Likewise.
* testsuite/30_threads/async/*: Likewise.
* testsuite/30_threads/future/*: Likewise.
* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
* testsuite/30_threads/packaged_task/*: Likewise.
* testsuite/30_threads/promise/*: Likewise.
* testsuite/30_threads/shared_future/*: Likewise.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r244051
127 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/include/std/future
libstdc++-v3/libsupc++/eh_atomics.h [new file with mode: 0644]
libstdc++-v3/libsupc++/eh_ptr.cc
libstdc++-v3/libsupc++/eh_throw.cc
libstdc++-v3/libsupc++/eh_tm.cc
libstdc++-v3/libsupc++/exception
libstdc++-v3/libsupc++/exception_ptr.h
libstdc++-v3/libsupc++/guard.cc
libstdc++-v3/libsupc++/nested_exception.cc
libstdc++-v3/libsupc++/nested_exception.h
libstdc++-v3/src/c++11/future.cc
libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
libstdc++-v3/testsuite/30_threads/async/42819.cc
libstdc++-v3/testsuite/30_threads/async/49668.cc
libstdc++-v3/testsuite/30_threads/async/54297.cc
libstdc++-v3/testsuite/30_threads/async/any.cc
libstdc++-v3/testsuite/30_threads/async/async.cc
libstdc++-v3/testsuite/30_threads/async/except.cc
libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
libstdc++-v3/testsuite/30_threads/async/launch.cc
libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
libstdc++-v3/testsuite/30_threads/async/sync.cc
libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
libstdc++-v3/testsuite/30_threads/future/cons/default.cc
libstdc++-v3/testsuite/30_threads/future/cons/move.cc
libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
libstdc++-v3/testsuite/30_threads/future/members/45133.cc
libstdc++-v3/testsuite/30_threads/future/members/get.cc
libstdc++-v3/testsuite/30_threads/future/members/get2.cc
libstdc++-v3/testsuite/30_threads/future/members/share.cc
libstdc++-v3/testsuite/30_threads/future/members/valid.cc
libstdc++-v3/testsuite/30_threads/future/members/wait.cc
libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
libstdc++-v3/testsuite/30_threads/promise/60966.cc
libstdc++-v3/testsuite/30_threads/promise/69106.cc
libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc