Issue 52783
Summary Frontend crash @clang::InitializationSequence::Perform
Labels new issue
Assignees
Reporter glandium
    This is a reduced testcase I obtained with creduce/cvise with a too lax interestingness test (that only checked for segfaults) while trying to reduce #52782.
```
template <class> class Matrix4x4Typed;
Matrix4x4Typed() Matrix4x4Typed matrix
```
Command line:
```
clang -cc1 -emit-obj -std=gnu++17 -x c++ testcase.cpp
```
Output:
```
testcase.cpp:2:1: error: deduction guide declaration without trailing return type
Matrix4x4Typed() Matrix4x4Typed matrix
^
testcase.cpp:2:17: error: expected ';' after top level declarator
Matrix4x4Typed() Matrix4x4Typed matrix
                ^
                ;
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /tmp/llvm/obj/bin/clang -cc1 -emit-obj -std=gnu++17 -x c++ testcase.cpp
1.	<eof> parser at end of file
 #0 0x00007f65ba071243 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /tmp/llvm/llvm/lib/Support/Unix/Signals.inc:565:13
 #1 0x00007f65ba06f5f0 llvm::sys::RunSignalHandlers() /tmp/llvm/llvm/lib/Support/Signals.cpp:97:18
 #2 0x00007f65ba0716df SignalHandler(int) /tmp/llvm/llvm/lib/Support/Unix/Signals.inc:407:1
 #3 0x00007f65c235b140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x00007f65c056ab59 clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>, clang::QualType*) /tmp/llvm/clang/lib/Sema/SemaInit.cpp:8061:23
 #5 0x00007f65c02fb873 clang::Sema::ActOnUninitializedDecl(clang::Decl*) /tmp/llvm/clang/lib/Sema/SemaDecl.cpp:12982:31
 #6 0x00007f65bfafeb6c clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) /tmp/llvm/clang/lib/Parse/ParseDecl.cpp:0:13
 #7 0x00007f65bfafd297 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) /tmp/llvm/clang/lib/Parse/ParseDecl.cpp:2115:21
 #8 0x00007f65bfb99dcd clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /tmp/llvm/clang/lib/Parse/Parser.cpp:0:10
 #9 0x00007f65bfb997ac clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /tmp/llvm/clang/lib/Parse/Parser.cpp:1154:12
#10 0x00007f65bfb98c98 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /tmp/llvm/clang/lib/Parse/Parser.cpp:0:12
#11 0x00007f65bfb97310 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) /tmp/llvm/clang/lib/Parse/Parser.cpp:720:10
#12 0x00007f65bfae863d clang::ParseAST(clang::Sema&, bool, bool) /tmp/llvm/clang/lib/Parse/ParseAST.cpp:157:5
#13 0x00007f65c12e58d8 clang::FrontendAction::Execute() /tmp/llvm/clang/lib/Frontend/FrontendAction.cpp:971:10
#14 0x00007f65c1270116 llvm::Error::getPtr() const /tmp/llvm/llvm/include/llvm/Support/Error.h:276:12
#15 0x00007f65c1270116 llvm::Error::operator bool() /tmp/llvm/llvm/include/llvm/Support/Error.h:236:16
#16 0x00007f65c1270116 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /tmp/llvm/clang/lib/Frontend/CompilerInstance.cpp:1030:23
#17 0x00007f65c1354661 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /tmp/llvm/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:261:25
#18 0x00000000004142e5 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /tmp/llvm/clang/tools/driver/cc1_main.cpp:246:15
#19 0x0000000000412305 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /tmp/llvm/clang/tools/driver/driver.cpp:317:12
#20 0x000000000041217f main /tmp/llvm/clang/tools/driver/driver.cpp:388:12
#21 0x00007f65b9086d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#22 0x000000000040f485 _start (/tmp/llvm/obj/bin/clang+0x40f485)
Segmentation fault
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to