Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clangd] Crash when completing code #125500

Open
HenryAWE opened this issue Feb 3, 2025 · 1 comment
Open

[clangd] Crash when completing code #125500

HenryAWE opened this issue Feb 3, 2025 · 1 comment
Labels
clangd crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@HenryAWE
Copy link

HenryAWE commented Feb 3, 2025

I'm using clangd with this project, and it crash when trying to complete the second argument of this line. You can reproduce this error by deleting the second argument (now this line is .method("void from_var_type(const ?&in)")), then type a comma (,) and trigger the code completion (.method("void from_var_type(const ?&in)", ^), ^ is the position of input cursor).

My clangd version is 19.1.2, installed by the VSCode extension.

Stacktrace

 #0 0x000000000055715b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /__w/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x0000000000554fbe llvm::sys::RunSignalHandlers() /__w/clangd/clangd/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x0000000000557af6 SignalHandler(int) /__w/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #3 0x00007f15707d0320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #4 0x000000000095e5d1 clang::TemplateArgument::isPackExpansion() const /__w/clangd/clangd/llvm-project/clang/lib/AST/TemplateBase.cpp:323:3
 #5 0x0000000000cec428 clang::Sema::getMoreSpecializedTemplate(clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*, clang::SourceLocation, clang::TemplatePartialOrderingContext, unsigned int, clang::QualType, clang::QualType, bool) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:5669:51
 #6 0x0000000000c18299 clang::isBetterOverloadCandidate(clang::Sema&, clang::OverloadCandidate const&, clang::OverloadCandidate const&, clang::SourceLocation, clang::OverloadCandidateSet::CandidateSetKind) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaOverload.cpp:10458:50
 #7 0x0000000000f89e25 __move_merge_adaptive_backward<clang::OverloadCandidate *, clang::OverloadCandidate *, clang::OverloadCandidate *, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)> > /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:0:0
 #8 0x0000000000f89e25 void std::__merge_adaptive<clang::OverloadCandidate*, long, clang::OverloadCandidate*, __gnu_cxx::__ops::_Iter_comp_iter<mergeCandidatesWithResults(clang::Sema&, llvm::SmallVectorImpl<clang::CodeCompleteConsumer::OverloadCandidate>&, clang::OverloadCandidateSet&, clang::SourceLocation, unsigned long)::$_16>>(clang::OverloadCandidate*, clang::OverloadCandidate*, clang::OverloadCandidate*, long, long, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter<mergeCandidatesWithResults(clang::Sema&, llvm::SmallVectorImpl<clang::CodeCompleteConsumer::OverloadCandidate>&, clang::OverloadCandidateSet&, clang::SourceLocation, unsigned long)::$_16>) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:2431:4
 #9 0x0000000000f87ed7 void std::__stable_sort_adaptive<clang::OverloadCandidate*, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter<mergeCandidatesWithResults(clang::Sema&, llvm::SmallVectorImpl<clang::CodeCompleteConsumer::OverloadCandidate>&, clang::OverloadCandidateSet&, clang::SourceLocation, unsigned long)::$_16>>(clang::OverloadCandidate*, clang::OverloadCandidate*, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter<mergeCandidatesWithResults(clang::Sema&, llvm::SmallVectorImpl<clang::CodeCompleteConsumer::OverloadCandidate>&, clang::OverloadCandidateSet&, clang::SourceLocation, unsigned long)::$_16>) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:2756:5
