Projects : bitcoin : bitcoin_tx_fee_cleanup

bitcoin/deps/boost-no-demangler.patch

Dir - Raw

1My GNU libstdc++ doesn't include the __cxa_demangle extension because I discovered its implementation to be based on a 5900-line mess of "libiberty" C code making potentially unsafe, not clearly bounded use of alloca. And what do you know: boost was using it wrong.
2
3 -jfw
4
5--- a/boost/python/type_id.hpp
6+++ b/boost/python/type_id.hpp
7@@ -17,14 +17,6 @@
8 # include <boost/type_traits/same_traits.hpp>
9 # include <boost/type_traits/broken_compiler_spec.hpp>
10
11-# ifndef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
12-# if defined(__GNUC__) \
13- && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) \
14- && !defined(__EDG_VERSION__)
15-# define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
16-# endif
17-# endif
18-
19 namespace boost { namespace python {
20
21 // for this compiler at least, cross-shared-library type_info
22--- a/boost/units/detail/utility.hpp
23+++ b/boost/units/detail/utility.hpp
24@@ -15,12 +15,8 @@
25 #include <typeinfo>
26 #include <string>
27
28-#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
29-#define BOOST_UNITS_USE_DEMANGLING
30-#include <cxxabi.h>
31-#endif // __GNUC__
32-
33 #ifdef BOOST_UNITS_USE_DEMANGLING
34+#include <cxxabi.h>
35
36 #include <boost/algorithm/string/replace.hpp>
37
38--- a/libs/graph/test/typestr.hpp
39+++ b/libs/graph/test/typestr.hpp
40@@ -25,7 +25,8 @@
41 */
42 template <typename T>
43 std::string typestr() {
44-#if defined(__GNUC__)
45+#if 0
46+ /* According to the docs I've found for the clearly non-standard and internal __cxa_demangle, the buffer pointer must be either null or from malloc. -jfw */
47 std::size_t const BUFSIZE = 8192;
48 std::size_t n = BUFSIZE;
49 char buf[BUFSIZE];