[Soot-list] ClassCastException during OnTheFlyCallGraph-Creation

Tillmann tirunkel at informatik.uni-bremen.de
Fri Oct 7 06:22:34 EDT 2011


Hi Eric,

i doesn't run soot from command-line. Here is my Soot-Setup for the 
discussed problem:

...
     Options.v().set_whole_program(true);

     Options.v().setPhaseOption("jap.npcolorer", "enabled:true");
     Options.v().setPhaseOption("jap", "enabled:true");
     Options.v().setPhaseOption("jap.npc", "enabled:true");

     Options.v().set_src_prec(Options.src_prec_java);// java
     Options.v().set_keep_line_number(true);
     Options.v().set_xml_attributes(true);
     Options.v().set_output_dir(projConf.getOutputDir());

     Options.v().setPhaseOption("cg", "verbose:true");

     Options.v().set_soot_classpath(projConf.getClasspath());

     Scene.v().loadNecessaryClasses();

     System.out.println("running packs...");
     PackManager.v().runPacks();

     CHATransformer.v().transform();
...

Tillmann

Am 07.10.2011 08:55, schrieb Eric Bodden:
> Hi Tillmann.
>
> For some reason the method seems not to have been converted to Jimple
> but is stuck at the lower IR (Baf). What's your exact command line?
>
> Eric
>
> On 6 October 2011 18:01, Tillmann Runkel
> <tirunkel at informatik.uni-bremen.de>  wrote:
>> 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
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>



More information about the Soot-list mailing list