[LLVMbugs] [Bug 14015] New: Clang crashes issuing error message for clearly invalid code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 4 04:52:47 PDT 2012


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

             Bug #: 14015
           Summary: Clang crashes issuing error message for clearly
                    invalid code
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chandlerc at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In file included from SROA-tnJ3XV.cpp:1:
../lib/Transforms/Scalar/SROA.cpp:3382:14: error: no viable overloaded '='
    Worklist = PostPromotionWorklist;
    ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~0  clang-3.1       0x0000000000f18602
1  clang-3.1       0x0000000000f18944
2  libpthread.so.0 0x00007fb7b2f1eb90
3  clang-3.1       0x00000000018295354  clang-3.1       0x0000000001829106
5  clang-3.1       0x0000000001825ae7
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::Diagnostic
sEngine::ArgumentKind, long> const*, unsigned int,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 2199
6  clang-3.1       0x0000000000f1e29a clang::Diagnostic::FormatDiagnostic(char
const*, char const*, llvm::SmallVectorImpl<char>&) const + 46347  clang-3.1    
  0x00000000010c33f0
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 96
8  clang-3.1       0x0000000000f21a60
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 528
9  clang-3.1       0x0000000000f1cddd
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 93
10 clang-3.1       0x000000000133225d
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 1165
11 clang-3.1       0x00000000014dc1f512 clang-3.1       0x00000000014cced8
clang::OverloadCandidateSet::NoteCandidates(clang::Sema&,
clang::OverloadCandidateDisplayKind, llvm::ArrayRef<clang::Expr*>, char const*,
clang::SourceLocation) + 295
2
13 clang-3.1       0x00000000014dfd8f
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 4095
14 clang-3.1       0x00000000014400d1 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
1057
15 clang-3.1       0x00000000014253e7 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) +
1735
16 clang-3.1       0x000000000115e7ed
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 4045
17 clang-3.1       0x000000000115d80c
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 252
18 clang-3.1       0x000000000115d6f9
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
19 clang-3.1       0x0000000001184845 clang::Parser::ParseExprStatement() + 53
20 clang-3.1       0x0000000001184435
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRang
e&) + 1861
21 clang-3.1       0x0000000001183c8a
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 154
22 clang-3.1       0x000000000118a0b4
clang::Parser::ParseCompoundStatementBody(bool) + 1636
23 clang-3.1       0x000000000118419f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRang
e&) + 1199
24 clang-3.1       0x0000000001183c8a
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 154
25 clang-3.1       0x0000000001186b75 clang::Parser::ParseDoStatement() + 21326
clang-3.1       0x00000000011844fe
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 206227 clang-3.1       0x0000000001183c8a
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 154
28 clang-3.1       0x000000000118a0b4
clang::Parser::ParseCompoundStatementBody(bool) + 1636
29 clang-3.1       0x000000000118bb41
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 161
30 clang-3.1       0x0000000001136ea9
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&,
llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>
*) + 1929
31 clang-3.1       0x0000000001143099
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1401
32 clang-3.1       0x0000000001136631
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 593
33 clang-3.1       0x00000000011361d1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 305
34 clang-3.1       0x00000000011356b4
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2196
35 clang-3.1       0x0000000001134d97
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 311
36 clang-3.1       0x0000000001132087 clang::ParseAST(clang::Sema&, bool, bool)
+ 471
37 clang-3.1       0x0000000000f2e8dd clang::CodeGenAction::ExecuteAction() +
77
38 clang-3.1       0x00000000010a927b clang::FrontendAction::Execute() + 91
39 clang-3.1       0x000000000108d00d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 845
40 clang-3.1       0x0000000000f1b1c7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3399
41 clang-3.1       0x000000000063f1bb cc1_main(char const**, char const**, char
const*, void*) + 651
42 clang-3.1       0x000000000063c16d main + 2925
43 libc.so.6       0x00007fb7b2405fad __libc_start_main + 237
44 clang-3.1       0x000000000063b4f5
Stack dump:
0.      Program arguments: /home/chandlerc/bin/clang-3.1 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name SROA.cpp -pic-level 2 -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu
x86-64 -momit-leaf-frame-pointer -g -D _GNU_SOURCE -D _DEBUG -D
__STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wno-long-long -Wcovered-switch-default
-pedantic -fconst-strings -fdeprecated-macro -ferror-limit 19 -fmessage-length
0 -fvisibility-inlines-hidden -mstackrealign -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -x c++ SROA-tnJ3XV.cpp 
1.      ../lib/Transforms/Scalar/SROA.cpp:3382:37: current parser token ';'
2.      ../lib/Transforms/Scalar/SROA.cpp:3342:39: parsing function body
'runOnFunction'
3.      ../lib/Transforms/Scalar/SROA.cpp:3342:39: in compound statement ('{}')
4.      ../lib/Transforms/Scalar/SROA.cpp:3363:6: in compound statement ('{}')
/tmp/SROA-tnJ3XV.sh: line 1:  4444 Segmentation fault     
"/home/chandlerc/bin/clang-3.1" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -main-file-name SROA.cpp
-pic-level 2 -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -g -D
"_GNU_SOURCE" -D "_DEBUG" -D "__STDC_CONSTANT_MACROS" -D "__STDC_FORMAT_MACROS"
-D "__STDC_LIMIT_MACROS" -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wno-long-long -Wcovered-switch-default -pedantic -fconst-strings
-fdeprecated-macro -ferror-limit 19 -fmessage-length 0
-fvisibility-inlines-hidden -mstackrealign -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -x c++ SROA-tnJ3XV.cpp

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list