[LLVMbugs] [Bug 11000] New: Segmentation fault on invalid code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 23 12:54:18 PDT 2011


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

           Summary: Segmentation fault on invalid code
           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=7345)
 --> (http://llvm.org/bugs/attachment.cgi?id=7345)
reduced test-case

% clang++ -std=c++0x -c output-minimal.ii
output-minimal.ii:1:7: error: explicit specialization of non-template class
'tuple'
class tuple<>
      ^    ~~
output-minimal.ii:4:30: error: expected ')'
        tuple(allocator_arg_t, const _Alloc&) {}
                             ^
output-minimal.ii:4:14: note: to match this '('
        tuple(allocator_arg_t, const _Alloc&) {}
             ^
output-minimal.ii:4:15: error: member 'allocator_arg_t' declared as a template
        tuple(allocator_arg_t, const _Alloc&) {}
              ^
output-minimal.ii:4:49: error: expected ';' at end of declaration list
        tuple(allocator_arg_t, const _Alloc&) {}

                                                ^
                                                ;
output-minimal.ii:4:49: error: expected '}'
output-minimal.ii:2:1: note: to match this '{'
{
^
0  libLLVM-3.0svn.so 0x00007ffff737d8cf
1  libLLVM-3.0svn.so 0x00007ffff737de39
2  libpthread.so.0   0x00007ffff651ff70
3  clang             0x000000000077a663
clang::Parser::ParseLexedMemberInitializer(clang::Parser::LateParsedMemberInitializer&)
+ 19
4  clang             0x0000000000779e28
clang::Parser::ParseLexedMemberInitializers(clang::Parser::ParsingClass&) + 216
5  clang             0x000000000078ed9c
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1868
6  clang             0x000000000078e05c
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4796
7  clang             0x000000000077fc75
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 2821
8  clang             0x0000000000775234
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 68
9  clang             0x000000000077566c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 396
10 clang             0x0000000000774a4c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2700
11 clang             0x0000000000773f4e
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 254
12 clang             0x000000000075c84e clang::ParseAST(clang::Sema&, bool) +
318
13 clang             0x00000000006648b1 clang::CodeGenAction::ExecuteAction() +
769
14 clang             0x0000000000561a77
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 983
15 clang             0x000000000054cd40
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2832
16 clang             0x0000000000544cdf cc1_main(char const**, char const**,
char const*, void*) + 6015
17 clang             0x0000000000549268 main + 632
18 libc.so.6         0x00007ffff5829c7d __libc_start_main + 253
19 clang             0x0000000000543499
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-minimal.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 output-minimal.o -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 output-minimal.o -x c++-cpp-output output-minimal.ii 
1.      <eof> parser at end of file
2.      output-minimal.ii:1:1: parsing struct/union/class body 'tuple'
clang: error: unable to execute command: Segmentation fault
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.
%

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