[LLVMbugs] [Bug 13473] New: clang --analyze crashes on C file

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 27 12:11:22 PDT 2012


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

             Bug #: 13473
           Summary: clang --analyze crashes on C file
           Product: new-bugs
           Version: 3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: michael at araneidae.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8957
  --> http://llvm.org/bugs/attachment.cgi?id=8957
Crashes clang analyser

When compiled with the command `clang --analyze archiver.c` the attached file
causes clang to crash with the backtrace below.  This is with clang 3.1 on Arch
linux.

$ clang --version
clang version 3.1 (branches/release_31)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ clang --analyze archiver.c
0  libLLVM-3.1.so  0x00007fba99ec263f
1  libLLVM-3.1.so  0x00007fba99ec2aa9
2  libpthread.so.0 0x00007fba99201170
3  clang           0x0000000000c59252
clang::ento::ExplodedGraph::shouldCollect(clang::ento::ExplodedNode const*) +
242
4  clang           0x0000000000c59367
clang::ento::ExplodedGraph::reclaimRecentlyAllocatedNodes() + 71
5  clang           0x0000000000c626c1
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 49
6  clang           0x0000000000c6369c
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
172
7  clang           0x0000000000c4968a
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 74
8  clang           0x0000000000c497eb
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 91
9  clang           0x0000000000c49a32
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 194
10 clang           0x0000000000b28e56
11 clang           0x0000000000b29852
12 clang           0x0000000000b30af9
13 clang           0x000000000082839d clang::ParseAST(clang::Sema&, bool, bool)
+ 461
14 clang           0x00000000005d7206
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 262
15 clang           0x00000000005c0552
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1042
16 clang           0x00000000005b9b73 cc1_main(char const**, char const**, char
const*, void*) + 9091
17 clang           0x00000000005b6c91 main + 7009
18 libc.so.6       0x00007fba98955725 __libc_start_main + 245
19 clang           0x00000000005b766d
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-analyze -disable-free -disable-llvm-verifier -main-file-name archiver.c
-analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-ipa=inlining -analyzer-checker=core
-analyzer-checker=unix -analyzer-checker=deadcode
-analyzer-checker=security.insecureAPI.UncheckedReturn
-analyzer-checker=security.insecureAPI.getpw
-analyzer-checker=security.insecureAPI.gets
-analyzer-checker=security.insecureAPI.mktemp
-analyzer-checker=security.insecureAPI.mkstemp
-analyzer-checker=security.insecureAPI.vfork -analyzer-output plist -w
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.22.0.20120323
-momit-leaf-frame-pointer -resource-dir /usr/bin/../lib/clang/3.1
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.1/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/michael/code/diamond/fa-archiver/crash
-ferror-limit 19 -fmessage-length 80 -mstackrealign -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -fcolor-diagnostics -o archiver.plist -x c archiver.c 
1.    <eof> parser at end of file
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (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: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/archiver-jv6Zrq.i
clang: note: diagnostic msg: /tmp/archiver-jv6Zrq.sh

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