[LLVMbugs] [Bug 10686] New: Segfault

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 17 05:21:44 PDT 2011


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

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


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

pipping at bogus /home/pipping/foo % clang++ -c in.ii
in.ii:1:102: error: expected ',' or '>' in template-parameter-list
 namespace Dune {    namespace GenericGeometry   {      template< template< int
> class Element, int 3 > ...
                                                                               
                     ^
in.ii:1:104: error: expected unqualified-id
 namespace Dune {    namespace GenericGeometry   {      template< template< int
> class Element, int 3 > ...
                                                                               
                       ^
in.ii:1:802: error: explicit specialization of non-template class 'CodimTable'
  ...template< int > class Element>     class CodimTable< Element, -1 >     {  
    friend class CodimTable< ...
                                              ^         ~~~~~~~~~~~~~~~
in.ii:1:853: error: too many template arguments for class template 'CodimTable'
  ...-1 >     {       friend class CodimTable< Element, 0 >;       typedef
typename Dune::tuple<> ElementTuple; ...
                                   ^                    ~~~
in.ii:1:802: note: template is declared here
  ...}     };       template< template< int > class Element>     class
CodimTable< Element, -1 >     { ...
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ^
clang: DeclSpec.cpp:511: bool clang::DeclSpec::SetTypeSpecType(TST,
clang::SourceLocation, clang::SourceLocation, const char *&, unsigned int &,
ParsedType): Assertion `Rep && "no type provided!"' failed.
0  libLLVM-3.0svn.so 0x00007fea146e1dcf
1  libLLVM-3.0svn.so 0x00007fea146e2279
2  libpthread.so.0   0x00007fea138d9f10
3  libc.so.6         0x00007fea12bf85c5 gsignal + 53
4  libc.so.6         0x00007fea12bf98c5 abort + 389
5  libc.so.6         0x00007fea12bf1235 __assert_fail + 245
6  clang             0x00000000007988c1
7  clang             0x000000000077991c
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4908
8  clang             0x000000000076b736
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2710
9  clang             0x000000000077b812
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 1986
10 clang             0x000000000077a43c
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1452
11 clang             0x0000000000779895
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4773
12 clang             0x000000000076b736
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2710
13 clang             0x0000000000758e68
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 696
14 clang             0x00000000007589e3
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 723
15 clang             0x0000000000758660
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 304
16 clang             0x000000000076a827
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 327
17 clang             0x000000000076106b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1643
18 clang             0x00000000007766da
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&) + 218
19 clang             0x000000000077628e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 3342
20 clang             0x000000000076a89a
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 442
21 clang             0x000000000076106b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1643
22 clang             0x00000000007766da
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&) + 218
23 clang             0x000000000077628e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 3342
24 clang             0x000000000076a89a
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 442
25 clang             0x000000000076106b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1643
26 clang             0x0000000000760984
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 244
27 clang             0x0000000000749b3e clang::ParseAST(clang::Sema&, bool) +
318
28 clang             0x0000000000651c00 clang::CodeGenAction::ExecuteAction() +
768
29 clang             0x0000000000558c17
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 983
30 clang             0x0000000000543aab
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2779
31 clang             0x000000000053bb2c cc1_main(char const**, char const**,
char const*, void*) + 6124
32 clang             0x0000000000540008 main + 632
33 libc.so.6         0x00007fea12be4c7d __libc_start_main + 253
34 clang             0x000000000053a279
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name in.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 in.o -resource-dir /usr/bin/../lib/clang/3.0 -fdeprecated-macro
-ferror-limit 19 -fmessage-length 118 -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o in.o -x c++-cpp-output in.ii 
1.      in.ii:1:877: current parser token ';'
2.      in.ii:1:2: parsing namespace 'Dune'
3.      in.ii:1:22: parsing namespace 'GenericGeometry'
4.      in.ii:1:796: parsing struct/union/class body 'CodimTable'
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/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.
pipping at bogus /home/pipping/foo % 

This is with clang 3.0-git-a47027bbd8443593cec15bd7f1fc0eed38d4f904.

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