This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/43838] [4.4/4.5/4.6 Regression] Incorrect output from abi::__cxa_demangle
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2010 08:54:59 -0000
- Subject: [Bug libstdc++/43838] [4.4/4.5/4.6 Regression] Incorrect output from abi::__cxa_demangle
- References: <bug-43838-19071@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from paolo dot carlini at oracle dot com 2010-06-09 08:54 -------
Non pre-processed testcase. Apparently some buffer is overflowed.
#include <cxxabi.h>
namespace abcdefgxyzzzaaaaabbbbbb
{
class Aaa { };
namespace klmn
{
class Baaaaaaaaaaaaaaa { };
}
}
namespace boost
{
namespace tuples
{
class null_type;
template<typename T1 = null_type, typename T2 = null_type,
typename T3 = null_type, typename T4 = null_type,
typename T5 = null_type, typename T6 = null_type,
typename T7 = null_type, typename T8 = null_type,
typename T9 = null_type, typename T10 = null_type>
struct tuple { };
}
}
int main()
{
int status = 0;
const char* mangled_name
= typeid(boost::tuples::tuple<abcdefgxyzzzaaaaabbbbbb::Aaa,
abcdefgxyzzzaaaaabbbbbb::klmn::Baaaaaaaaaaaaaaa>).name();
__builtin_printf("Mangled name:\n%s\n\n", mangled_name);
const char* dem_name = abi::__cxa_demangle(mangled_name, 0, 0, &status);
if (0 == status)
__builtin_printf("Demangled name:\n\n%s\n\n", dem_name);
return 0;
}
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incorrect output from |[4.4/4.5/4.6 Regression]
|abi::__cxa_demangle |Incorrect output from
| |abi::__cxa_demangle
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43838