• Kevin Funk's avatar
    clang: Fix severe memory leak in comment parser · e960b70b
    Kevin Funk authored
    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
    e960b70b
builder.cpp 60.5 KB