PR libstdc++/85812 fix memory leak in std::make_exception_ptr
commit0de89a9c08cc0e0b2ab5267b90c4d87ead371780
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 May 2018 15:03:29 +0000 (17 15:03 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 May 2018 15:03:29 +0000 (17 15:03 +0000)
tree012b0c91f48ccf16f484697d398f4d10e71ad096
parentceccd75660891979252dbda3cf659c991a8eef99
PR libstdc++/85812 fix memory leak in std::make_exception_ptr

PR libstdc++/85812
* libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
* libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
Refactor to separate non-throwing and throwing implementations.
[__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
if constructing the object throws.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260323 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/cxxabi_init_exception.h
libstdc++-v3/libsupc++/exception_ptr.h