diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2019-04-16 14:10:34 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2019-04-16 14:10:34 +0000 |
| commit | c035c243da36e2fa867626ef8af467fdda73ac80 (patch) | |
| tree | d4cab705263fac33b2896f6f9003d885083cdf74 /llvm/test/Demangle | |
| parent | a0a2264ef757f8383c6b283b7ad80b33d5d52f13 (diff) | |
| download | bcm5719-llvm-c035c243da36e2fa867626ef8af467fdda73ac80.tar.gz bcm5719-llvm-c035c243da36e2fa867626ef8af467fdda73ac80.zip | |
llvm-undname: Fix nullptr deref on invalid structor names in template args
Similar to r358421: A StructorIndentifierNode has a Class field which
is read when printing it, but if the StructorIndentifierNode appears in
a template argument then demangleFullyQualifiedSymbolName() which sets
Class isn't called. Since StructorIndentifierNodes are always leaf
names, we can just reject them as well.
Found by oss-fuzz.
llvm-svn: 358491
Diffstat (limited to 'llvm/test/Demangle')
| -rw-r--r-- | llvm/test/Demangle/invalid-manglings.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Demangle/invalid-manglings.test b/llvm/test/Demangle/invalid-manglings.test index dcfc99f3e54..84c2b32bf20 100644 --- a/llvm/test/Demangle/invalid-manglings.test +++ b/llvm/test/Demangle/invalid-manglings.test @@ -134,3 +134,8 @@ ; CHECK-EMPTY: ; CHECK-NEXT: ?foo@?$?BH@@QAEHXZ ; CHECK-NEXT: error: Invalid mangled name + +?foo@?$?0H@ +; CHECK-EMPTY: +; CHECK-NEXT: ?foo@?$?0H@ +; CHECK-NEXT: error: Invalid mangled name |

