[LLVMbugs] [Bug 1537] NEW: Suspicious code in Dominators.h

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jul 3 17:59:28 PDT 2007


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

           Summary: Suspicious code in Dominators.h
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Global Analyses
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: zhiruz at gmail.com
                CC: dpatel at apple.com


DominatorTreeBase::getIDomBlock

00152   /// getIDomBlock - return basic block BB's immediate dominator basic 
block.
00153   ///
00154   BasicBlock *getIDomBlock(BasicBlock *BB) {
00155     DomTreeNode *N = getNode(BB);
00156     assert (N && "Missing dominator tree node");
00157     DomTreeNode *I = N->getIDom();
00158     assert (N && "Missing immediate dominator");
00159     return I->getBlock();
00160   }

Line 158: seems that 'I' should be asserted instead of 'N'. But what if 'N' is 
the root?



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list