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

Re: PointsToAnalysis



This was a bug that I fixed in revision 1120 on July 14th. This was after
2.0.1 was released, and we haven't done any releases since then, so the
fix is not in any released version. I'm attaching the patch for the fix
(I sent the same patch on this mailing list on July 14th).

Ondrej


On Thu, Oct 02, 2003 at 04:41:14PM +1000, Phung Hua Nguyen wrote:
> Hi all,
> I tried PointsToAnalysis by viewing PointsToSet of all local variables of
> the following code:
> 
> A[][] x = new A[2][1];
> x[0][0] = new A();
> x[1][0] = new A();
> A t = x[0][0];
> 
> and found out that the PointsToSet of t is null. If I tried with
> one-dimension array the result is right.
> 
> Is there anyone who checked this? Or it is my fault?
> 
> Cheers,
> 
> Phung
Index: src/soot/jimple/spark/builder/StandardParms.java
===================================================================
--- src/soot/jimple/spark/builder/StandardParms.java    (revision 1120)
+++ src/soot/jimple/spark/builder/StandardParms.java    (working copy)
@@ -363,6 +363,7 @@
         AllocNode prevAn = pag.makeAllocNode(
             new Pair( nmae, new Integer( type.numDimensions ) ), type, currentMethod );
         VarNode prevVn = pag.makeVarNode( prevAn, prevAn.getType(), currentMethod );
+        addEdge( prevAn, prevVn );
         setResult( prevAn );
         while( true ) {
             Type t = type.getElementType();