[LLVMbugs] [Bug 17574] New: Clang trunk crash in ConsumedStateMap::intersectAtLoopHead

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 14 08:43:57 PDT 2013


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

            Bug ID: 17574
           Summary: Clang trunk crash in
                    ConsumedStateMap::intersectAtLoopHead
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm at sjor.sg
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11371
  --> http://llvm.org/bugs/attachment.cgi?id=11371&action=edit
Source code that makes Clang 3.4 trunk crash.

After upgrading to the newest clang 3.4 nightly on Debian, I got crashes in
existing source code. I've stripped the file down to the essentials; it has an
infinite loop but otherwise valid code. The -E version and Clang-generated
shell script are attached. Output follows.

0  libLLVM-3.4.so.1 0x00007f63584b9262 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.4.so.1 0x00007f63584b95f9
2  libpthread.so.0  0x00007f63572a0cb0
3  clang            0x000000000105f254
4  clang            0x000000000105f2dc
5  clang            0x000000000105f2dc
6  clang            0x0000000001062c3f
clang::consumed::ConsumedStateMap::intersectAtLoopHead(clang::CFGBlock const*,
clang::CFGBlock const*, clang::consumed::ConsumedStateMap const*,
clang::consumed::ConsumedWarningsHandlerBase&) + 31
7  clang            0x0000000001068501
clang::consumed::ConsumedAnalyzer::run(clang::AnalysisDeclContext&) + 1009
8  clang            0x0000000000c65049
clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy,
clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) +
3337
9  clang            0x0000000000931400
clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy
const*, clang::Decl const*, clang::BlockExpr const*) + 336
10 clang            0x00000000009b6e1e
clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 430
11 clang            0x00000000009078ba
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 250
12 clang            0x00000000008a9c7e
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
1550
13 clang            0x00000000008be6f0
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1808
14 clang            0x00000000008a7489
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 249
15 clang            0x00000000008a7bb0
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 976
16 clang            0x00000000008abeeb
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 283
17 clang            0x00000000008ac868
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 184
18 clang            0x00000000008a27dd clang::ParseAST(clang::Sema&, bool,
bool) + 493
19 clang            0x00000000005c2c2a clang::FrontendAction::Execute() + 202
20 clang            0x00000000005a30ed
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 285
21 clang            0x000000000058b0d2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1570
22 clang            0x0000000000585260 cc1_main(char const**, char const**,
char const*, void*) + 1184
23 clang            0x0000000000583943 main + 627
24 libc.so.6        0x00007f63569da76d __libc_start_main + 237
25 clang            0x0000000000584c71
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name comp_spot.cc
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -g -D HAVE_CONFIG_H -D
ITK_IO_FACTORY_REGISTER_MANAGER -O2 -Wno-deprecated -Wall -Wextra
-Wno-write-strings -Wno-unused-result -Weverything -Wno-newline-eof
-Wno-variadic-macros -Wno-padded -Wno-vla -Wno-c++98-compat-pedantic
-Wno-float-equal -Wno-pedantic -Wno-weak-vtables -Wno-disabled-macro-expansion
-Wno-missing-prototypes -Wno-missing-noreturn -Wno-global-constructors
-Wno-exit-time-destructors -Wno-cast-align -Wno-documentation
-Wno-missing-variable-declarations -Wno-covered-switch-default -Wno-extra-semi
-Wno-unreachable-code -Wno-over-aligned
-Wno-tautological-constant-out-of-range-compare -Wno-shadow
-Wno-conditional-uninitialized -Wno-sign-conversion -Wno-conversion
-Wno-switch-enum -Wno-undef -Wno-format-nonliteral -Wno-deprecated-declarations
-Wno-sign-compare -std=c++0x -ferror-limit 19 -fmessage-length 172
-mstackrealign -fno-gnu-keywords -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -x c++ comp_spot-e0ee68.cpp 
1.    <eof> parser at end of file
2.    /home/sjors/nico/CAD/src/comp_spot.cc:11:20: parsing function body 'read'
Segmentation fault (core dumped)

-- 
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/20131014/9067109d/attachment.html>


More information about the llvm-bugs mailing list