Manna created this revision. Manna added a reviewer: zturner. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Manna requested review of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Reported by Coverity Static Analyzer Tool: Inside "MicrosoftDemangle.cpp" file, in llvm::ms_demangle::Demangler::demangleTemplateInstantiationName(std::basic_string_view<char, std::char_traits<char>> &, llvm::ms_demangle::NameBackrefBehavior): Use of an uninitialized value OuterContext. Field OuterContext.FunctionParams is uninitialized when calling swap in the function. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150960 Files: llvm/include/llvm/Demangle/MicrosoftDemangle.h Index: llvm/include/llvm/Demangle/MicrosoftDemangle.h =================================================================== --- llvm/include/llvm/Demangle/MicrosoftDemangle.h +++ llvm/include/llvm/Demangle/MicrosoftDemangle.h @@ -114,7 +114,7 @@ struct BackrefContext { static constexpr size_t Max = 10; - TypeNode *FunctionParams[Max]; + TypeNode *FunctionParams[Max] = nullptr; size_t FunctionParamCount = 0; // The first 10 BackReferences in a mangled name can be back-referenced by
Index: llvm/include/llvm/Demangle/MicrosoftDemangle.h =================================================================== --- llvm/include/llvm/Demangle/MicrosoftDemangle.h +++ llvm/include/llvm/Demangle/MicrosoftDemangle.h @@ -114,7 +114,7 @@ struct BackrefContext { static constexpr size_t Max = 10; - TypeNode *FunctionParams[Max]; + TypeNode *FunctionParams[Max] = nullptr; size_t FunctionParamCount = 0; // The first 10 BackReferences in a mangled name can be back-referenced by
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits