llvm-project/llvm/lib/Demangle
Nico Weber 63b97d2a67 llvm-undname: Fix more crashes and asserts on invalid inputs
For functions whose callers don't check that enough input is present,
add checks at the start of the function that enough input is there and
set Error otherwise.

For functions that return AST objects, return nullptr instead of
incomplete AST objects with nullptr fields if an error occurred during
the function.

Introduce a new function demangleDeclarator() for the sequence
demangleFullyQualifiedSymbolName(); demangleEncodedSymbol() and
use it in the two places that had this sequence. Let this new function
check that ConversionOperatorIdentifiers have a valid TargetType.

Some of the bad inputs found by oss-fuzz, others by inspection.

Differential Revision: https://reviews.llvm.org/D60354

llvm-svn: 357936
2019-04-08 19:46:53 +00:00
..
CMakeLists.txt Move demangling function from llvm-objdump to Demangle library 2019-01-17 15:18:44 +00:00
Demangle.cpp Add missing include (cstdlib) to Demangle.h 2019-01-22 19:18:18 +00:00
ItaniumDemangle.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicrosoftDemangle.cpp llvm-undname: Fix more crashes and asserts on invalid inputs 2019-04-08 19:46:53 +00:00
MicrosoftDemangleNodes.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00