[LLVMbugs] [Bug 19322] New: abort in static analysis
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 3 05:36:37 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19322
Bug ID: 19322
Summary: abort in static analysis
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: apostolos_1 at hotmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
It aborts during static analysis. Sorry but I can't upload the file due to
company policy.
clang++:
/Projects/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp:61:
bool evenFlexibleArraySize(clang::ASTContext &, clang::CharUnits,
clang::CharUnits, clang::QualType): Assertion `Last && "empty structs should
already be handled"' failed.
0 clang++ 0x0000000001e0cb05 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1 clang++ 0x0000000001e0d273
2 libpthread.so.0 0x00000034b8a0ef90
3 libc.so.6 0x00000034b82359e9 gsignal + 57
4 libc.so.6 0x00000034b82370f8 abort + 328
5 libc.so.6 0x00000034b822e956
6 libc.so.6 0x00000034b822ea02
7 clang++ 0x0000000000e9a834
8 clang++ 0x0000000000eca214
clang::ento::CheckerManager::runCheckersForStmt(bool,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&, clang::Stmt
const*, clang::ento::ExprEngine&, bool) + 884
9 clang++ 0x0000000000edf93d
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 4637
10 clang++ 0x0000000000edcd37
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 839
11 clang++ 0x0000000000edc93c
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
188
12 clang++ 0x0000000000ed328e
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 142
13 clang++ 0x0000000000ed2d30
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 336
14 clang++ 0x0000000000ed2691
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 545
15 clang++ 0x0000000000dbd82a
16 clang++ 0x0000000000dbcb1e
17 clang++ 0x0000000000db9bf1
18 clang++ 0x000000000098e373 clang::ParseAST(clang::Sema&, bool, bool)
+ 515
19 clang++ 0x000000000065e4d1 clang::FrontendAction::Execute() + 113
20 clang++ 0x0000000000639b1d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
21 clang++ 0x000000000061f95f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3087
22 clang++ 0x0000000000616f79 cc1_main(char const**, char const**, char
const*, void*) + 569
23 clang++ 0x000000000061d795 main + 9621
24 libc.so.6 0x00000034b8221b45 __libc_start_main + 245
25 clang++ 0x0000000000616c71
Stack dump:
0. Program arguments: /opt/clang35_1/bin/clang++ -cc1 -triple
x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name
snmp_interface.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=unix
-analyzer-checker=deadcode -analyzer-checker=cplusplus
-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 -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.52.0.1 -momit-leaf-frame-pointer -resource-dir
/opt/clang35_1/bin/../lib/clang/3.5.0 -D GTEST -D LINUX -D USE_SNMP_PP -D
NDEBUG -I /Projects/REST/rest_proto/include -I /tmp/usr/local/include -I
/Projects/REST/rest_proto/src/boards/wibas_ip/include -I
/Projects/REST/rest_proto/src/controllers -I
/Projects/REST-SDK/casablanca/Release/include -I
/Projects/REST/rest_proto/src/. -internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/x86_64-redhat-linux
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/backward
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/x86_64-redhat-linux/c++/4.8.2
-internal-isystem /usr/local/include -internal-isystem
/opt/clang35_1/bin/../lib/clang/3.5.0/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O2 -Wno-unknown-pragmas
-Wno-reorder -Wno-attributes -std=c++0x -fdeprecated-macro
-fdebug-compilation-dir /Projects/REST/rest_proto/build_analysis/src
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -analyzer-checker alpha.core.BoolAssignment -analyzer-checker
alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker
alpha.core.FixedAddr -analyzer-checker alpha.core.PointerArithm
-analyzer-checker alpha.core.PointerSub -analyzer-checker alpha.core.SizeofPtr
-analyzer-checker alpha.cplusplus.NewDeleteLeaks -analyzer-checker
alpha.cplusplus.VirtualCall -analyzer-checker alpha.deadcode.UnreachableCode
-analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker
alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange
-analyzer-checker alpha.security.taint.TaintPropagation -analyzer-checker
alpha.unix.Chroot -analyzer-checker alpha.unix.MallocWithAnnotations
-analyzer-checker alpha.unix.PthreadLock -analyzer-checker
alpha.unix.SimpleStream -analyzer-checker alpha.unix.Stream -analyzer-checker
alpha.unix.cstring.BufferOverlap -analyzer-checker
alpha.unix.cstring.NotNullTerminated -analyzer-checker
alpha.unix.cstring.OutOfBounds -analyzer-output=html -o
/tmp/scan-build-2014-03-31-124858-4118-1 -x c++
/Projects/REST/rest_proto/src/snmp/snmp_interface.cpp
1. <eof> parser at end of file
2. While analyzing stack:
#0 pointer allocate(size_type __n, const void *)
#1 pointer _M_allocate(size_t __n)
#2 void _M_emplace_back_aux(const std::vector<Snmp_pp::Vb,
std::allocator<Snmp_pp::Vb> > &&__args)
#3 void push_back(const value_type &__x)
#4 void send_walktable_request(const Snmp_pp::Oid &oid_table, const
OidVector &oid_list, std::vector<VbVector> &vb_reply_list,
boost::system::error_code &ec)
3.
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/ext/new_allocator.h:104:9:
Error evaluating statement
4.
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/ext/new_allocator.h:104:9:
Error evaluating statement
In file included from /Projects/REST/rest_proto/src/net/connection_impl.cpp:1:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/iostream:39:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/ostream:38:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/ios:40:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/bits/char_traits.h:39:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/bits/stl_algobase.h:66:
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/bits/stl_iterator_base_funcs.h:156:11:
warning: Casting a non-structure type to a structure type and accessing a field
can lead to memory access errors or data corruption
__i += __n;
^~
--
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/20140403/b780bcdf/attachment.html>
More information about the llvm-bugs
mailing list