================================================================= ==7241==ERROR: AddressSanitizer: heap-use-after-free on address 0x6210026a5d28 at pc 0x7f802b7f4430 bp 0x7f801c6af850 sp 0x7f801c6af840 WRITE of size 8 at 0x6210026a5d28 thread T31 (QThread) qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Adding Job<127,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<126,"clangcodemodelserver-test.cpp",UpdateExtraAnnotations,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<127,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Adding Job<128,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<126,"clangcodemodelserver-test.cpp",UpdateExtraAnnotations,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<127,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<128,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Adding Job<129,"clangcodemodelserver-test.cpp",RequestCompletions,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Expired: Job<125,"clangcodemodelserver-test.cpp",UpdateAnnotations,PreviouslyParsed> "outdated unsaved files" qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Expired: Job<126,"clangcodemodelserver-test.cpp",UpdateExtraAnnotations,RecentlyParsed> "outdated unsaved files" qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Expired: Job<127,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> "changed document revision" qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Expired: Job<128,"clangcodemodelserver-test.cpp",RequestReferences,RecentlyParsed> "changed document revision" qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Adding Job<130,"clangcodemodelserver-test.cpp",UpdateAnnotations,PreviouslyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Adding Job<131,"clangcodemodelserver-test.cpp",UpdateExtraAnnotations,RecentlyParsed> qtc.clangbackend.jobs: [ clangcodemodelserver-test.cpp ] Not choosing due to dirty document: Job<131,"clangcodemodelserver-test.cpp",UpdateExtraAnnotations,RecentlyParsed> #0 0x7f802b7f442f in clang::CodeCompletionResult::CreateCodeCompletionString(clang::ASTContext&, clang::Preprocessor&, clang::CodeCompletionContext const&, clang::CodeCompletionAllocator&, clang::CodeCompletionTUInfo&, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x467242f) #1 0x7f802b7f3322 in clang::CodeCompletionResult::CreateCodeCompletionString(clang::Sema&, clang::CodeCompletionContext const&, clang::CodeCompletionAllocator&, clang::CodeCompletionTUInfo&, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x4671322) #2 0x7f802a527c6f in (anonymous namespace)::CaptureCompletionResults::ProcessCodeCompleteResults(clang::Sema&, clang::CodeCompletionContext, clang::CodeCompletionResult*, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33a5c6f) #3 0x7f802b011841 in (anonymous namespace)::AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(clang::Sema&, clang::CodeCompletionContext, clang::CodeCompletionResult*, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e8f841) #4 0x7f802b7fa98d in HandleCodeCompleteResults(clang::Sema*, clang::CodeCompleteConsumer*, clang::CodeCompletionContext, clang::CodeCompletionResult*, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x467898d) #5 0x7f802b7fd0f7 in clang::Sema::CodeCompleteOrdinaryName(clang::Scope*, clang::Sema::ParserCompletionContext) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x467b0f7) #6 0x7f8030d259f0 in clang::Parser::handleUnexpectedCodeCompletionToken() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9ba39f0) #7 0x7f8030d14be3 in clang::Parser::SkipUntil(llvm::ArrayRef, clang::Parser::SkipUntilFlags) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b92be3) #8 0x7f8030d2c5b5 in clang::Parser::SkipUntil(clang::tok::TokenKind, clang::Parser::SkipUntilFlags) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9baa5b5) #9 0x7f8030d14c3d in clang::Parser::SkipUntil(llvm::ArrayRef, clang::Parser::SkipUntilFlags) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b92c3d) #10 0x7f8030d2c7bf in clang::Parser::SkipUntil(clang::tok::TokenKind, clang::tok::TokenKind, clang::Parser::SkipUntilFlags) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9baa7bf) #11 0x7f8030eee496 in clang::Parser::ConditionDeclarationOrInitStatementState::markNotExpression() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d6c496) #12 0x7f8030eee749 in clang::Parser::ConditionDeclarationOrInitStatementState::update(clang::Parser::TPResult) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d6c749) #13 0x7f8030ee9622 in clang::Parser::isCXXConditionDeclarationOrInitStatement(bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d67622) #14 0x7f8030e1a04a in clang::Parser::ParseCXXCondition(clang::ActionResult*, clang::SourceLocation, clang::Sema::ConditionKind) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9c9804a) #15 0x7f8030ebcabf in clang::Parser::ParseParenExprOrCondition(clang::ActionResult*, clang::Sema::ConditionResult&, clang::SourceLocation, clang::Sema::ConditionKind) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d3aabf) #16 0x7f8030ebd8bc in clang::Parser::ParseIfStatement(clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d3b8bc) #17 0x7f8030eb413e in clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d3213e) #18 0x7f8030eb2d37 in clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30d37) #19 0x7f8030eb2a38 in clang::Parser::ParseStatement(clang::SourceLocation*, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30a38) #20 0x7f8030eba9e6 in clang::Parser::ParseDefaultStatement() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d389e6) #21 0x7f8030eb4089 in clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d32089) #22 0x7f8030eb2d37 in clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30d37) #23 0x7f8030eb2a38 in clang::Parser::ParseStatement(clang::SourceLocation*, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30a38) #24 0x7f8030eb9a15 in clang::Parser::ParseCaseStatement(bool, clang::ActionResult) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d37a15) #25 0x7f8030eb4072 in clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d32072) #26 0x7f8030eb2d37 in clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30d37) #27 0x7f8030eb2a38 in clang::Parser::ParseStatement(clang::SourceLocation*, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30a38) #28 0x7f8030ebebe2 in clang::Parser::ParseSwitchStatement(clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d3cbe2) #29 0x7f8030eb415f in clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d3215f) #30 0x7f8030eb2d37 in clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::AllowedConstructsKind, clang::SourceLocation*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d30d37) #31 0x7f8030ebbf6c in clang::Parser::ParseCompoundStatementBody(bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d39f6c) #32 0x7f8030ec544d in clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9d4344d) #33 0x7f8030d1f30a in clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b9d30a) #34 0x7f8030d67f79 in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9be5f79) #35 0x7f8030d1cfda in clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b9afda) #36 0x7f8030d1d220 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b9b220) #37 0x7f8030d1bbe8 in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b99be8) #38 0x7f8030da2d23 in clang::Parser::ParseInnerNamespace(std::vector >&, std::vector >&, std::vector >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9c20d23) #39 0x7f8030da2915 in clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9c20915) #40 0x7f8030d660f6 in clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9be40f6) #41 0x7f8030d1b1f9 in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b991f9) #42 0x7f8030d194a0 in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b974a0) #43 0x7f8030d0f698 in clang::ParseAST(clang::Sema&, bool, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x9b8d698) #44 0x7f802b1ad1ea in clang::ASTFrontendAction::ExecuteAction() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x402b1ea) #45 0x7f802b1ac59a in clang::FrontendAction::Execute() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x402a59a) #46 0x7f802b0140c8 in clang::ASTUnit::CodeComplete(llvm::StringRef, unsigned int, unsigned int, llvm::ArrayRef, std::allocator >, llvm::MemoryBuffer*> >, bool, bool, bool, clang::CodeCompleteConsumer&, std::shared_ptr, clang::DiagnosticsEngine&, clang::LangOptions&, clang::SourceManager&, clang::FileManager&, llvm::SmallVectorImpl&, llvm::SmallVectorImpl&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e920c8) #47 0x7f802a529f75 in clang_codeCompleteAt_Impl(CXTranslationUnitImpl*, char const*, unsigned int, unsigned int, llvm::ArrayRef, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33a7f75) #48 0x7f802a52a36b in clang_codeCompleteAt::{lambda()#1}::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33a836b) #49 0x7f802a52be9a in void llvm::function_ref::callback_fn(long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33a9e9a) #50 0x7f802ec1876b in llvm::function_ref::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a9676b) #51 0x7f802ec17fad in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a95fad) #52 0x7f802a47d53f in clang::RunSafely(llvm::CrashRecoveryContext&, llvm::function_ref, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32fb53f) #53 0x7f802a52a93c in clang_codeCompleteAt (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33a893c) #54 0x556da1b8b91f in ClangBackEnd::CodeCompleter::completeHelper(unsigned int, unsigned int) source/codecompleter.cpp:194 #55 0x556da1b8c745 in ClangBackEnd::CodeCompleter::complete(unsigned int, unsigned int, int, int) source/codecompleter.cpp:117 #56 0x556da1b7cc9b in ClangBackEnd::TranslationUnit::complete(ClangBackEnd::UnsavedFiles&, unsigned int, unsigned int, int, int) const source/clangtranslationunit.cpp:118 #57 0x556da1b363f7 in operator() source/clangcompletecodejob.cpp:54 #58 0x556da1b363f7 in _M_invoke /usr/include/c++/7/bits/std_function.h:302 #59 0x556da1b39f35 in std::function ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 #60 0x556da1b39f35 in void Utils::Internal::runAsyncReturnVoidDispatch, std::function ()>>(std::integral_constant, QFutureInterface >, std::function ()>&&) ../../libs/utils/runextensions.h:250 #61 0x556da1b39f35 in void Utils::Internal::runAsyncQFutureInterfaceDispatch, std::function ()>>(std::integral_constant, QFutureInterface >, std::function ()>&&) ../../libs/utils/runextensions.h:264 #62 0x556da1b39f35 in void Utils::Internal::runAsyncMemberDispatch, std::function ()>, , void>(QFutureInterface >, std::function ()>&&) ../../libs/utils/runextensions.h:274 #63 0x556da1b3a606 in void Utils::Internal::runAsyncImpl, std::function ()>>(QFutureInterface >, std::function ()>&&) ../../libs/utils/runextensions.h:303 #64 0x556da1b3a606 in void Utils::Internal::AsyncJob, std::function ()>&>::runHelper<0ul>(std::integer_sequence) ../../libs/utils/runextensions.h:372 #65 0x556da1b3a606 in Utils::Internal::AsyncJob, std::function ()>&>::run() ../../libs/utils/runextensions.h:352 #66 0x7f803c60a4bc in Utils::Internal::RunnableThread::run() (/d1/creator/ut/4.8/release/libexec/qtcreator/../../lib/qtcreator/libUtils.so.4+0x1664bc) #67 0x7f8026741563 in QThreadPrivate::start(void*) (/home/nik/opt/qt-5.11.2/5.11.2/gcc_64/lib/libQt5Core.so.5+0xae563) #68 0x7f80256dd6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da) #69 0x7f8025e2288e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x12188e) 0x6210026a5d28 is located 40 bytes inside of 4096-byte region [0x6210026a5d00,0x6210026a6d00) freed by thread T32 (QThread) here: #0 0x7f803ceeb7b8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7b8) #1 0x7f802a48f09d in llvm::MallocAllocator::Deallocate(void const*, unsigned long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x330d09d) #2 0x7f802a540ef4 in llvm::BumpPtrAllocatorImpl::DeallocateSlabs(void**, void**) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33beef4) #3 0x7f802a540c3e in llvm::BumpPtrAllocatorImpl::~BumpPtrAllocatorImpl() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33bec3e) #4 0x7f802a54063b in clang::CodeCompletionAllocator::~CodeCompletionAllocator() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33be63b) #5 0x7f802a5418f1 in clang::GlobalCodeCompletionAllocator::~GlobalCodeCompletionAllocator() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33bf8f1) #6 0x7f802a541911 in void __gnu_cxx::new_allocator::destroy(clang::GlobalCodeCompletionAllocator*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33bf911) #7 0x7f802a5418c8 in void std::allocator_traits >::destroy(std::allocator&, clang::GlobalCodeCompletionAllocator*) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33bf8c8) #8 0x7f802a5415fe in std::_Sp_counted_ptr_inplace, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33bf5fe) #9 0x7f802a4ce7fa in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x334c7fa) #10 0x7f802a4b8073 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3336073) #11 0x7f802a4b48ed in std::__shared_ptr::~__shared_ptr() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33328ed) #12 0x7f802a539962 in std::__shared_ptr::operator=(std::__shared_ptr&&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33b7962) #13 0x7f802a536b09 in std::shared_ptr::operator=(std::shared_ptr&&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33b4b09) #14 0x7f802affe800 in clang::ASTUnit::ClearCachedCompletionResults() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e7c800) #15 0x7f802affcf68 in clang::ASTUnit::CacheCodeCompletionResults() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e7af68) #16 0x7f802b00f660 in clang::ASTUnit::Reparse(std::shared_ptr, llvm::ArrayRef, std::allocator >, llvm::MemoryBuffer*> >, llvm::IntrusiveRefCntPtr) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e8d660) #17 0x7f802a44e4a6 in clang_reparseTranslationUnit_Impl(CXTranslationUnitImpl*, llvm::ArrayRef, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32cc4a6) #18 0x7f802a44e7ad in clang_reparseTranslationUnit::{lambda()#1}::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32cc7ad) #19 0x7f802a4874cb in void llvm::function_ref::callback_fn(long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33054cb) #20 0x7f802ec1876b in llvm::function_ref::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a9676b) #21 0x7f802ec17fad in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a95fad) #22 0x7f802a47d53f in clang::RunSafely(llvm::CrashRecoveryContext&, llvm::function_ref, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32fb53f) #23 0x7f802a44ec68 in clang_reparseTranslationUnit (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32ccc68) #24 0x556da1b822f7 in ClangBackEnd::TranslationUnitUpdater::reparse() source/clangtranslationunitupdater.cpp:147 #25 0x7f8010913a1f () previously allocated by thread T28 (QThread) here: #0 0x7f803ceebb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) #1 0x7f802a423cf2 in llvm::safe_malloc(unsigned long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32a1cf2) #2 0x7f802a48f07b in llvm::MallocAllocator::Allocate(unsigned long, unsigned long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x330d07b) #3 0x7f802a4d2e5b in llvm::BumpPtrAllocatorImpl::StartNewSlab() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3350e5b) #4 0x7f802a4bd2ee in llvm::BumpPtrAllocatorImpl::Allocate(unsigned long, unsigned long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x333b2ee) #5 0x7f802b73c7c6 in clang::CodeCompletionAllocator::CopyString(llvm::Twine const&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x45ba7c6) #6 0x7f802b7e78a8 in GetCompletionTypeString(clang::QualType, clang::ASTContext&, clang::PrintingPolicy const&, clang::CodeCompletionAllocator&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x46658a8) #7 0x7f802b7ed37b in AddResultTypeChunk(clang::ASTContext&, clang::PrintingPolicy const&, clang::NamedDecl const*, clang::QualType, clang::CodeCompletionBuilder&) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x466b37b) #8 0x7f802b7f4ecc in clang::CodeCompletionResult::CreateCodeCompletionString(clang::ASTContext&, clang::Preprocessor&, clang::CodeCompletionContext const&, clang::CodeCompletionAllocator&, clang::CodeCompletionTUInfo&, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x4672ecc) #9 0x7f802b7f3322 in clang::CodeCompletionResult::CreateCodeCompletionString(clang::Sema&, clang::CodeCompletionContext const&, clang::CodeCompletionAllocator&, clang::CodeCompletionTUInfo&, bool) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x4671322) #10 0x7f802affd40e in clang::ASTUnit::CacheCodeCompletionResults() (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e7b40e) #11 0x7f802b00f660 in clang::ASTUnit::Reparse(std::shared_ptr, llvm::ArrayRef, std::allocator >, llvm::MemoryBuffer*> >, llvm::IntrusiveRefCntPtr) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x3e8d660) #12 0x7f802a44e4a6 in clang_reparseTranslationUnit_Impl(CXTranslationUnitImpl*, llvm::ArrayRef, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32cc4a6) #13 0x7f802a44e7ad in clang_reparseTranslationUnit::{lambda()#1}::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32cc7ad) #14 0x7f802a4874cb in void llvm::function_ref::callback_fn(long) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x33054cb) #15 0x7f802ec1876b in llvm::function_ref::operator()() const (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a9676b) #16 0x7f802ec17fad in llvm::CrashRecoveryContext::RunSafely(llvm::function_ref) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x7a95fad) #17 0x7f802a47d53f in clang::RunSafely(llvm::CrashRecoveryContext&, llvm::function_ref, unsigned int) (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32fb53f) #18 0x7f802a44ec68 in clang_reparseTranslationUnit (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x32ccc68) #19 0x556da1b822f7 in ClangBackEnd::TranslationUnitUpdater::reparse() source/clangtranslationunitupdater.cpp:147 #20 0x60700011553f () Thread T31 (QThread) created by T0 here: #0 0x7f803ce44d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f) #1 0x7f8026740c57 in QThread::start(QThread::Priority) (/home/nik/opt/qt-5.11.2/5.11.2/gcc_64/lib/libQt5Core.so.5+0xadc57) Thread T32 (QThread) created by T0 here: #0 0x7f803ce44d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f) #1 0x7f8026740c57 in QThread::start(QThread::Priority) (/home/nik/opt/qt-5.11.2/5.11.2/gcc_64/lib/libQt5Core.so.5+0xadc57) Thread T28 (QThread) created by T0 here: #0 0x7f803ce44d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f) #1 0x7f8026740c57 in QThread::start(QThread::Priority) (/home/nik/opt/qt-5.11.2/5.11.2/gcc_64/lib/libQt5Core.so.5+0xadc57) SUMMARY: AddressSanitizer: heap-use-after-free (/d2/llvm/7/qtc/installs/Release/lib/libclang.so.7+0x467242f) in clang::CodeCompletionResult::CreateCodeCompletionString(clang::ASTContext&, clang::Preprocessor&, clang::CodeCompletionContext const&, clang::CodeCompletionAllocator&, clang::CodeCompletionTUInfo&, bool) Shadow bytes around the buggy address: 0x0c42804ccb50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c42804ccb60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c42804ccb70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c42804ccb80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c42804ccb90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c42804ccba0: fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd 0x0c42804ccbb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c42804ccbc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c42804ccbd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c42804ccbe0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c42804ccbf0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==7241==ABORTING