[LLVMbugs] [Bug 16199] New: Compiler crashes upon detecting an error in an incorrect program

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 2 16:46:19 PDT 2013


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

            Bug ID: 16199
           Summary: Compiler crashes upon detecting an error in an
                    incorrect program
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: feliks.kluzniak at telia.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is for 
clang version 3.3 (trunk 180025)
Target: x86_64-apple-darwin12.3.0

I can see the following:
/opt/local/bin/clang++-mp-3.3 -std=c++11 -Wextra -Weverything -Wno-padded
-Wno-c++11-extensions -Wno-c++98-compat -Wall -o test_slist.o -c test_slist.cc
In file included from test_slist.cc:2:
./slist_impl.hh:13:1: error: 'static' can only be specified inside the class
      definition
static MemoryPool<sizeof(SList<T>)> SList<T>::pool;
^~~~~~~
Assertion failed: (!isDependentType() && "This doesn't make sense for dependent
types"), function isConstantSizeType, file Type.cpp, line 899.
0  libLLVM-3.3svn.dylib 0x000000010f69bd95 llvm::sys::PrintStackTrace(__sFILE*)
+ 37
1  libLLVM-3.3svn.dylib 0x000000010f69c409 SignalHandler(int) + 713
2  libsystem_c.dylib    0x00007fff897ce94a _sigtramp + 26
3  libsystem_c.dylib    000000000000000000 _sigtramp + 1988302544
4  libLLVM-3.3svn.dylib 0x000000010f69c096 abort + 22
5  libLLVM-3.3svn.dylib 0x000000010f69c055 __assert_rtn + 53
6  clang                0x000000010e2419ec clang::Type::isConstantSizeType()
const + 124
7  clang                0x000000010e1dc140 HandleSizeof((anonymous
namespace)::EvalInfo&, clang::SourceLocation, clang::QualType,
clang::CharUnits&) + 96
8  clang                0x000000010e1cf07d
clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::IntExprEvaluator, bool>::Visit(clang::Stmt const*) + 5357
9  clang                0x000000010e1ccfe4 Evaluate(clang::APValue&, (anonymous
namespace)::EvalInfo&, clang::Expr const*) + 356
10 clang                0x000000010e1c796c EvaluateAsRValue((anonymous
namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) + 60
11 clang                0x000000010e1c76e3
clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext
const&) const + 259
12 clang                0x000000010e1c91bc
clang::Expr::EvaluateKnownConstInt(clang::ASTContext const&,
llvm::SmallVectorImpl<std::pair<clang::SourceLocation,
clang::PartialDiagnostic> >*) const + 44
13 clang                0x000000010e129571 (anonymous
namespace)::TemplateDiff::GetInt((anonymous
namespace)::TemplateDiff::TSTiterator const&, clang::Expr*) + 305
14 clang                0x000000010e12852c (anonymous
namespace)::TemplateDiff::DiffTemplate(clang::TemplateSpecializationType
const*, clang::TemplateSpecializationType const*) + 3932
15 clang                0x000000010e123659
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::DiagnosticsEngine::ArgumentKind, long> const*, unsigned int,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 1641
16 clang                0x000000010e261caa
clang::Diagnostic::FormatDiagnostic(char const*, char const*,
llvm::SmallVectorImpl<char>&) const + 2314
17 clang                0x000000010d886483
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 115
18 clang                0x000000010e2660e1
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 433
19 clang                0x000000010e261249
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 89
20 clang                0x000000010db3d699
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 889
21 clang                0x000000010dbb71d2
clang::Sema::MergeVarDeclTypes(clang::VarDecl*, clang::VarDecl*, bool) + 674
22 clang                0x000000010dbb7658
clang::Sema::MergeVarDecl(clang::VarDecl*, clang::LookupResult&, bool) + 904
23 clang                0x000000010dbc6407
clang::Sema::CheckVariableDeclaration(clang::VarDecl*, clang::LookupResult&) +
3703
24 clang                0x000000010dbc3f1c
clang::Sema::ActOnVariableDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 7036
25 clang                0x000000010dbbce3b
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 3147
26 clang                0x000000010dd66b3b
clang::Sema::ActOnTemplateDeclarator(clang::Scope*,
llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Declarator&) + 27
27 clang                0x000000010dab6880
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 208
28 clang                0x000000010db036e2
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 2594
29 clang                0x000000010db0292b
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 795
30 clang                0x000000010db02473
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 227
31 clang                0x000000010dab2042
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 386
32 clang                0x000000010db0d366
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1526
33 clang                0x000000010db0cced
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 301
34 clang                0x000000010daa7de5 clang::ParseAST(clang::Sema&, bool,
bool) + 325
35 clang                0x000000010da6a865
clang::CodeGenAction::ExecuteAction() + 1205
36 clang                0x000000010d85bf0c clang::FrontendAction::Execute() +
124
37 clang                0x000000010d83ad4f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1007
38 clang                0x000000010d80d3d4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3652
39 clang                0x000000010d8049a5 cc1_main(char const**, char const**,
char const*, void*) + 837
40 clang                0x000000010d809214 main + 708
41 libdyld.dylib        0x00007fff9045e7e1 start + 0
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.3/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test_slist.cc -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 134.9
-coverage-file /Users/feliks/projects/DLC/test_slist.o -resource-dir
/opt/local/libexec/llvm-3.3/bin/../lib/clang/3.3 -Wextra -Weverything
-Wno-padded -Wno-c++11-extensions -Wno-c++98-compat -Wall -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/feliks/projects/DLC
-ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -backend-option
-vectorize-loops -o test_slist.o -x c++ test_slist.cc 
1.    ./slist_impl.hh:13:51: current parser token ';'
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.3 (trunk 180025)
Target: x86_64-apple-darwin12.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:

-- 
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/20130602/c900907d/attachment.html>


More information about the llvm-bugs mailing list