clang: Fix severe memory leak in comment parser

Authored by kfunk on May 17 2018, 9:29 AM.

Description

clang: Fix severe memory leak in comment parser

Detected by ASAN:

Direct leak of 243151 byte(s) in 747 object(s) allocated from:
    #0 0x4e1710 in __interceptor_malloc (/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x4e1710)
    #1 0x7effd10b3221 in clang::cxstring::createDup(llvm::StringRef) /home/kfunk/devel/src/llvm/tools/clang/tools/libclang/CXString.cpp:99:40
    #2 0x7effd10b3221 in clang::cxstring::createRef(llvm::StringRef) /home/kfunk/devel/src/llvm/tools/clang/tools/libclang/CXString.cpp:89
    #3 0x7effd1292ae3 in void (anonymous namespace)::Visitor::setDeclData<(CXCursorKind)21>(CXCursor, KDevelop::ClassMemberDeclaration*) const /home/kfunk/devel/src/kf5/kdevelop-stable/plugins/clang/duchain/builder.cpp:1024:5
    #4 0x7effd1291bd0 in void (anonymous namespace)::Visitor::setDeclData<(CXCursorKind)21>(CXCursor, KDevelop::ClassFunctionDeclaration*) const /home/kfunk/devel/src/kf5/kdevelop-stable/plugins/clang/duchain/builder.cpp:1113:5
    ...

CCMAIL: mail@svenbrauch.de

Details

Committed
kfunkMay 17 2018, 9:33 AM
Parents
R32:4b0201a7cfa3: Minor: Fix -Wunused-lambda-capture warning
Branches
Unknown
Tags
Unknown