[LLVMbugs] [Bug 13710] New: clang --analyze crashes on gpsd

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 27 11:15:44 PDT 2012


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

             Bug #: 13710
           Summary: clang --analyze crashes on gpsd
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: jeremy at goop.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9116
  --> http://llvm.org/bugs/attachment.cgi?id=9116
Preprocessed C source

When running clang --analyze on gpsd
(http://git.savannah.gnu.org/cgit/gpsd.git) it crashes early in the build:

clang -v --analyze -o gpsutils.os -c -D_GNU_SOURCE -Wextra -Wall
-Wno-uninitialized -Wno-missing-field-initializers -Wcast-align
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
-Wreturn-type -Wno-cast-align -O2 -fPIC gpsutils.c
clang version 3.2 (trunk 162651)
Target: x86_64-unknown-linux-gnu
Thread model: posix
 "/usr/local/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -analyze
-disable-free -disable-llvm-verifier -main-file-name gpsutils.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
-pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.22.52.0.1
-momit-leaf-frame-pointer -v -coverage-file gpsutils.os -resource-dir
/usr/local/bin/../lib/clang/3.2 -D _GNU_SOURCE -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem /usr/local/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
-Wreturn-type -Wno-cast-align -fdebug-compilation-dir /home/jeremy/src/gpsd
-ferror-limit 19 -fmessage-length 106 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -o gpsutils.os -x c gpsutils.c
clang -cc1 version 3.2 based upon LLVM 3.2svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/bin/../lib/clang/3.2/include
 /usr/include
End of search list.
0  clang           0x0000000001c7504f
1  clang           0x0000000001c75369
2  libpthread.so.0 0x0000003ad700efe0
3  clang           0x0000000000da9060
clang::ento::CallEvent::mayBeInlined(clang::Stmt const*) + 0
4  clang           0x0000000000dcaae2
clang::ento::ExplodedGraph::shouldCollect(clang::ento::ExplodedNode const*) +
498
5  clang           0x0000000000dcab47
clang::ento::ExplodedGraph::reclaimRecentlyAllocatedNodes() + 71
6  clang           0x0000000000dd4981
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 49
7  clang           0x0000000000dd4f0c
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
156
8  clang           0x0000000000db997a
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 74
9  clang           0x0000000000dba7fe
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 110
10 clang           0x0000000000dbb161
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 257
11 clang           0x0000000000c9c274
12 clang           0x0000000000ca5f8a
13 clang           0x0000000000969f9a clang::ParseAST(clang::Sema&, bool, bool)
+ 554
14 clang           0x00000000007068b1 clang::FrontendAction::Execute() + 97
15 clang           0x00000000006e8ae9
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 265
16 clang           0x00000000006d0c52
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1058
17 clang           0x00000000006cb088 cc1_main(char const**, char const**, char
const*, void*) + 6888
18 clang           0x00000000006b9a84 main + 7732
19 libc.so.6       0x0000003ad6c21735 __libc_start_main + 245
20 clang           0x00000000006c8b5d
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier
-main-file-name gpsutils.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
-pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.22.52.0.1
-momit-leaf-frame-pointer -v -coverage-file gpsutils.os -resource-dir
/usr/local/bin/../lib/clang/3.2 -D _GNU_SOURCE -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem /usr/local/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
-Wreturn-type -Wno-cast-align -fdebug-compilation-dir /home/jeremy/src/gpsd
-ferror-limit 19 -fmessage-length 106 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -o gpsutils.os -x c gpsutils.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 version 3.2 (trunk 162651)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/gpsutils-gtmaCH.c
clang: note: diagnostic msg: /tmp/gpsutils-gtmaCH.sh
clang: note: diagnostic msg: 

********************
scons: *** [gpsutils.os] Error 254
scons: building terminated because of errors.
exit status 2

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