summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-09-13 23:49:59 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-09-13 23:49:59 +0000
commit6aa048efc9fd2cb4b7ab3892f5bead6de345f514 (patch)
tree92898493ee11f13a1ea9f1c7a5484abe13586c8c
parentc7203ba19c9b88be36f4306ffdfd8c7cdc4de617 (diff)
downloadbcm5719-llvm-6aa048efc9fd2cb4b7ab3892f5bead6de345f514.tar.gz
bcm5719-llvm-6aa048efc9fd2cb4b7ab3892f5bead6de345f514.zip
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
-rw-r--r--libcxxabi/src/cxa_demangle.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp
index b46a0581f58..f16ee4f8fb0 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
OpenPOWER on IntegriCloud