Skip to content

Commit b9049f1

Browse files
committed
Fix crash in GNU3 demangler with specific non-mangled string
Fixes #6902 however we still need to figure out what we want to do about the type info names being invalid. There really is not a good way to tell without saying all type info names _must_ be mangled.
1 parent c4efe0a commit b9049f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

demangler/gnu3/demangle_gnu3.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,10 @@ TypeBuilder DemangleGNU3::DemangleSymbol(QualifiedName& varName)
21802180
else if (ext == ".eh_frame") ext = "exception handler frame";
21812181
else if (ext == ".eh_frame_hdr") ext = "exception handler frame header";
21822182
else if (ext == ".debug_frame") ext = "debug frame";
2183-
varName.back() += ext;
2183+
2184+
// On the off chance some invalid mangled string is passed in.
2185+
if (varName.size() > 0)
2186+
varName.back() += ext;
21842187
break;
21852188
}
21862189

0 commit comments

Comments
 (0)