[llvm-bugs] [Bug 24375] New: Core dump on invalid code

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 6 05:47:49 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24375

            Bug ID: 24375
           Summary: Core dump on invalid code
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: luca.savarino at epitech.eu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Hello,

Got this bug when I compile on my fedora 21 with clang 3.5.0 and -std=c++11
flag. (see attached file for source).

0  libLLVM-3.5.so  0x00007fc9a9c86582 llvm::sys::PrintStackTrace(_IO_FILE*) +
50
1  libLLVM-3.5.so  0x00007fc9a9c85fdc
2  libpthread.so.0 0x00007fc9a929f0d0
3  clang           0x0000000000bac9bc
clang::Sema::FinalizeDeclaration(clang::Decl*) + 1180
4  clang           0x0000000000a62a0e
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 222
5  clang           0x0000000000a74582
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1170
6  clang           0x0000000000a75346
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 870
7  clang           0x0000000000a75651
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 241
8  clang           0x0000000000ac8537
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2903
9  clang           0x0000000000ac8736
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 150
10 clang           0x0000000000acb921
clang::Parser::ParseCompoundStatementBody(bool) + 1937
11 clang           0x0000000000acd9a6
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 198
12 clang           0x0000000000adde58
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 312
13 clang           0x0000000000addc14
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 100
14 clang           0x0000000000a88253
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 1731
15 clang           0x0000000000a898b5
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 2293
16 clang           0x0000000000a71841
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 6241
17 clang           0x0000000000ad7a14
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 884
18 clang           0x0000000000ad9202
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 962
19 clang           0x0000000000ad954b
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 123
20 clang           0x0000000000a757b8
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 600
21 clang           0x0000000000a5caf3
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1475
22 clang           0x0000000000a5cf4b
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 443
23 clang           0x0000000000a5230b clang::ParseAST(clang::Sema&, bool, bool)
+ 571
24 clang           0x000000000089c521 clang::CodeGenAction::ExecuteAction() +
49
25 clang           0x0000000000701806 clang::FrontendAction::Execute() + 118
26 clang           0x00000000006d9220
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 272
27 clang           0x00000000006c08bf
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2047
28 clang           0x00000000006ba028 cc1_main(char const**, char const**, char
const*, void*) + 1272
29 clang           0x00000000006b8e94 main + 9956
30 libc.so.6       0x00007fc9a7e55fe0 __libc_start_main + 240
31 clang           0x00000000006b90cb
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-redhat-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
main.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.24 -dwarf-column-info -coverage-file /tmp/main.o
-resource-dir /usr/bin/../lib/clang/3.5.0 -internal-isystem
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2
-internal-isystem
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/x86_64-redhat-linux
-internal-isystem
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.5.0/include -internal-externc-isystem /usr/include
-internal-externc-isystem /usr/lib/gcc/x86_64-redhat-linux/4.9.2/include
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir /tmp -ferror-limit 19
-fmessage-length 211 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o main.o -x c++
main.cpp 
1.    main.cpp:9:24: current parser token 's'
2.    main.cpp:5:1: parsing struct/union/class body 'ctl'
3.    main.cpp:8:3: parsing function body 'f'
4.    main.cpp:8:3: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0 (tags/RELEASE_350/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

-- 
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/20150806/ff35aa5b/attachment.html>


More information about the llvm-bugs mailing list