[LLVMbugs] [Bug 13090] New: Invalid source location ICE while trying to get file characteristic
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 12 08:56:41 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13090
Bug #: 13090
Summary: Invalid source location ICE while trying to get file
characteristic
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: mrmocool at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Tried to analyze the following (automatically reduced) code:
typedef __typeof__(sizeof(int)) size_t;
# 218 "./lexer.h"
struct Token
{
void *operator new(size_t );
};
void *Token::operator new(size_t size)
{ ::operator new(size);
}
Now the crashing command:
$ clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free
-main-file-name lexer.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 -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.53.20110810
-momit-leaf-frame-pointer -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/clang/bin/../lib/clang/3.2/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -Wno-deprecated -Wstrict-aliasing
-Wuninitialized -Wno-logical-op-parentheses -ferror-limit 19 -fmessage-length
212 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -x c++
lexer-ipSZOH.ii
clang: clang/lib/Basic/SourceManager.cpp:1301: SrcMgr::CharacteristicKind
clang::SourceManager::getFileCharacteristic(clang::SourceLocation) const:
Assertion `!Loc.isInvalid() && "Can't get file characteristic of invalid loc!"'
failed.
0 clang 0x00000000019d349f
1 clang 0x00000000019d39b4
2 libpthread.so.0 0x00007f1c43ae6060
3 libc.so.6 0x00007f1c42dc63a5 gsignal + 53
4 libc.so.6 0x00007f1c42dc9b0b abort + 379
5 libc.so.6 0x00007f1c42dbed4d __assert_fail + 221
6 clang 0x000000000108ff54
clang::SourceManager::getFileCharacteristic(clang::SourceLocation) const + 148
7 clang 0x0000000000cd6111
8 clang 0x0000000000cc6938
clang::ento::ProgramState::invalidateRegionsImpl(llvm::ArrayRef<clang::ento::MemRegion
const*>, clang::Expr const*, unsigned int, clang::LocationContext const*,
llvm::DenseSet<clang::ento::SymExpr const*,
llvm::DenseMapInfo<clang::ento::SymExpr const*> >&,
clang::ento::CallOrObjCMessage const*) const + 264
9 clang 0x0000000000cc67c2
clang::ento::ProgramState::invalidateRegions(llvm::ArrayRef<clang::ento::MemRegion
const*>, clang::Expr const*, unsigned int, clang::LocationContext const*,
llvm::DenseSet<clang::ento::SymExpr const*,
llvm::DenseMapInfo<clang::ento::SymExpr const*> >*,
clang::ento::CallOrObjCMessage const*) const + 50
10 clang 0x0000000000caddb0
clang::ento::ExprEngine::invalidateArguments(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::ento::CallOrObjCMessage const&, clang::LocationContext const*) +
2016
11 clang 0x0000000000caea11
12 clang 0x0000000000c85ac8
clang::ento::CheckerManager::runCheckersForEvalCall(clang::ento::ExplodedNodeSet&,
clang::ento::ExplodedNodeSet const&, clang::CallExpr const*,
clang::ento::ExprEngine&, clang::ento::GraphExpander*) + 1272
13 clang 0x0000000000cae17f
clang::ento::ExprEngine::VisitCallExpr(clang::CallExpr const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 639
14 clang 0x0000000000c981e0
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 2144
15 clang 0x0000000000c966d1
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 929
16 clang 0x0000000000c962d4
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
372
17 clang 0x0000000000c8c5b5
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 149
18 clang 0x0000000000c8c0bc
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 524
19 clang 0x0000000000c8bb5f
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 495
20 clang 0x0000000000bba3f2
21 clang 0x0000000000bb9dbd
22 clang 0x0000000000bb63e1
23 clang 0x000000000085cfc4 clang::ParseAST(clang::Sema&, bool, bool)
+ 788
24 clang 0x000000000061f8b5 clang::FrontendAction::Execute() + 101
25 clang 0x000000000060405d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
26 clang 0x00000000005ed213
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3379
27 clang 0x00000000005e253b cc1_main(char const**, char const**, char
const*, void*) + 667
28 clang 0x00000000005e9838 main + 3496
29 libc.so.6 0x00007f1c42db130d __libc_start_main + 237
30 clang 0x00000000005e21dd
Stack dump:
0. Program arguments: clang -cc1 -triple x86_64-unknown-linux-gnu -analyze
-disable-free -main-file-name lexer.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 -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.53.20110810
-momit-leaf-frame-pointer -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/clang/bin/../lib/clang/3.2/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -Wno-deprecated -Wstrict-aliasing
-Wuninitialized -Wno-logical-op-parentheses -ferror-limit 19 -fmessage-length
212 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -x c++
lexer-ipSZOH.ii
1. <eof> parser at end of file
2. ./lexer.h:225:3: Error evaluating statement
3. ./lexer.h:225:3: Error evaluating statement
clang version 3.2 (http://llvm.org/git/clang.git
645161f7f58068ef336c651f4dfaa6a38ce48e40) (http://llvm.org/git/llvm.git
3f696e568bae8afa5986e7af48156c2bac041ba7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
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