[LLVMbugs] [Bug 19022] New: SIGSEGV in ParseSwitchStatement()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 2 02:40:02 PST 2014


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

            Bug ID: 19022
           Summary: SIGSEGV in ParseSwitchStatement()
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vanyacpp at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

int baz5()
{}

bool bar0()
{
    switch (int foo0)
    case bar5: ;
}

0  clang           0x000000000394bf0e llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1  clang           0x000000000394c1db
2  clang           0x000000000394d69a
3  libpthread.so.0 0x00007ff75dc13bd0
4  clang           0x0000000000965d6a
5  clang           0x0000000002276dc5 clang::Stmt::getLocEnd() const + 21
6  clang           0x0000000000f15431
clang::Parser::ParseSwitchStatement(clang::SourceLocation*) + 977
7  clang           0x0000000000f12d88
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1944
8  clang           0x0000000000f124d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
9  clang           0x0000000000f19298
clang::Parser::ParseCompoundStatementBody(bool) + 1384
10 clang           0x0000000000f1cb5f
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 319
11 clang           0x0000000000e9b141
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
3489
12 clang           0x0000000000eb2d53
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 467
13 clang           0x0000000000e9a1a2
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1234
14 clang           0x0000000000e99853
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 147
15 clang           0x0000000000e98e31
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3521
16 clang           0x0000000000e97e48
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 696
17 clang           0x0000000000e939ce clang::ParseAST(clang::Sema&, bool, bool)
+ 558
18 clang           0x0000000000910c7e clang::ASTFrontendAction::ExecuteAction()
+ 334
19 clang           0x0000000000c11935 clang::CodeGenAction::ExecuteAction() +
1477
20 clang           0x000000000091046f clang::FrontendAction::Execute() + 191
21 clang           0x00000000008d8fab
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 779
22 clang           0x0000000000897584
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1028
23 clang           0x0000000000884fc9 cc1_main(char const**, char const**, char
const*, void*) + 697
24 clang           0x000000000089139e main + 814
25 libc.so.6       0x00007ff75cc12ea5 __libc_start_main + 245
26 clang           0x0000000000884c45
Stack dump:
0.      Program arguments: /home/ivan/d/llvm/Debug+Asserts/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name 1.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.23.2 -resource-dir
/home/ivan/d/llvm/Debug+Asserts/bin/../lib/clang/3.5 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7
-internal-isystem /usr/local/include -internal-isystem
/home/ivan/d/llvm/Debug+Asserts/bin/../lib/clang/3.5/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir
/home/ivan/d/cppgen-build-desktop-Qt___PATH________ -ferror-limit 19
-fmessage-length 180 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
/tmp/1-d46882.o -x c++ 1.cpp 
1.      1.cpp:7:16: current parser token ';'
2.      1.cpp:5:1: parsing function body 'bar0'
3.      1.cpp:5:1: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5 (git at github.com:llvm-mirror/clang.git
30577e6c4f5ba66b8dc832ed9955b1a7475f788a) (git at github.com:llvm-mirror/llvm.git
c9bf74fdc543c2da90f334e0bf8e34b128c8a615)
Target: x86_64-unknown-linux-gnu
Thread model: posix

 ../llvm/Debug+Asserts/bin/clang++ --version
clang version 3.5 (git at github.com:llvm-mirror/clang.git
30577e6c4f5ba66b8dc832ed9955b1a7475f788a) (git at github.com:llvm-mirror/llvm.git
c9bf74fdc543c2da90f334e0bf8e34b128c8a615)
Target: x86_64-unknown-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/20140302/5e3124cb/attachment.html>


More information about the llvm-bugs mailing list