[LLVMbugs] [Bug 10603] New: Segfault

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Aug 7 11:16:34 PDT 2011


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

           Summary: Segfault
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pipping at exherbo.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=7031)
 --> (http://llvm.org/bugs/attachment.cgi?id=7031)
delta-reduced input (not valid code but manages to make clang++ crash)

pipping at bogus /home/pipping/reduce % clang++ -std=c++0x -c output_conf.ii -o
/dev/null
output_conf.ii:10:94: error: expected class name
  template <class _Tp, class _Arg> struct __is_nothrow_assignable<false, _Tp,
_Arg> : public false_type {
                                                                               
             ^
output_conf.ii:13:15: error: unknown type name 'PaludisEnvironment'
    Imp(const PaludisEnvironment * const e) :
              ^
output_conf.ii:13:5: error: C++ requires a type specifier for all declarations
    Imp(const PaludisEnvironment * const e) :
    ^~~
output_conf.ii:14:41: error: no member named 'make_shared' in namespace 'std'
      env(e), predefined_variables(std::make_shared<Map<std::string,
std::string> >())
                                   ~~~~~^
clang: SemaTemplateInstantiate.cpp:1245: clang::QualType <anonymous
namespace>::TemplateInstantiator::TransformTemplateTypeParmType(clang::TypeLocBuilder
&, clang::TemplateTypeParmTypeLoc): Assertion `Arg.getKind() ==
TemplateArgument::Type && "Template argument kind mismatch"' failed.
0  libLLVM-3.0svn.so 0x00007fd47afccddf
1  libLLVM-3.0svn.so 0x00007fd47afcd289
2  libpthread.so.0   0x00007fd47a1ddf10
3  libc.so.6         0x00007fd4794fc5c5 gsignal + 53
4  libc.so.6         0x00007fd4794fd8c5 abort + 389
5  libc.so.6         0x00007fd4794f5235 __assert_fail + 245
6  clang             0x000000000098cd48
7  clang             0x0000000000989c63
8  clang             0x000000000099d72f
9  clang             0x000000000099f799
10 clang             0x000000000098bccd
11 clang             0x0000000000989c63
12 clang             0x000000000098d09c
13 clang             0x000000000098d00d clang::Sema::SubstType(clang::QualType,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 77
14 clang             0x00000000009a4243
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
clang::MultiLevelTemplateArgumentList const&) + 707
15 clang             0x00000000009a747b
clang::Sema::FindInstantiatedContext(clang::SourceLocation,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 59
16 clang             0x00000000009a43c4
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
clang::MultiLevelTemplateArgumentList const&) + 1092
17 clang             0x000000000099e8a9
18 clang             0x000000000099bc8c
19 clang             0x000000000098bcaf
20 clang             0x0000000000989c63
21 clang             0x0000000000989b2d
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 77
22 clang             0x000000000093bdd0
23 clang             0x0000000000939114
clang::Sema::CheckTemplateArgumentList(clang::TemplateDecl*,
clang::SourceLocation, clang::TemplateArgumentListInfo&, bool,
llvm::SmallVectorImpl<clang::TemplateArgument>&) + 1444
24 clang             0x000000000093851d
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) + 397
25 clang             0x000000000093a0bf
clang::Sema::ActOnTemplateIdType(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, clang::ASTTemplateArgsPtr, clang::SourceLocation) + 607
26 clang             0x00000000007566f4
clang::Parser::AnnotateTemplateIdTokenAsType() + 116
27 clang             0x000000000075eba5
clang::Parser::TryAnnotateTypeOrScopeToken(bool) + 1925
28 clang             0x000000000077adaf
clang::Parser::ParseCastExpression(bool, bool, bool&, bool) + 511
29 clang             0x0000000000779645
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 293
30 clang             0x00000000007794f0
clang::Parser::ParseAssignmentExpression() + 176
31 clang             0x000000000077fc36
clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&,
llvm::SmallVectorImpl<clang::SourceLocation>&, void
(clang::Sema::*)(clang::Scope*, clang::Expr*, clang::Expr**, unsigned int),
clang::Expr*) + 310
32 clang             0x0000000000777cfd
clang::Parser::ParseMemInitializer(clang::Decl*) + 429
33 clang             0x00000000007779a3
clang::Parser::ParseConstructorInitializer(clang::Decl*) + 419
34 clang             0x0000000000761d73
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 387
35 clang             0x00000000007617c4
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 132
36 clang             0x0000000000774ff7
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1879
37 clang             0x00000000007742d5
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4677
38 clang             0x0000000000766232
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2754
39 clang             0x0000000000753fe8
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 696
40 clang             0x0000000000753b63
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 723
41 clang             0x00000000007537e0
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 304
42 clang             0x00000000007652f7
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 327
43 clang             0x000000000075c1db
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1643
44 clang             0x000000000077116a
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::SourceLocation&, clang::ParsedAttributes&, clang::SourceLocation&) + 186
45 clang             0x0000000000770d3e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 3342
46 clang             0x000000000076536a
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 442
47 clang             0x000000000075c1db
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1643
48 clang             0x000000000075baf4
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 244
49 clang             0x0000000000744cfe clang::ParseAST(clang::Sema&, bool) +
318
50 clang             0x000000000064b1d0 clang::CodeGenAction::ExecuteAction() +
768
51 clang             0x0000000000550f77
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 983
52 clang             0x000000000053bdbb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2779
53 clang             0x0000000000533e87 cc1_main(char const**, char const**,
char const*, void*) + 6135
54 clang             0x0000000000538348 main + 632
55 libc.so.6         0x00007fd4794e8c7d __libc_start_main + 253
56 clang             0x00000000005325c9
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name output_conf.ii
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.1
-momit-leaf-frame-pointer -coverage-file /dev/null -resource-dir
/usr/bin/../lib/clang/3.0 -std=c++0x -fdeprecated-macro -ferror-limit 19
-fmessage-length 238 -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o /dev/null -x c++-cpp-output output_conf.ii 
1.      output_conf.ii:14:53: at annotation token 
2.      output_conf.ii:1:1: parsing namespace 'std'
3.      output_conf.ii:10:36: parsing struct/union/class body
'__is_nothrow_assignable'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to http://llvm.org and
include command line arguments and all diagnostic information.
0  libLLVM-3.0svn.so 0x00007f2a8abdcddf
1  libLLVM-3.0svn.so 0x00007f2a8abdd289
2  libpthread.so.0   0x00007f2a89dedf10
3  clang++           0x000000000059047a
clang::driver::Driver::BuildActions(clang::driver::ToolChain const&,
clang::driver::DerivedArgList const&, llvm::SmallVector<clang::driver::Action*,
3u>&) const + 3226
4  clang++           0x0000000000590e46
clang::driver::Driver::generateCompilationDiagnostics(clang::driver::Compilation&,
clang::driver::Command const*) + 246
5  clang++           0x000000000053a630 main + 9568
6  libc.so.6         0x00007f2a890f8c7d __libc_start_main + 253
7  clang++           0x00000000005325c9
Stack dump:
0.      Program arguments: clang++ -std=c++0x -c output_conf.ii -o /dev/null 
1.      Building compilation actions
zsh: segmentation fault  clang++ -std=c++0x -c output_conf.ii -o /dev/null
pipping at bogus /home/pipping/reduce % 

clang version 3.0 git-a8e0cd8cdecc7e0ba1792e46773b884c6eed4829

-- 
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