https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90295
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.0 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This requires exporting the _M_release() symbol: diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 58d3e900bbf..65ca21524db 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -2564,6 +2564,13 @@ CXXABI_1.3.12 { } CXXABI_1.3.11; +CXXABI_1.3.13 { + + # std::exception_ptr::_M_release() + _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; + +} CXXABI_1.3.12; + # Symbols in the support library (libsupc++) supporting transactional memory. CXXABI_TM_1 { diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 3f21a70e54c..b8dbd7f5324 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -171,6 +171,14 @@ namespace std __dest_thunk(void* __x) { static_cast<_Ex*>(__x)->~_Ex(); } +#ifndef _GLIBCXX_EH_PTR_COMPAT + inline exception_ptr::~exception_ptr() noexcept + { + if (_M_exception_object) + _M_release(); + } +#endif + } // namespace __exception_ptr /// Obtain an exception_ptr pointing to a copy of the supplied object.