#10 0x0000000000f59d81 __destroy<clang::OverloadCandidate *> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_construct.h:107:19
#11 0x0000000000f59d81 _Destroy<clang::OverloadCandidate *> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_construct.h:136:7
#12 0x0000000000f59d81 ~_Temporary_buffer /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tempbuf.h:167:2
#13 0x0000000000f59d81 __stable_sort<clang::OverloadCandidate *, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)> > /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:5010:5
#14 0x0000000000f59d81 stable_sort<clang::OverloadCandidate *, (lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:5077:7
#15 0x0000000000f59d81 stable_sort<clang::OverloadCandidateSet &, (lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)> /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2001:3
#16 0x0000000000f59d81 mergeCandidatesWithResults(clang::Sema&, llvm::SmallVectorImpl<clang::CodeCompleteConsumer::OverloadCandidate>&, clang::OverloadCandidateSet&, clang::SourceLocation, unsigned long) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:3
#17 0x0000000000f59a80 clang::SemaCodeCompletion::ProduceCallSignatureHelp(clang::Expr*, llvm::ArrayRef<clang::Expr*>, clang::SourceLocation) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6327:45
#18 0x000000000453cd6f operator() /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:2198:29
#19 0x000000000453cd6f clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:2213:15
#20 0x000000000453f636 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:1945:9
#21 0x000000000453b581 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:712:20
#22 0x0000000004539d73 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:185:10
#23 0x0000000004539ca9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:134:10
#24 0x00000000045a6d45 isInvalid /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/Ownership.h:199:41
#25 0x00000000045a6d45 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:555:12
#26 0x00000000045a5196 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:292:14
#27 0x00000000045a49b8 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:124:20
#28 0x00000000045adcb1 clang::Parser::ParseCompoundStatementBody(bool) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:1248:11
#29 0x00000000045af26d clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:2526:21
#30 0x00000000044e3431 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0:0
#31 0x0000000004504bde clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:0
#32 0x00000000044e2237 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1249:10
#33 0x00000000044e1bb1 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1271:12
#34 0x00000000044e0d23 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1074:14
#35 0x00000000045216cb ~AttributePool /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:726:22
#36 0x00000000045216cb ~ParsedAttributes /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:958:7
#37 0x00000000045216cb clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:273:5
#38 0x00000000045210a8 Exit /__w/clangd/clangd/llvm-project/clang/include/clang/Parse/Parser.h:1196:11
#39 0x00000000045210a8 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#40 0x00000000045023ee clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:0
#41 0x00000000044e003a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0:3
#42 0x00000000044deaf9 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:763:12
#43 0x00000000044de2df clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:608:26
#44 0x00000000044da548 clang::ParseAST(clang::Sema&, bool, bool) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseAST.cpp:170:25
#45 0x000000000411b83b clang::FrontendAction::Execute() /__w/clangd/clangd/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1082:10
#46 0x00000000015f9ac5 getPtr /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:282:12
#47 0x00000000015f9ac5 operator bool /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:242:16
#48 0x00000000015f9ac5 clang::clangd::(anonymous namespace)::semaCodeComplete(std::unique_ptr<clang::CodeCompleteConsumer, std::default_delete<clang::CodeCompleteConsumer>>, clang::CodeCompleteOptions const&, clang::clangd::(anonymous namespace)::SemaCompleteInput const&, clang::clangd::IncludeStructure*) /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1427:19
#49 0x00000000015fc734 ~unique_ptr /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unique_ptr.h:262:6
#50 0x00000000015fc734 run /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1694:5
#51 0x00000000015fc734 clang::clangd::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::PreambleData const*, clang::clangd::ParseInputs const&, clang::clangd::CodeCompleteOptions, clang::clangd::SpeculativeFuzzyFind*) /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:2245:32
#52 0x00000000015eb5dd ~_Function_base /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:275:11
#53 0x00000000015eb5dd ~CodeCompleteOptions /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.h:42:8
#54 0x00000000015eb5dd operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:456:33
#55 0x00000000015eb5dd void llvm::detail::UniqueFunctionBase<void, llvm::Expected<clang::clangd::InputsAndPreamble>>::CallImpl<clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&, llvm::unique_function<void (llvm::Expected<clang::clangd::CodeCompleteResult>)>)::$_0>(void*, llvm::Expected<clang::clangd::InputsAndPreamble>&) /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:220:12
#56 0x00000000017998fb ~Expected /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:563:10
#57 0x00000000017998fb operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1807:5
#58 0x00000000017998fb void llvm::detail::UniqueFunctionBase<void>::CallImpl<clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function<void (llvm::Expected<clang::clangd::InputsAndPreamble>)>)::$_3>(void*) /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:220:12
#59 0x000000000190f7c1 operator= /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:48:5
#60 0x000000000190f7c1 PunnedPointer /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:37:60
#61 0x000000000190f7c1 PointerIntPair /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:86:13
#62 0x000000000190f7c1 UniqueFunctionBase /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:340:3
#63 0x000000000190f7c1 unique_function /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:369:3
#64 0x000000000190f7c1 operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:103:14
#65 0x000000000190f7c1 operator()<(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &> /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:43:11
#66 0x000000000190f7c1 __invoke_impl<void, (lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), (lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/invoke.h:60:14
#67 0x000000000190f7c1 __invoke<(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), (lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/invoke.h:95:14
#68 0x000000000190f7c1 __apply_impl<(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), std::tuple<(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)> &, 0> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/tuple:1662:14
#69 0x000000000190f7c1 apply<(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), std::tuple<(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)> &> /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/tuple:1671:14
#70 0x000000000190f7c1 GenericThreadProxy<std::tuple<(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)> > /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:41:5
#71 0x000000000190f7c1 void* llvm::thread::ThreadProxy<std::tuple<clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&, llvm::unique_function<void ()>)::$_1>>(void*) /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:55:5
#72 0x00007f1570827a94 start_thread ./nptl/pthread_create.c:447:8
#73 0x00007f15708b4c3c clone3 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80:0
Signalled during preamble action: CodeComplete
  Filename: /home/awe/devel/asbind20/test/test_bind/ref_class.cpp
  Directory: /home/awe/devel/asbind20/build
  Command Line: /usr/lib/llvm-18/bin/clang++-18 --driver-mode=g++ -I/home/awe/devel/asbind20/test/. -I/home/awe/devel/asbind20/include -I/home/awe/devel/asbind20/ext/utility/include -I/home/awe/devel/asbind20/ext/container/include -isystem /home/awe/devel/asbind20/build/vcpkg_installed/x64-linux/include -isystem /home/awe/devel/asbind20/build/_deps/googletest-src/googletest/include -isystem /home/awe/devel/asbind20/build/_deps/googletest-src/googletest -g -std=gnu++20 -Wall -Wextra -Wpedantic -Werror -o test/test_bind/CMakeFiles/test_bind.dir/ref_class.cpp.o -c -resource-dir=/home/awe/.vscode-server/data/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/19.1.2/clangd_19.1.2/lib/clang/19 -- /home/awe/devel/asbind20/test/test_bind/ref_class.cpp
