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

clang crashes on valid C++11 code: Assertion `!LHS.get()->getType()->isPlaceholderType() && !RHS.get()->getType()->isPlaceholderType() && "placeholders should have been weeded out by now"' failed #28404

Closed
zhendongsu opened this issue Jun 7, 2016 · 4 comments
Labels
bugzilla Issues migrated from bugzilla c++11 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@zhendongsu
Copy link

Bugzilla Link 28030
Version trunk
OS All
CC @majnemer,@DougGregor,@hfinkel

Extended Description

The current clang trunk crashes when compiling the following valid C++11 test case on x86_64-linux-gnu in both 32-bit and 64-bit modes.

This is a regression from 3.8.x.

$ clang++ -v
clang version 3.9.0 (trunk 271877)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@MX32
Selected multilib: .;@m64
$
$ clang++-3.8 -c -std=c++11 small.cpp
$ g++-6.1 -c -Wall -Wextra -pedantic -std=c++11 small.cpp
$
$ clang++ -c -std=c++11 small.cpp
clang-3.9: /tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/Sema/SemaExprCXX.cpp:4670: clang::QualType clang::Sema::CheckPointerToMemberOperands(clang::ExprResult&, clang::ExprResult&, clang::ExprValueKind&, clang::SourceLocation, bool): Assertion `!LHS.get()->getType()->isPlaceholderType() && !RHS.get()->getType()->isPlaceholderType() && "placeholders should have been weeded out by now"' failed.
#​0 0x0000000001e1a4f5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/clang-trunk/bin/clang-3.9+0x1e1a4f5)
#​1 0x0000000001e18486 llvm::sys::RunSignalHandlers() (/usr/local/clang-trunk/bin/clang-3.9+0x1e18486)
#​2 0x0000000001e186a4 SignalHandler(int) (/usr/local/clang-trunk/bin/clang-3.9+0x1e186a4)
#​3 0x00007f5428fe6340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#​4 0x00007f5428204cc9 gsignal /build/eglibc-3GlaMS/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#​5 0x00007f54282080d8 abort /build/eglibc-3GlaMS/eglibc-2.19/stdlib/abort.c:91:0
#​6 0x00007f54281fdb86 __assert_fail_base /build/eglibc-3GlaMS/eglibc-2.19/assert/assert.c:92:0
#​7 0x00007f54281fdc32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#​8 0x0000000002d35275 clang::Sema::CheckPointerToMemberOperands(clang::ActionResult<clang::Expr*, true>&, clang::ActionResult<clang::Expr*, true>&, clang::ExprValueKind&, clang::SourceLocation, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2d35275)
#​9 0x0000000002ce7815 clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/usr/local/clang-trunk/bin/clang-3.9+0x2ce7815)
#​10 0x0000000002e6745f clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) (/usr/local/clang-trunk/bin/clang-3.9+0x2e6745f)
#​11 0x0000000002cafa24 BuildOverloadedBinOp(clang::Sema&, clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/usr/local/clang-trunk/bin/clang-3.9+0x2cafa24)
#​12 0x0000000002ce8112 clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/usr/local/clang-trunk/bin/clang-3.9+0x2ce8112)
#​13 0x0000000002f3e29f clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*) (/usr/local/clang-trunk/bin/clang-3.9+0x2f3e29f)
#​14 0x0000000002f3b7f7 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) (/usr/local/clang-trunk/bin/clang-3.9+0x2f3b7f7)
#​15 0x0000000002f44c1a clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) (/usr/local/clang-trunk/bin/clang-3.9+0x2f44c1a)
#​16 0x0000000002f458fa clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) (/usr/local/clang-trunk/bin/clang-3.9+0x2f458fa)
#​17 0x0000000002f45a62 clang::Sema::SubstType(clang::TypeSourceInfo*, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName) (/usr/local/clang-trunk/bin/clang-3.9+0x2f45a62)
#​18 0x0000000002ea7d26 SubstDefaultTemplateArgument(clang::Sema&, clang::TemplateDecl*, clang::SourceLocation, clang::SourceLocation, clang::TemplateTypeParmDecl*, llvm::SmallVectorImplclang::TemplateArgument&) (/usr/local/clang-trunk/bin/clang-3.9+0x2ea7d26)
#​19 0x0000000002eab5d4 clang::Sema::SubstDefaultTemplateArgumentIfAvailable(clang::TemplateDecl*, clang::SourceLocation, clang::SourceLocation, clang::Decl*, llvm::SmallVectorImplclang::TemplateArgument&, bool&) (/usr/local/clang-trunk/bin/clang-3.9+0x2eab5d4)
#​20 0x0000000002f0cabe clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*, llvm::SmallVectorImplclang::DeducedTemplateArgument&, unsigned int, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, llvm::SmallVectorImplclang::Sema::OriginalCallArg const*, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2f0cabe)
#​21 0x0000000002f17c1a clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRefclang::Expr*, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2f17c1a)
#​22 0x0000000002e52c46 clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRefclang::Expr*, clang::OverloadCandidateSet&, bool, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2e52c46)
#​23 0x0000000002e54d3a clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*, llvm::ArrayRefclang::Expr*, clang::OverloadCandidateSet&, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2e54d3a)
#​24 0x0000000002e550dd clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, llvm::MutableArrayRefclang::Expr*, clang::SourceLocation, clang::OverloadCandidateSet*, clang::ActionResult<clang::Expr*, true>) (/usr/local/clang-trunk/bin/clang-3.9+0x2e550dd)
#​25 0x0000000002e622d8 clang::Sema::BuildOverloadedCallExpr(clang::Scope
, clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation, llvm::MutableArrayRefclang::Expr*, clang::SourceLocation, clang::Expr*, bool, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2e622d8)
#​26 0x0000000002cfd095 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRefclang::Expr*, clang::SourceLocation, clang::Expr*, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x2cfd095)
#​27 0x000000000296914a clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/usr/local/clang-trunk/bin/clang-3.9+0x296914a)
#​28 0x0000000002963ad8 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x2963ad8)
#​29 0x000000000296663d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x296663d)
#​30 0x000000000296400b clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x296400b)
#​31 0x000000000296663d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x296663d)
#​32 0x0000000002964af5 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x2964af5)
#​33 0x000000000296663d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x296663d)
#​34 0x000000000296abce clang::Parser::ParseConstantExpression(clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x296abce)
#​35 0x0000000002953caf clang::Parser::ParseStaticAssertDeclaration(clang::SourceLocation&) (/usr/local/clang-trunk/bin/clang-3.9+0x2953caf)
#​36 0x000000000294cede clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/usr/local/clang-trunk/bin/clang-3.9+0x294cede)
#​37 0x000000000292b8d2 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/usr/local/clang-trunk/bin/clang-3.9+0x292b8d2)
#​38 0x000000000292c080 clang::Parser::ParseTopLevelDecl(clang::OpaquePtrclang::DeclGroupRef&) (/usr/local/clang-trunk/bin/clang-3.9+0x292c080)
#​39 0x000000000292365b clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x292365b)
#​40 0x00000000025c23fe clang::CodeGenAction::ExecuteAction() (/usr/local/clang-trunk/bin/clang-3.9+0x25c23fe)
#​41 0x000000000228f1fe clang::FrontendAction::Execute() (/usr/local/clang-trunk/bin/clang-3.9+0x228f1fe)
#​42 0x0000000002264c66 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/clang-trunk/bin/clang-3.9+0x2264c66)
#​43 0x000000000231c362 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/clang-trunk/bin/clang-3.9+0x231c362)
#​44 0x0000000000aecce8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/clang-trunk/bin/clang-3.9+0xaecce8)
#​45 0x0000000000aa14de main (/usr/local/clang-trunk/bin/clang-3.9+0xaa14de)
#​46 0x00007f54281efec5 __libc_start_main /build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:321:0
#​47 0x0000000000ae8d54 _start (/usr/local/clang-trunk/bin/clang-3.9+0xae8d54)
Stack dump:
0. Program arguments: /usr/local/clang-trunk/bin/clang-3.9 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name small.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-file /data2/small.cpp -resource-dir /usr/local/clang-trunk/bin/../lib/clang/3.9.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward -internal-isystem /usr/local/include -internal-isystem /usr/local/clang-trunk/bin/../lib/clang/3.9.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /data2 -ferror-limit 19 -fmessage-length 205 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c++ small.cpp

  1. small.cpp:14:29: current parser token ')'
    clang-3.9: error: unable to execute command: Aborted (core dumped)
    clang-3.9: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.9.0 (trunk 271877)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /usr/local/clang-trunk/bin
    clang-3.9: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
    clang-3.9: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /tmp/small-c3f354.cpp
