[llvm-bugs] [Bug 28555] New: Clang core dumps on recursive template instantiation of tuples

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 14 13:06:26 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28555

            Bug ID: 28555
           Summary: Clang core dumps on recursive template instantiation
                    of tuples
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: moconnor at directstream.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The stack trace:

unknown ArgumentKind
UNREACHABLE executed at
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:1169!

#0 0x0000000001024235 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/moconnor/Source/llvm/lib/Support/Unix/Signals.inc:323:0
#1 0x0000000001022126 llvm::sys::RunSignalHandlers()
/home/moconnor/Source/llvm/lib/Support/Signals.cpp:45:0
#2 0x000000000102229d SignalHandler(int)
/home/moconnor/Source/llvm/lib/Support/Unix/Signals.inc:200:0
#3 0x000000349440f7e0 __restore_rt (/lib64/libpthread.so.0+0x349440f7e0)
#4 0x0000003494032625 __GI_raise (/lib64/libc.so.6+0x3494032625)
#5 0x0000003494033e05 __GI_abort (/lib64/libc.so.6+0x3494033e05)
#6 0x0000000000fe74dc
(/home/moconnor/Applications/gcc-4.8.2/bin/clang-3.8+0xfe74dc)
#7 0x0000000002387028 (anonymous
namespace)::TemplateDiff::InitializeNonTypeDiffVariables(clang::ASTContext&,
(anonymous namespace)::TemplateDiff::TSTiterator const&,
clang::NonTypeTemplateParmDecl*, llvm::APSInt&, bool&, clang::QualType&, bool&,
clang::Expr*&, clang::ValueDecl*&, bool&) [clone .isra.487]
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:1169:0
#8 0x0000000002387edf DiffNonTypes
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:1213:0
#9 0x0000000002387edf (anonymous
namespace)::TemplateDiff::DiffTemplate(clang::TemplateSpecializationType
const*, clang::TemplateSpecializationType const*)
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:1303:0
#10 0x000000000238a8b3 DiffTemplate
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:2003:0
#11 0x000000000238a8b3 FormatTemplateTypeDiff(clang::ASTContext&,
clang::QualType, clang::QualType, bool, bool, bool, bool, llvm::raw_ostream&)
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:2032:0
#12 0x000000000238c5d1
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, llvm::StringRef, llvm::StringRef,
llvm::ArrayRef<std::pair<clang::DiagnosticsEngine::ArgumentKind, long> >,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>)
/home/moconnor/Source/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp:344:0
#13 0x000000000111492c clang::Diagnostic::FormatDiagnostic(char const*, char
const*, llvm::SmallVectorImpl<char>&) const
/home/moconnor/Source/llvm/tools/clang/lib/Basic/Diagnostic.cpp:908:0
#14 0x0000000001465a67 raw_svector_ostream
/home/moconnor/Source/llvm/include/llvm/Support/raw_ostream.h:493:0
#15 0x0000000001465a67
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&)
/home/moconnor/Source/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp:122:0
#16 0x0000000001118934
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const
/home/moconnor/Source/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp:680:0
#17 0x000000000111996e
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const
/home/moconnor/Source/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp:672:0
#18 0x000000000111284c clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool)
/home/moconnor/Source/llvm/tools/clang/lib/Basic/Diagnostic.cpp:389:0
#19 0x0000000001c42bc0 clang::Sema::EmitCurrentDiagnostic(unsigned int)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/Sema.cpp:1052:0
#20 0x0000000001c14ae7 clang::DiagnosticBuilder::Emit()
/home/moconnor/Source/llvm/tools/clang/include/clang/Basic/Diagnostic.h:920:0
#21 0x0000000001c14ae7 ~DiagnosticBuilder
/home/moconnor/Source/llvm/tools/clang/include/clang/Basic/Diagnostic.h:953:0
#22 0x0000000001c14ae7
clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder()
/home/moconnor/Source/llvm/tools/clang/include/clang/Sema/Sema.h:1087:0
#23 0x0000000001cd2bce clang::Sema::MergeVarDeclTypes(clang::VarDecl*,
clang::VarDecl*, bool)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:3331:0
#24 0x0000000001ce08a2 clang::Sema::MergeVarDecl(clang::VarDecl*,
clang::LookupResult&)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:3467:0
#25 0x0000000001ce11f2 clang::Sema::CheckVariableDeclaration(clang::VarDecl*,
clang::LookupResult&)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:6712:0
#26 0x0000000001cf3e4d clang::Declarator::setRedeclaration(bool)
/home/moconnor/Source/llvm/tools/clang/include/clang/Sema/DeclSpec.h:2240:0
#27 0x0000000001cf3e4d clang::Sema::ActOnVariableDeclarator(clang::Scope*,
clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*,
clang::LookupResult&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
bool&) /home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:6210:0
#28 0x0000000001cfd506 clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:4992:0
#29 0x0000000001cfdb85 clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&)
/home/moconnor/Source/llvm/tools/clang/lib/Sema/SemaDecl.cpp:4658:0
#30 0x0000000001a88361
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1965:0
#31 0x0000000001a9aa86
llvm::SmallVectorTemplateCommon<clang::Parser::LateParsedAttribute*,
void>::size() const
/home/moconnor/Source/llvm/include/llvm/ADT/SmallVector.h:132:0
#32 0x0000000001a9aa86 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1810:0
#33 0x0000000001a9b8b9 clang::Parser::ParseSimpleDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1540:0
#34 0x0000000001a9bb4d clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1471:0
#35 0x0000000001ae1f17
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:215:0
#36 0x0000000001ae2383
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:114:0
#37 0x0000000001ae54a9 clang::Parser::ParseCompoundStatementBody(bool)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:1026:0
#38 0x0000000001ae7bd8 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:1935:0
#39 0x0000000001a79919
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/Parser.cpp:1150:0
#40 0x0000000001a9b128 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1756:0
#41 0x0000000001a76dbf
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/Parser.cpp:931:0
#42 0x0000000001a773fe
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/Parser.cpp:946:0
#43 0x0000000001a7abef
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/Parser.cpp:804:0
#44 0x0000000001a7b3c0 ~AttributePool
/home/moconnor/Source/llvm/tools/clang/include/clang/Sema/AttributeList.h:585:0
#45 0x0000000001a7b3c0 ~ParsedAttributes
/home/moconnor/Source/llvm/tools/clang/include/clang/Sema/AttributeList.h:675:0
#46 0x0000000001a7b3c0 ~ParsedAttributesWithRange
/home/moconnor/Source/llvm/tools/clang/include/clang/Parse/Parser.h:1225:0
#47 0x0000000001a7b3c0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/Parser.cpp:594:0
#48 0x0000000001a747c3 clang::ParseAST(clang::Sema&, bool, bool)
/home/moconnor/Source/llvm/tools/clang/lib/Parse/ParseAST.cpp:155:0
#49 0x00000000016df86b clang::CodeGenAction::ExecuteAction()
/home/moconnor/Source/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:792:0
#50 0x00000000014300f6 clang::FrontendAction::Execute()
/home/moconnor/Source/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:439:0
#51 0x000000000140c72e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/moconnor/Source/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:841:0
#52 0x00000000014be472
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/moconnor/Source/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:0
#53 0x00000000006b0540 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/moconnor/Source/llvm/tools/clang/tools/driver/cc1_main.cpp:116:0
#54 0x00000000006ae5db ExecuteCC1Tool
/home/moconnor/Source/llvm/tools/clang/tools/driver/driver.cpp:301:0
#55 0x00000000006ae5db main
/home/moconnor/Source/llvm/tools/clang/tools/driver/driver.cpp:366:0
#56 0x000000349401ed5d __libc_start_main (/lib64/libc.so.6+0x349401ed5d)
#57 0x00000000006aabd9 _start
(/home/moconnor/Applications/gcc-4.8.2/bin/clang-3.8+0x6aabd9)
Stack dump:
0.    Program arguments: /home/moconnor/Applications/gcc-4.8.2/bin/clang-3.8
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name arb-len-tup.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 -resource-dir
/home/moconnor/Applications/gcc-4.8.2/bin/../lib/clang/3.8.0 -internal-isystem
/home/moconnor/Applications/gcc-4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2
-internal-isystem
/home/moconnor/Applications/gcc-4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2/x86_64-unknown-linux-gnu
-internal-isystem
/home/moconnor/Applications/gcc-4.8.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2/backward
-internal-isystem /usr/local/include -internal-isystem
/home/moconnor/Applications/gcc-4.8.2/bin/../lib/clang/3.8.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/home/moconnor/Source/tests/investigate/tuple -ferror-limit 19 -fmessage-length
237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/arb-len-tup-02d251.o -x c++ arb-len-tup.cpp 
1.    arb-len-tup.cpp:38:17: current parser token '='
2.    arb-len-tup.cpp:35:33: parsing function body 'main'
3.    arb-len-tup.cpp:35:33: in compound statement ('{}')
clang-3.8: error: unable to execute command: Aborted
clang-3.8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0 (https://github.com/llvm-mirror/clang.git
47ba141ac03f73cbf4b5f9953954044b127070d9)
(https://github.com/llvm-mirror/llvm.git
ad5750369cc5b19f36c149f7b13151c99c7be47a)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/moconnor/Applications/gcc-4.8.2/bin
clang-3.8: 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.8: 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.8: note: diagnostic msg: /tmp/arb-len-tup-aa3e16.cpp
clang-3.8: note: diagnostic msg: /tmp/arb-len-tup-aa3e16.sh
clang-3.8: note: diagnostic msg: 

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160714/ac5fb38f/attachment-0001.html>


More information about the llvm-bugs mailing list