[Soot-list] ClassCastException during OnTheFlyCallGraph-Creation

Tillmann Runkel tirunkel at informatik.uni-bremen.de
Thu Oct 6 12:01:07 EDT 2011


Hi,

i tried to perform a CHA-Transformation (Input:java-src, jimple-creation 
okay, Call-Graph construction seems to be okay) and got a 
ClassCastException at

soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.getImplicitTargets(SootMethod) 
| line 579
(java.lang.ClassCastException: soot.baf.internal.BIdentityInst cannot be 
cast to soot.jimple.Stmt).

The problematic Method is (java-src):

     public AccountTO getSelectedAccount() {
         return selectedAccount;
     }

with the active Body (Body b = source.retrieveActiveBody();):

public br.org.flowstore.entity.AccountTO getSelectedAccount()
     {
         word r0;

         r0 := @this: br.org.flowstore.service.AccountService;

      label0:
         load.r r0;

      label1:
         fieldget <br.org.flowstore.service.AccountService: 
br.org.flowstore.entity.AccountTO selectedAccount>;

      label2:
         return.r;
     }

it crashed when trying to cast the "r0 := @this: 
br.org.flowstore.service.AccountService;"-Statement with Exception above.

     private void findReceivers(SootMethod m, Body b) {
         for( Iterator sIt = b.getUnits().iterator(); sIt.hasNext(); ) {
             final Stmt s = (Stmt) sIt.next(); // <--- 
java.lang.ClassCastException: soot.baf.internal.BIdentityInst cannot be 
cast to soot.jimple.Stmt

Anyone any ideas?

Thanks in advance.

Tillmann



More information about the Soot-list mailing list