[Soot-list] Cast Error: Union to PointsToSetInternal
Saswat Anand
saswat at cc.gatech.edu
Tue Oct 26 17:36:33 EDT 2004
Hi,
I am getting a Cast Exception error at:
Exception in thread "main" java.lang.ClassCastException
at
soot.jimple.spark.sets.PointsToSetInternal.hasNonEmptyIntersection(PointsToS
etInternal.java:82)
at
soot.jimple.spark.sets.DoublePointsToSet.hasNonEmptyIntersection(DoublePoint
sToSet.java:45)
at MySideEffectTester.canWriteTo(MySideEffectTester.java:66)
The 'other' argument at line 82 happens to be instanceof Union. Isnt it
expected to pass a Union instance to this method?
My code looks like this:
public boolean canWriteTo( MethodRWSet rwSet, Object local, SootField
field )
{
if( rwSet == null ) return false;
PointsToSet o1 = pointsToSetFor( local );
if( o1 == null ) return false;
PointsToSet o2 = rwSet.getBaseForField( field );
if( o2 == null ) return false;
if( o2 instanceof Union ) System.out.println( "UNION" );
return o1.hasNonEmptyIntersection( o2 );
}
Thanks a lot.
Saswat
More information about the Soot-list
mailing list