My 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. -jfw --- a/boost/python/type_id.hpp +++ b/boost/python/type_id.hpp @@ -17,14 +17,6 @@ # include # include -# ifndef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -# if defined(__GNUC__) \ - && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) \ - && !defined(__EDG_VERSION__) -# define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -# endif -# endif - namespace boost { namespace python { // for this compiler at least, cross-shared-library type_info --- a/boost/units/detail/utility.hpp +++ b/boost/units/detail/utility.hpp @@ -15,12 +15,8 @@ #include #include -#if defined(__GLIBCXX__) || defined(__GLIBCPP__) -#define BOOST_UNITS_USE_DEMANGLING -#include -#endif // __GNUC__ - #ifdef BOOST_UNITS_USE_DEMANGLING +#include #include --- a/libs/graph/test/typestr.hpp +++ b/libs/graph/test/typestr.hpp @@ -25,7 +25,8 @@ */ template std::string typestr() { -#if defined(__GNUC__) +#if 0 + /* 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 */ std::size_t const BUFSIZE = 8192; std::size_t n = BUFSIZE; char buf[BUFSIZE];