+2016-03-24 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/69945
+ * config/abi/pre/gnu.ver: Add new symbol.
+ * libsupc++/eh_alloc.cc (__gnu_cxx::__freeres): Define.
+ * testsuite/18_support/free_eh_pool.cc: New test.
+
2016-03-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
* include/Makefile.am (install-freestanding-headers): Add
_ZGTtNKSt13bad_exceptionD1Ev;
_ZGTtNKSt13bad_exception4whatEv;
+ _ZN9__gnu_cxx9__freeresEv;
+
} CXXABI_1.3.9;
# Symbols in the support library (libsupc++) supporting transactional memory.
# define EMERGENCY_OBJ_COUNT 4
#endif
+namespace __gnu_cxx
+{
+ void __freeres();
+}
namespace
{
// to implement in_pool.
char *arena;
std::size_t arena_size;
+
+ friend void __gnu_cxx::__freeres();
};
pool::pool()
pool emergency_pool;
}
+namespace __gnu_cxx
+{
+ void
+ __freeres()
+ {
+ if (emergency_pool.arena)
+ {
+ ::free(emergency_pool.arena);
+ emergency_pool.arena = 0;
+ }
+ }
+}
+
extern "C" void *
__cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) _GLIBCXX_NOTHROW
{
--- /dev/null
+// Copyright (C) 2016 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do run }
+
+namespace __gnu_cxx {
+ void __freeres();
+}
+
+struct X {
+ ~X() {
+ __gnu_cxx::__freeres();
+ }
+};
+
+X x;
+
+int
+main()
+{
+}