[LLVMbugs] [Bug 20707] New: Unreachable executed at DecodeOperatorCall: Invalid operator call kind

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 19 19:55:12 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20707

            Bug ID: 20707
           Summary: Unreachable executed at DecodeOperatorCall: Invalid
                    operator call kind
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: reuben.morais at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12922
  --> http://llvm.org/bugs/attachment.cgi?id=12922&action=edit
Minimal testcase

See testcase, reduced from jsmath.cpp from Firefox's source code.

$ clang -std=c++11 -c testcase_min2.cpp
Invalid operator call kind
UNREACHABLE executed at
/Users/Reuben/Development/llvm/tools/clang/lib/AST/StmtProfile.cpp:721!
0  clang                    0x0000000109234cce
llvm::sys::PrintStackTrace(__sFILE*) + 46
1  clang                    0x0000000109234fdb
PrintStackTraceSignalHandler(void*) + 27
2  clang                    0x000000010923536c SignalHandler(int) + 412
3  libsystem_platform.dylib 0x000000010ecaf5aa _sigtramp + 26
4  libsystem_platform.dylib 0x00007fff63626a88 _sigtramp + 1419212024
5  clang                    0x000000010923500b raise + 27
6  clang                    0x00000001092350c2 abort + 18
7  clang                    0x0000000109201416
llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 198
8  clang                    0x00000001071ed2fd
DecodeOperatorCall(clang::CXXOperatorCallExpr const*,
clang::UnaryOperatorKind&, clang::BinaryOperatorKind&) + 93
9  clang                    0x00000001071e8efd (anonymous
namespace)::StmtProfiler::VisitCXXOperatorCallExpr(clang::CXXOperatorCallExpr
const*) + 77
10 clang                    0x00000001071e67e5
clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::StmtProfiler, void>::Visit(clang::Stmt const*) + 2485
11 clang                    0x00000001071eb4db (anonymous
namespace)::StmtProfiler::VisitStmt(clang::Stmt const*) + 139
12 clang                    0x00000001071ece2d (anonymous
namespace)::StmtProfiler::VisitExpr(clang::Expr const*) + 29
13 clang                    0x00000001071e9cff (anonymous
namespace)::StmtProfiler::VisitMemberExpr(clang::MemberExpr const*) + 47
14 clang                    0x00000001071e6acd
clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::StmtProfiler, void>::Visit(clang::Stmt const*) + 3229
15 clang                    0x00000001071eb4db (anonymous
namespace)::StmtProfiler::VisitStmt(clang::Stmt const*) + 139
16 clang                    0x00000001071ece2d (anonymous
namespace)::StmtProfiler::VisitExpr(clang::Expr const*) + 29
17 clang                    0x00000001071e8e3d (anonymous
namespace)::StmtProfiler::VisitCallExpr(clang::CallExpr const*) + 29
18 clang                    0x00000001071e679d
clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::StmtProfiler, void>::Visit(clang::Stmt const*) + 2413
19 clang                    0x00000001071e5dea
clang::Stmt::Profile(llvm::FoldingSetNodeID&, clang::ASTContext const&, bool)
const + 90
20 clang                    0x0000000107206505
clang::DependentDecltypeType::Profile(llvm::FoldingSetNodeID&,
clang::ASTContext const&, clang::Expr*) + 53
21 clang                    0x0000000106e873fb
clang::ASTContext::getDecltypeType(clang::Expr*, clang::QualType) const + 91
22 clang                    0x000000010616177f
clang::Sema::BuildDecltypeType(clang::Expr*, clang::SourceLocation) + 159
23 clang                    0x000000010616ea4e ConvertDeclSpecToType((anonymous
namespace)::TypeProcessingState&) + 6894
24 clang                    0x0000000106157c78
GetDeclSpecTypeForDeclarator((anonymous namespace)::TypeProcessingState&,
clang::TypeSourceInfo*&) + 200
25 clang                    0x0000000106157a77
clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) + 103
26 clang                    0x000000010615f25e
clang::Sema::ActOnTypeName(clang::Scope*, clang::Declarator&) + 142
27 clang                    0x00000001059bfeca
clang::Parser::ParseTypeName(clang::SourceRange*,
clang::Declarator::TheContext, clang::AccessSpecifier, clang::Decl**,
clang::ParsedAttributes*) + 538
28 clang                    0x0000000105a4dece
clang::Parser::ParseTemplateArgument() + 158
29 clang                    0x0000000105a4d179
clang::Parser::ParseTemplateArgumentList(llvm::SmallVector<clang::ParsedTemplateArgument,
16u>&) + 121
30 clang                    0x0000000105a4d022
clang::Parser::ParseTemplateIdAfterTemplateName(clang::OpaquePtr<clang::TemplateName>,
clang::SourceLocation, clang::CXXScopeSpec const&, bool,
clang::SourceLocation&, llvm::SmallVector<clang::ParsedTemplateArgument, 16u>&,
clang::SourceLocation&) + 338
31 clang                    0x0000000105a4d51e
clang::Parser::AnnotateTemplateIdToken(clang::OpaquePtr<clang::TemplateName>,
clang::TemplateNameKind, clang::CXXScopeSpec&, clang::SourceLocation,
clang::UnqualifiedId&, bool) + 590
32 clang                    0x0000000105a05db6
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool, clang::IdentifierInfo**)
+ 6406
33 clang                    0x0000000105a5d639
clang::Parser::TryAnnotateName(bool, clang::CorrectionCandidateCallback*) + 329
34 clang                    0x0000000105a39583
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1011
35 clang                    0x0000000105a39045
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
36 clang                    0x0000000105a40069
clang::Parser::ParseCompoundStatementBody(bool) + 1289
37 clang                    0x0000000105a40be8
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 328
38 clang                    0x00000001059be81f
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 1663
39 clang                    0x00000001059be194
clang::Parser::LexedMethod::ParseLexedMethodDefs() + 36
40 clang                    0x00000001059bd901
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 321
41 clang                    0x00000001059e889e
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 4574
42 clang                    0x00000001059e71df
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 9567
43 clang                    0x00000001059ca565
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 10517
44 clang                    0x0000000105a49c83
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 755
45 clang                    0x0000000105a496df
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 1311
46 clang                    0x0000000105a49057
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 215
47 clang                    0x00000001059c7700
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 464
48 clang                    0x0000000105a5a5ee
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2638
49 clang                    0x0000000105a59b2f
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 703
50 clang                    0x00000001059b9c9c clang::ParseAST(clang::Sema&,
bool, bool) + 988
51 clang                    0x00000001053c690a
clang::ASTFrontendAction::ExecuteAction() + 522
52 clang                    0x000000010587372f
clang::CodeGenAction::ExecuteAction() + 3391
53 clang                    0x00000001053c5e80 clang::FrontendAction::Execute()
+ 112
54 clang                    0x0000000105359594
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 996
55 clang                    0x00000001052831a0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3200
56 clang                    0x00000001052610e0 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 2496
57 clang                    0x000000010527891b
ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 171
58 clang                    0x0000000105277ef7 main + 663
59 libdyld.dylib            0x000000010ea1e5fd start + 1
60 libdyld.dylib            0x0000000000000032 start + 4049476150
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -main-file-name
testcase_min2.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.4
-dwarf-column-info -coverage-file /Users/Reuben/Development/testcase_min2.o
-resource-dir /usr/local/bin/../lib/clang/3.6.0 -stdlib=libc++ -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/Reuben/Development
-ferror-limit 19 -fmessage-length 203 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -o testcase_min2.o -x c++ testcase_min2.cpp
1.    testcase_min2.cpp:19:40: current parser token '>'
2.    testcase_min2.cpp:15:1: parsing struct/union/class body
'CompartmentsIterT'
3.    testcase_min2.cpp:18:15: parsing function body 'next'
4.    testcase_min2.cpp:18:15: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (trunk 215980)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
clang: 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: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/n5/273bjmpn5_dgnv7nyygm18rr0000gn/T/testcase_min2-9a20ae.cpp
clang: note: diagnostic msg:
/var/folders/n5/273bjmpn5_dgnv7nyygm18rr0000gn/T/testcase_min2-9a20ae.sh
clang: 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/20140820/0fcb4f06/attachment.html>


More information about the llvm-bugs mailing list