@dtcxzyw dtcxzyw added clangd crash Prefer [crash-on-valid] or [crash-on-invalid] and removed new issue labels Feb 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 3, 2025

@llvm/issue-subscribers-clangd

Author: HenryAWE (HenryAWE)

I'm using clangd with [this project](https://github.com/HenryAWE/asbind20), and it crash when trying to complete the second argument of [this line](https://github.com/HenryAWE/asbind20/blob/55c3c2284bb60efc57e783f359baf4f7e97a250a/test/test_bind/ref_class.cpp#L110). You can reproduce this error by deleting the second argument (now this line is `.method("void from_var_type(const ?&in)")`), then type a comma (`,`) and trigger the code completion (`.method("void from_var_type(const ?&in)", ^)`, ^ is the position of input cursor).

My clangd version is 19.1.2, installed by the VSCode extension.

Stacktrace

 #<!-- -->0 0x000000000055715b llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) /__w/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #<!-- -->1 0x0000000000554fbe llvm::sys::RunSignalHandlers() /__w/clangd/clangd/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #<!-- -->2 0x0000000000557af6 SignalHandler(int) /__w/clangd/clangd/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #<!-- -->3 0x00007f15707d0320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #<!-- -->4 0x000000000095e5d1 clang::TemplateArgument::isPackExpansion() const /__w/clangd/clangd/llvm-project/clang/lib/AST/TemplateBase.cpp:323:3
 #<!-- -->5 0x0000000000cec428 clang::Sema::getMoreSpecializedTemplate(clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*, clang::SourceLocation, clang::TemplatePartialOrderingContext, unsigned int, clang::QualType, clang::QualType, bool) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:5669:51
 #<!-- -->6 0x0000000000c18299 clang::isBetterOverloadCandidate(clang::Sema&amp;, clang::OverloadCandidate const&amp;, clang::OverloadCandidate const&amp;, clang::SourceLocation, clang::OverloadCandidateSet::CandidateSetKind) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaOverload.cpp:10458:50
 #<!-- -->7 0x0000000000f89e25 __move_merge_adaptive_backward&lt;clang::OverloadCandidate *, clang::OverloadCandidate *, clang::OverloadCandidate *, __gnu_cxx::__ops::_Iter_comp_iter&lt;(lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)&gt; &gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:0:0
 #<!-- -->8 0x0000000000f89e25 void std::__merge_adaptive&lt;clang::OverloadCandidate*, long, clang::OverloadCandidate*, __gnu_cxx::__ops::_Iter_comp_iter&lt;mergeCandidatesWithResults(clang::Sema&amp;, llvm::SmallVectorImpl&lt;clang::CodeCompleteConsumer::OverloadCandidate&gt;&amp;, clang::OverloadCandidateSet&amp;, clang::SourceLocation, unsigned long)::$_16&gt;&gt;(clang::OverloadCandidate*, clang::OverloadCandidate*, clang::OverloadCandidate*, long, long, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter&lt;mergeCandidatesWithResults(clang::Sema&amp;, llvm::SmallVectorImpl&lt;clang::CodeCompleteConsumer::OverloadCandidate&gt;&amp;, clang::OverloadCandidateSet&amp;, clang::SourceLocation, unsigned long)::$_16&gt;) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:2431:4
 #<!-- -->9 0x0000000000f87ed7 void std::__stable_sort_adaptive&lt;clang::OverloadCandidate*, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter&lt;mergeCandidatesWithResults(clang::Sema&amp;, llvm::SmallVectorImpl&lt;clang::CodeCompleteConsumer::OverloadCandidate&gt;&amp;, clang::OverloadCandidateSet&amp;, clang::SourceLocation, unsigned long)::$_16&gt;&gt;(clang::OverloadCandidate*, clang::OverloadCandidate*, clang::OverloadCandidate*, long, __gnu_cxx::__ops::_Iter_comp_iter&lt;mergeCandidatesWithResults(clang::Sema&amp;, llvm::SmallVectorImpl&lt;clang::CodeCompleteConsumer::OverloadCandidate&gt;&amp;, clang::OverloadCandidateSet&amp;, clang::SourceLocation, unsigned long)::$_16&gt;) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:2756:5
