[LLVMbugs] [Bug 15742] New: ICE in createTemporaryRegionIfNeeded()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 13 07:32:21 PDT 2013


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

            Bug ID: 15742
           Summary: ICE in createTemporaryRegionIfNeeded()
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: dimhen at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat x.ii
template < class _T1, class _T2 > struct A
{
    A (const _T1 &, const _T2 &);
};
extern "C" typedef enum
{ }
NPVariant;
typedef void *NPIdentifier;
template < class T > class B
{
protected:
    typedef A < NPIdentifier, bool (T::*) (const NPVariant *, unsigned,
                                           NPVariant *)
    >MethodMapMember;
};

class C:B < C >
{
    bool Find (const NPVariant *, unsigned, NPVariant *);
    void InitStaticData ();
};
void
C::InitStaticData ()
{
    MethodMapMember (0, &C::Find);
}


$ /home/dimhen/build/csa/Release+Asserts/bin/clang++ -cc1 -triple
x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name x.ii
-analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=cplusplus
-fcxx-exceptions -x c++ x.ii
clang++:
/home/dimhen/src/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:184:
clang::ento::ProgramStateRef
clang::ento::ExprEngine::createTemporaryRegionIfNeeded(clang::ento::ProgramStateRef,
const clang::LocationContext*, const clang::Expr*, const clang::Expr*):
Assertion `!V.getAs<Loc>() || Loc::isLocType(Result->getType())' failed.
0  clang++         0x0000000001dba142 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang++         0x0000000001db9d99
2  libpthread.so.0 0x0000003eb020f000
3  libc.so.6       0x0000003eafa35ba5 gsignal + 53
4  libc.so.6       0x0000003eafa37358 abort + 328
5  libc.so.6       0x0000003eafa2e972
6  libc.so.6       0x0000003eafa2ea22
7  clang++         0x0000000000e98b61
clang::ento::ExprEngine::createTemporaryRegionIfNeeded(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::LocationContext const*, clang::Expr const*, clang::Expr const*)
+ 961
8  clang++         0x0000000000eb07c5
clang::ento::ExprEngine::CreateCXXTemporaryObject(clang::MaterializeTemporaryExpr
const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 805
9  clang++         0x0000000000e9c9f4
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 3604
10 clang++         0x0000000000e9db78
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 712
11 clang++         0x0000000000e9de53
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
227
12 clang++         0x0000000000e84b90
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 128
13 clang++         0x0000000000e85a5c
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 92
14 clang++         0x0000000000e85e1d
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 253
15 clang++         0x0000000000d0ec70
16 clang++         0x0000000000d0f76f
17 clang++         0x0000000000d1a0c0
18 clang++         0x000000000095658a clang::ParseAST(clang::Sema&, bool, bool)
+ 538
19 clang++         0x0000000000653909 clang::FrontendAction::Execute() + 265
20 clang++         0x0000000000633d05
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
21 clang++         0x000000000061b012
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1794
22 clang++         0x00000000006129d8 cc1_main(char const**, char const**, char
const*, void*) + 888
23 clang++         0x000000000061a290 main + 4992
24 libc.so.6       0x0000003eafa21a05 __libc_start_main + 245
25 clang++         0x0000000000611999
Stack dump:
0.    Program arguments: /home/dimhen/build/csa/Release+Asserts/bin/clang++
-cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name
x.ii -analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=cplusplus
-fcxx-exceptions -x c++ x.ii 
1.    <eof> parser at end of file
2.    x.ii:25:25: Error evaluating statement
3.    x.ii:25:25: Error evaluating statement
Aborted (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/20130413/3e5d08ff/attachment.html>


More information about the llvm-bugs mailing list