[Soot-list] Ignore my previous question (args pointcut not working with around advice)

Dean, John John.Dean at park.edu
Thu Dec 27 19:55:11 EST 2012


All,
There's overlap, but I think my question below should have been addressed to the abc user's group, not the soot group.
I will resend it to the abc user's group.
Sorry for the bother.

John

-----Original Message-----
From: soot-list-bounces at sable.mcgill.ca [mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of Dean, John
Sent: Thursday, December 27, 2012 6:19 PM
To: soot-list at sable.mcgill.ca
Subject: [Soot-list] args pointcut not working with around advice (but it IS working with after and before advice)

All,

I am trying to get an args pointcut  to work. I've finally gotten it to work with after and before advice, but it's not working with around advice. With around advice, when I run my test advice, I get this error message: 

     [java] Exception in thread "main" polyglot.util.InternalCompilerError: unhandled exception during weaving/optimisation
     ...
     [java] Caused by: java.lang.InternalError: Expecting bound values to be of type Local: 6 (came from: bind(jimplevalue(6),advicearg(0:int)))

Here is my test advice:

transcut tc()
{		
  pointcut loop: loopPar();
}

void around(int min, int max, int step): tc() && args(min, max, step) {
  System.out.println("\nmin = " + min + ", max = " + max + ", step = " + step); }

The transcut pointcut is an extension pointcut that does work when (1) there is no args pointcut or (2) when there is an args pointcut, but before or after are used instead of around.

Here is my getArgsContextValues method that appears within my RegionShadowMatch class. I've stripped it down in order to isolate the problem.

public List getArgsContextValues()
{
  ArrayList ret = new ArrayList();
  // ret.add(new JimpleValue((Local) IntConstant.v(5))); // error - IntConstant cannot cast to Soot.Local
  ret.add(new JimpleValue((Immediate) IntConstant.v(6)));
  ret.add(new JimpleValue((Immediate) IntConstant.v(7)));
  ret.add(new JimpleValue((Immediate) IntConstant.v(8)));
  return ret;
}

You can see in my commented-out line that my attempt to use the Local interface instead of the Immediate interface did not work.
You can see the 6 value, which is mentioned in the error message near the top of this email.

I've looked through the soot API, but I can't find anything that looks promising. For example, the JimpleLocal class has a rather odd constructor with 2 parameters - one for name and one for type.

Any suggestions?

Thanks,
John
_______________________________________________
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