bug fixes: if an out-of-context edge in callee has no matching desitination, obviousl...
authorjjenista <jjenista>
Mon, 22 Mar 2010 18:23:44 +0000 (18:23 +0000)
committerjjenista <jjenista>
Mon, 22 Mar 2010 18:23:44 +0000 (18:23 +0000)
Robust/src/Analysis/Disjoint/HeapRegionNode.java
Robust/src/Analysis/Disjoint/ReachGraph.java

index ec60aaafc0ec20f009d05bdb116c5c641981fd2a..7ca1fdd2994331d24dffa73e18af073251f2db1a 100644 (file)
@@ -3,6 +3,7 @@ package Analysis.Disjoint;
 import IR.*;
 import IR.Flat.*;
 import java.util.*;
+import java.io.*;
 
 public class HeapRegionNode extends RefSrcNode {
 
index 0b981bce7fe1892017ed8f64bcbe7d6d879a3c85..acb7e8fd32e8c9688e1a6796de6a703834c49d84 100644 (file)
@@ -792,9 +792,6 @@ public class ReachGraph {
       }
 
       String strDesc = as.toStringForDOT()+"\\nsummary";
-      if( shadow ) {
-        strDesc += " shadow";
-      }
 
       hrnSummary = 
         createNewHeapRegionNode( idSummary,    // id or null to generate a new one 
@@ -840,9 +837,6 @@ public class ReachGraph {
       }
 
       String strDesc = as.toStringForDOT()+"\\n"+i+" oldest";
-      if( shadow ) {
-        strDesc += " shadow";
-      }
 
       hrnIth = createNewHeapRegionNode( idIth,        // id or null to generate a new one 
                                         true,        // single object?                  
@@ -2034,9 +2028,15 @@ public class ReachGraph {
         if( hrnSrcCallee.isOutOfContext() ) {          
 
           assert !calleeEdges2oocCallerSrcMatches.containsKey( reCallee );
+
           Set<RefSrcNode> rsnCallers = new HashSet<RefSrcNode>();            
 
+          // is the target node in the caller?
           HeapRegionNode hrnDstCaller = this.id2hrn.get( hrnCallee.getID() );
+          if( hrnDstCaller == null ) {
+            continue;
+          }
+
           Iterator<RefEdge> reDstItr = hrnDstCaller.iteratorToReferencers();
           while( reDstItr.hasNext() ) {
             // the edge and field (either possibly null) must match
@@ -3540,7 +3540,6 @@ public class ReachGraph {
     
     return true;
   }
-  
 
   protected boolean areVariableNodesEqual( ReachGraph rg ) {