#<!-- -->10 0x0000000000f59d81 __destroy&lt;clang::OverloadCandidate *&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_construct.h:107:19
#<!-- -->11 0x0000000000f59d81 _Destroy&lt;clang::OverloadCandidate *&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_construct.h:136:7
#<!-- -->12 0x0000000000f59d81 ~_Temporary_buffer /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tempbuf.h:167:2
#<!-- -->13 0x0000000000f59d81 __stable_sort&lt;clang::OverloadCandidate *, __gnu_cxx::__ops::_Iter_comp_iter&lt;(lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)&gt; &gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:5010:5
#<!-- -->14 0x0000000000f59d81 stable_sort&lt;clang::OverloadCandidate *, (lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:5077:7
#<!-- -->15 0x0000000000f59d81 stable_sort&lt;clang::OverloadCandidateSet &amp;, (lambda at /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:35)&gt; /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2001:3
#<!-- -->16 0x0000000000f59d81 mergeCandidatesWithResults(clang::Sema&amp;, llvm::SmallVectorImpl&lt;clang::CodeCompleteConsumer::OverloadCandidate&gt;&amp;, clang::OverloadCandidateSet&amp;, clang::SourceLocation, unsigned long) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6103:3
#<!-- -->17 0x0000000000f59a80 clang::SemaCodeCompletion::ProduceCallSignatureHelp(clang::Expr*, llvm::ArrayRef&lt;clang::Expr*&gt;, clang::SourceLocation) /__w/clangd/clangd/llvm-project/clang/lib/Sema/SemaCodeComplete.cpp:6327:45
#<!-- -->18 0x000000000453cd6f operator() /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:2198:29
#<!-- -->19 0x000000000453cd6f clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult&lt;clang::Expr*, true&gt;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:2213:15
#<!-- -->20 0x000000000453f636 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&amp;, clang::Parser::TypeCastState, bool, bool*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:1945:9
#<!-- -->21 0x000000000453b581 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:712:20
#<!-- -->22 0x0000000004539d73 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:185:10
#<!-- -->23 0x0000000004539ca9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseExpr.cpp:134:10
#<!-- -->24 0x00000000045a6d45 isInvalid /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/Ownership.h:199:41
#<!-- -->25 0x00000000045a6d45 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:555:12
#<!-- -->26 0x00000000045a5196 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&lt;clang::Stmt*, 32u&gt;&amp;, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:292:14
#<!-- -->27 0x00000000045a49b8 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&lt;clang::Stmt*, 32u&gt;&amp;, clang::Parser::ParsedStmtContext, clang::SourceLocation*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:124:20
#<!-- -->28 0x00000000045adcb1 clang::Parser::ParseCompoundStatementBody(bool) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:1248:11
#<!-- -->29 0x00000000045af26d clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&amp;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseStmt.cpp:2526:21
#<!-- -->30 0x00000000044e3431 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&amp;, clang::Parser::ParsedTemplateInfo const&amp;, clang::Parser::LateParsedAttrList*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0:0
#<!-- -->31 0x0000000004504bde clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&amp;, clang::DeclaratorContext, clang::ParsedAttributes&amp;, clang::Parser::ParsedTemplateInfo&amp;, clang::SourceLocation*, clang::Parser::ForRangeInit*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:0
#<!-- -->32 0x00000000044e2237 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec&amp;, clang::AccessSpecifier) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1249:10
#<!-- -->33 0x00000000044e1bb1 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*, clang::AccessSpecifier) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1271:12
#<!-- -->34 0x00000000044e0d23 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:1074:14
#<!-- -->35 0x00000000045216cb ~AttributePool /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:726:22
#<!-- -->36 0x00000000045216cb ~ParsedAttributes /__w/clangd/clangd/llvm-project/clang/include/clang/Sema/ParsedAttr.h:958:7
#<!-- -->37 0x00000000045216cb clang::Parser::ParseInnerNamespace(llvm::SmallVector&lt;clang::Parser::InnerNamespaceInfo, 4u&gt; const&amp;, unsigned int, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::BalancedDelimiterTracker&amp;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:273:5
#<!-- -->38 0x00000000045210a8 Exit /__w/clangd/clangd/llvm-project/clang/include/clang/Parse/Parser.h:1196:11
#<!-- -->39 0x00000000045210a8 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::SourceLocation) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:252:18
#<!-- -->40 0x00000000045023ee clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&amp;, clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::SourceLocation*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:0
#<!-- -->41 0x00000000044e003a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&amp;, clang::ParsedAttributes&amp;, clang::ParsingDeclSpec*) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:0:3
#<!-- -->42 0x00000000044deaf9 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&lt;clang::DeclGroupRef&gt;&amp;, clang::Sema::ModuleImportState&amp;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:763:12
#<!-- -->43 0x00000000044de2df clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr&lt;clang::DeclGroupRef&gt;&amp;, clang::Sema::ModuleImportState&amp;) /__w/clangd/clangd/llvm-project/clang/lib/Parse/Parser.cpp:608:26
#<!-- -->44 0x00000000044da548 clang::ParseAST(clang::Sema&amp;, bool, bool) /__w/clangd/clangd/llvm-project/clang/lib/Parse/ParseAST.cpp:170:25
#<!-- -->45 0x000000000411b83b clang::FrontendAction::Execute() /__w/clangd/clangd/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1082:10
#<!-- -->46 0x00000000015f9ac5 getPtr /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:282:12
#<!-- -->47 0x00000000015f9ac5 operator bool /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:242:16
#<!-- -->48 0x00000000015f9ac5 clang::clangd::(anonymous namespace)::semaCodeComplete(std::unique_ptr&lt;clang::CodeCompleteConsumer, std::default_delete&lt;clang::CodeCompleteConsumer&gt;&gt;, clang::CodeCompleteOptions const&amp;, clang::clangd::(anonymous namespace)::SemaCompleteInput const&amp;, clang::clangd::IncludeStructure*) /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1427:19
#<!-- -->49 0x00000000015fc734 ~unique_ptr /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unique_ptr.h:262:6
#<!-- -->50 0x00000000015fc734 run /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:1694:5
#<!-- -->51 0x00000000015fc734 clang::clangd::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::PreambleData const*, clang::clangd::ParseInputs const&amp;, clang::clangd::CodeCompleteOptions, clang::clangd::SpeculativeFuzzyFind*) /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.cpp:2245:32
#<!-- -->52 0x00000000015eb5dd ~_Function_base /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:275:11
#<!-- -->53 0x00000000015eb5dd ~CodeCompleteOptions /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/CodeComplete.h:42:8
#<!-- -->54 0x00000000015eb5dd operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:456:33
#<!-- -->55 0x00000000015eb5dd void llvm::detail::UniqueFunctionBase&lt;void, llvm::Expected&lt;clang::clangd::InputsAndPreamble&gt;&gt;::CallImpl&lt;clang::clangd::ClangdServer::codeComplete(llvm::StringRef, clang::clangd::Position, clang::clangd::CodeCompleteOptions const&amp;, llvm::unique_function&lt;void (llvm::Expected&lt;clang::clangd::CodeCompleteResult&gt;)&gt;)::$_0&gt;(void*, llvm::Expected&lt;clang::clangd::InputsAndPreamble&gt;&amp;) /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:220:12
#<!-- -->56 0x00000000017998fb ~Expected /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/Error.h:563:10
#<!-- -->57 0x00000000017998fb operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/TUScheduler.cpp:1807:5
#<!-- -->58 0x00000000017998fb void llvm::detail::UniqueFunctionBase&lt;void&gt;::CallImpl&lt;clang::clangd::TUScheduler::runWithPreamble(llvm::StringRef, llvm::StringRef, clang::clangd::TUScheduler::PreambleConsistency, llvm::unique_function&lt;void (llvm::Expected&lt;clang::clangd::InputsAndPreamble&gt;)&gt;)::$_3&gt;(void*) /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:220:12
#<!-- -->59 0x000000000190f7c1 operator= /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:48:5
#<!-- -->60 0x000000000190f7c1 PunnedPointer /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:37:60
#<!-- -->61 0x000000000190f7c1 PointerIntPair /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:86:13
#<!-- -->62 0x000000000190f7c1 UniqueFunctionBase /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:340:3
#<!-- -->63 0x000000000190f7c1 unique_function /__w/clangd/clangd/llvm-project/llvm/include/llvm/ADT/FunctionExtras.h:369:3
#<!-- -->64 0x000000000190f7c1 operator() /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:103:14
#<!-- -->65 0x000000000190f7c1 operator()&lt;(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &amp;&gt; /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:43:11
#<!-- -->66 0x000000000190f7c1 __invoke_impl&lt;void, (lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), (lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &amp;&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/invoke.h:60:14
#<!-- -->67 0x000000000190f7c1 __invoke&lt;(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), (lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15) &amp;&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/invoke.h:95:14
#<!-- -->68 0x000000000190f7c1 __apply_impl&lt;(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), std::tuple&lt;(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)&gt; &amp;, 0&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/tuple:1662:14
#<!-- -->69 0x000000000190f7c1 apply&lt;(lambda at /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:42:9), std::tuple&lt;(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)&gt; &amp;&gt; /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/tuple:1671:14
#<!-- -->70 0x000000000190f7c1 GenericThreadProxy&lt;std::tuple&lt;(lambda at /__w/clangd/clangd/llvm-project/clang-tools-extra/clangd/support/Threading.cpp:98:15)&gt; &gt; /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:41:5
#<!-- -->71 0x000000000190f7c1 void* llvm::thread::ThreadProxy&lt;std::tuple&lt;clang::clangd::AsyncTaskRunner::runAsync(llvm::Twine const&amp;, llvm::unique_function&lt;void ()&gt;)::$_1&gt;&gt;(void*) /__w/clangd/clangd/llvm-project/llvm/include/llvm/Support/thread.h:55:5
#<!-- -->72 0x00007f1570827a94 start_thread ./nptl/pthread_create.c:447:8
#<!-- -->73 0x00007f15708b4c3c clone3 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80:0
Signalled during preamble action: CodeComplete
  Filename: /home/awe/devel/asbind20/test/test_bind/ref_class.cpp
  Directory: /home/awe/devel/asbind20/build
  Command Line: /usr/lib/llvm-18/bin/clang++-18 --driver-mode=g++ -I/home/awe/devel/asbind20/test/. -I/home/awe/devel/asbind20/include -I/home/awe/devel/asbind20/ext/utility/include -I/home/awe/devel/asbind20/ext/container/include -isystem /home/awe/devel/asbind20/build/vcpkg_installed/x64-linux/include -isystem /home/awe/devel/asbind20/build/_deps/googletest-src/googletest/include -isystem /home/awe/devel/asbind20/build/_deps/googletest-src/googletest -g -std=gnu++20 -Wall -Wextra -Wpedantic -Werror -o test/test_bind/CMakeFiles/test_bind.dir/ref_class.cpp.o -c -resource-dir=/home/awe/.vscode-server/data/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/19.1.2/clangd_19.1.2/lib/clang/19 -- /home/awe/devel/asbind20/test/test_bind/ref_class.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clangd crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

3 participants