clang-3.9: note: diagnostic msg: /tmp/small-c3f354.sh
clang-3.9: note: diagnostic msg:


$


struct S;

template < typename T > T foo ();

template < typename T, typename = decltype (foo < T > ().*foo) >
void bar (int);

template < typename >
constexpr bool bar (bool)
{
return false;
}

static_assert (!bar < S > (0), "");

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@fhahn
Copy link
Contributor

fhahn commented Mar 24, 2022

Still crashes: https://clang.godbolt.org/z/3Wx7xP4qa

@fhahn fhahn added clang:frontend Language frontend issues, e.g. anything involving "Sema" crash Prefer [crash-on-valid] or [crash-on-invalid] labels Mar 24, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 24, 2022

@llvm/issue-subscribers-clang-frontend

@Endilll
Copy link
Contributor

Endilll commented Jul 15, 2023

Backtrace from post-16 trunk:

clang++: /root/llvm-project/clang/lib/Sema/SemaExprCXX.cpp:5973:
clang::QualType clang::Sema::CheckPointerToMemberOperands(clang::ExprResult&, clang::ExprResult&, clang::ExprValueKind&, clang::SourceLocation, bool):
Assertion `!LHS.get()->hasPlaceholderType() && !RHS.get()->hasPlaceholderType() && "placeholders should have been weeded out by now"' failed.

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1.	<source>:14:29: current parser token ')'
 #0 0x000055a6f9a9ac1a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a9ac1a)
 #1 0x000055a6f9a9884c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a9884c)
 #2 0x000055a6f99e7020 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f9ccd886420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f9ccd35300b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f9ccd332859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007f9ccd332729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007f9ccd343fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x000055a6fc3b44e6 clang::Sema::CheckPointerToMemberOperands(clang::ActionResult<clang::Expr*, true>&, clang::ActionResult<clang::Expr*, true>&, clang::ExprValueKind&, clang::SourceLocation, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63b44e6)
 #9 0x000055a6fc2e03ad clang::Sema::CreateBuiltinBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e03ad)
#10 0x000055a6fc5ecd4a clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, clang::BinaryOperatorKind, clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*, bool, bool, clang::FunctionDecl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65ecd4a)
#11 0x000055a6fc27e2fc BuildOverloadedBinOp(clang::Sema&, clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) SemaExpr.cpp:0:0
#12 0x000055a6fc2e1620 clang::Sema::BuildBinOp(clang::Scope*, clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e1620)
#13 0x000055a6fc7ae423 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*) SemaTemplateInstantiate.cpp:0:0
#14 0x000055a6fc7ab3c4 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) SemaTemplateInstantiate.cpp:0:0
#15 0x000055a6fc7b7038 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformDecltypeType(clang::TypeLocBuilder&, clang::DecltypeTypeLoc) SemaTemplateInstantiate.cpp:0:0
#16 0x000055a6fc7b835b clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) SemaTemplateInstantiate.cpp:0:0
#17 0x000055a6fc7bd526 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) SemaTemplateInstantiate.cpp:0:0
#18 0x000055a6fc7c546e clang::Sema::SubstType(clang::TypeSourceInfo*, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67c546e)
#19 0x000055a6fc6654bb SubstDefaultTemplateArgument(clang::Sema&, clang::TemplateDecl*, clang::SourceLocation, clang::SourceLocation, clang::TemplateTypeParmDecl*, llvm::ArrayRef<clang::TemplateArgument>, llvm::ArrayRef<clang::TemplateArgument>) (.isra.9627) SemaTemplate.cpp:0:0
#20 0x000055a6fc667dae clang::Sema::SubstDefaultTemplateArgumentIfAvailable(clang::TemplateDecl*, clang::SourceLocation, clang::SourceLocation, clang::Decl*, llvm::ArrayRef<clang::TemplateArgument>, llvm::ArrayRef<clang::TemplateArgument>, bool&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6667dae)
#21 0x000055a6fc777cb1 clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*, llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool, llvm::function_ref<bool ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6777cb1)
#22 0x000055a6fc77938e void llvm::function_ref<void ()>::callback_fn<clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool, bool, llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>)::'lambda1'()>(long) SemaTemplateDeduction.cpp:0:0
#23 0x000055a6fbf616ff clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5f616ff)
#24 0x000055a6fc789263 clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool, bool, llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6789263)
#25 0x000055a6fc5d9779 clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, bool, clang::CallExpr::ADLCallKind, clang::OverloadCandidateParamOrder, bool) (.constprop.1946) SemaOverload.cpp:0:0
#26 0x000055a6fc5da5d3 AddOverloadedCallCandidate(clang::Sema&, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool) SemaOverload.cpp:0:0
#27 0x000055a6fc5da8e0 clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*, llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65da8e0)
#28 0x000055a6fc5dac24 clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::OverloadCandidateSet*, clang::ActionResult<clang::Expr*, true>*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65dac24)
#29 0x000055a6fc5e7c54 clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65e7c54)
#30 0x000055a6fc2e4120 clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e4120)
#31 0x000055a6fc2e94f2 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x62e94f2)
#32 0x000055a6fbe95005 clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e95005)
#33 0x000055a6fbe8ecb7 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e8ecb7)
#34 0x000055a6fbe90002 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e90002)
#35 0x000055a6fbe91ca6 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e91ca6)
#36 0x000055a6fbe8f367 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e8f367)
#37 0x000055a6fbe91ca6 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e91ca6)
#38 0x000055a6fbe99c7f clang::Parser::ParseConstantExpressionInExprEvalContext(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e99c7f)
#39 0x000055a6fbe7a34b clang::Parser::ParseStaticAssertDeclaration(clang::SourceLocation&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e7a34b)
#40 0x000055a6fbe738f5 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e738f5)
#41 0x000055a6fbe439c0 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e439c0)
#42 0x000055a6fbe45176 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e45176)
#43 0x000055a6fbe3a22b clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5e3a22b)
#44 0x000055a6fab67560 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4b67560)
#45 0x000055a6fa4892e9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44892e9)
#46 0x000055a6fa41dc42 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x441dc42)
#47 0x000055a6fa560c9f clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4560c9f)
#48 0x000055a6f7222cc3 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x1222cc3)
#49 0x000055a6f721ade8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#50 0x000055a6fa2912f9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#51 0x000055a6f99e74a5 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x39e74a5)
#52 0x000055a6fa293eee clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4293eee)
#53 0x000055a6fa26060b clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x426060b)
#54 0x000055a6fa2611e3 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x42611e3)
#55 0x000055a6fa269fd6 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4269fd6)
#56 0x000055a6f7220a8e clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x1220a8e)
#57 0x000055a6f7151cb1 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x1151cb1)
#58 0x00007f9ccd334083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#59 0x000055a6f721a4da _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x121a4da)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134

@Endilll Endilll added the confirmed Verified by a second party label Aug 7, 2023
@zwuis
Copy link
Contributor

zwuis commented Jul 17, 2024

Doesn't crash since #83103 (found by using git bisect).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++11 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

6 participants