PR libstdc++/85812 fix memory leak in std::make_exception_ptr
authorJonathan Wakely <jwakely@redhat.com>
Thu, 17 May 2018 15:03:29 +0000 (16:03 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 17 May 2018 15:03:29 +0000 (16:03 +0100)
commitff03245e00af4448173fb5c11420876345e832f3
tree012b0c91f48ccf16f484697d398f4d10e71ad096
parentf1bcb061d172ca7e3bdcc46476b20776382a2974
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.

From-SVN: r260323
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/cxxabi_init_exception.h
libstdc++-v3/libsupc++/exception_ptr.h