[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Soot bugs when first Unit is a target



Venkatesh Prasad Ranganath wrote:
> In short, it would be "right" to pick the block containing the first 
> statement of the method as the "head" node, but this need not always be 
> "right".

Not sure exactly what you're saying.. but I did try the patch represented
below (which may or may not make sense) and it didn't seem to help.

For what it's worth...

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


diff -ur src.orig/soot/jimple/toolkits/annotation/arraycheck/ArrayBoundsCheckerAnalysis.java src/soot/jimple/toolkits/annotation/arraycheck/ArrayBoundsCheckerAnalysis.java
--- src.orig/soot/jimple/toolkits/annotation/arraycheck/ArrayBoundsCheckerAnalysis.java	Tue Jun  3 07:12:25 2003
+++ src/soot/jimple/toolkits/annotation/arraycheck/ArrayBoundsCheckerAnalysis.java	Thu Jul 15 17:59:10 2004
@@ -363,6 +363,22 @@
                 
                 edgeMap.put(edge, new WeightedDirectedSparseGraph(livelocals, false));
             }
+
+/** this doesn't seem to help
+
+	    Iterator headIt = graph.getHeads().iterator();
+	    while (headIt.hasNext())
+	    {
+                Block block = (Block)headIt.next();
+                FlowGraphEdge edge = new FlowGraphEdge(block, block);
+		if (!edgeMap.containsKey(edge))
+		{
+		    HashSet livelocals = (HashSet)ailanalysis.getFlowBefore(block.getHead());
+                
+		    edgeMap.put(edge, new WeightedDirectedSparseGraph(livelocals, false));
+		}
+	    }
+**/
         }
 
         /* perform customized initialization. */