diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-18 16:30:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-18 16:30:14 +0000 |
commit | 4f28515992dfd851ce482803d8f3174d667e7cdb (patch) | |
tree | 840861ccd4d99e74e8472c962fdec47c053bfbb0 | |
parent | 684bb097fbb51fe4e8852925d93d6fd2adec31c7 (diff) |
Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49907 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/GRCoreEngine.cpp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 1c2f20aa3b..1618f04359 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -1065,6 +1065,10 @@ void CFRefCount::EvalEndPath(GRExprEngine& Eng, } ExplodedNode<ValueState>* N = Builder.MakeNode(St); + + if (!N) + return; + std::vector<SymbolID>*& LeaksAtNode = Leaks[N]; assert (!LeaksAtNode); LeaksAtNode = new std::vector<SymbolID>(); diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp index ffb2fd2feb..7ad7f73abf 100644 --- a/lib/Analysis/GRCoreEngine.cpp +++ b/lib/Analysis/GRCoreEngine.cpp @@ -456,7 +456,8 @@ ExplodedNodeImpl* GREndPathNodeBuilderImpl::generateNodeImpl(void* State) { if (IsNew) { Node->markAsSink(); Eng.G->addEndOfPath(Node); + return Node; } - return Node; + return NULL; } |