llvm.org GIT mirror llvm / eaedc02
llvm-undname: Fix another crash-on-invalid found by oss-fuzz git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358363 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 1 year, 7 months ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
653653 IdentifierNode *
654654 Demangler::demangleFunctionIdentifierCode(StringView &MangledName,
655655 FunctionIdentifierCodeGroup Group) {
656 assert(!MangledName.empty());
656 if (MangledName.empty()) {
657 Error = true;
658 return nullptr;
659 }
657660 switch (Group) {
658661 case FunctionIdentifierCodeGroup::Basic:
659662 switch (char CH = MangledName.popFront()) {
113113 ; CHECK-EMPTY:
114114 ; CHECK-NEXT: ??}
115115 ; CHECK-NEXT: error: Invalid mangled name
116
117 ?foo@?$?_
118 ; CHECK-EMPTY:
119 ; CHECK-NEXT: ?foo@?$?_
120 ; CHECK-NEXT: error: Invalid mangled name