diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-09-13 23:49:59 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-09-13 23:49:59 +0000 |
commit | 6aa048efc9fd2cb4b7ab3892f5bead6de345f514 (patch) | |
tree | 92898493ee11f13a1ea9f1c7a5484abe13586c8c /libcxxabi | |
parent | c7203ba19c9b88be36f4306ffdfd8c7cdc4de617 (diff) | |
download | llvm-6aa048efc9fd2cb4b7ab3892f5bead6de345f514.tar.gz |
Specifically disallow primary-expressions of the form LT_... on the basis of this decition: http://sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html . Failure to disallow this was causing infinite recursion in the demangler when these symbols show up due to mangling bugs. This patch causes the demangler to return an invalid mangled name result rather than crash in infinite recursion.
llvm-svn: 163859
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/cxa_demangle.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp index b46a0581f581..f16ee4f8fb00 100644 --- a/libcxxabi/src/cxa_demangle.cpp +++ b/libcxxabi/src/cxa_demangle.cpp @@ -6914,6 +6914,10 @@ __demangle_tree::__parse_expr_primary(const char* first, const char* last) first = t+1; } break; + case 'T': + // Invalid mangled name per + // http://sourcerytools.com/pipermail/cxx-abi-dev/2011-August/002422.html + break; default: { // might be named type |