Hi krememek,
CFGReverseBlockReachabilityAnalysis::isReachable is invoked with
CFGBlocks from different CFGs, which leads to an out of bounds access to a
BitVector. I'm not sure whether the method should be called with blocks from
different CFGs. If not, the underlying issue should be fixed and this check
replaced with an assertion.
http://llvm-reviews.chandlerc.com/D2427
Files:
lib/Analysis/CFGReachabilityAnalysis.cpp
Index: lib/Analysis/CFGReachabilityAnalysis.cpp
===================================================================
--- lib/Analysis/CFGReachabilityAnalysis.cpp
+++ lib/Analysis/CFGReachabilityAnalysis.cpp
@@ -24,6 +24,11 @@
bool CFGReverseBlockReachabilityAnalysis::isReachable(const CFGBlock *Src,
const CFGBlock *Dst) {
+ // FIXME: Should this be an assertion instead?
+ // Src and Dst must be from the same CFG in order to be reachable one from
+ // another.
+ if (Src->getParent() != Dst->getParent())
+ return false;
const unsigned DstBlockID = Dst->getBlockID();
Index: lib/Analysis/CFGReachabilityAnalysis.cpp
===================================================================
--- lib/Analysis/CFGReachabilityAnalysis.cpp
+++ lib/Analysis/CFGReachabilityAnalysis.cpp
@@ -24,6 +24,11 @@
bool CFGReverseBlockReachabilityAnalysis::isReachable(const CFGBlock *Src,
const CFGBlock *Dst) {
+ // FIXME: Should this be an assertion instead?
+ // Src and Dst must be from the same CFG in order to be reachable one from
+ // another.
+ if (Src->getParent() != Dst->getParent())
+ return false;
const unsigned DstBlockID = Dst->getBlockID();
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits