[Soot-list] Inconsitency in ReflectiveCallsInliner
Christophe Foket
christophe.foket at elis.ugent.be
Wed Apr 11 12:33:01 EDT 2012
Hello,
It seems that there is an inconsistency in ReflectiveCallsInliner when
handling reflective calls of type Method.invoke. For Method.invoke
calls, createNewMethod creates a new method that accepts two parameters.
However, inlineReflectiveCalls, generates calls to this method with an
argument list of size 3. This causes incorrect stack height errors,
since one of the arguments is not popped off the stack.
I'm not sure if the newly generated method should accept three
parameters, but not adding the first argument (a reference to the
Method) to the argument list (by removing line 420), seems to resolve
the issue.
418 case MethodInvoke:
419 //add Constructor argument
420 *//REMOVED: args.add((Value) ((InstanceInvokeExpr)ie).getBase());*
421 //add Object argument
422 args.add((Value) ie.getArgs().get(0));
423 //add Object[] argument
424 args.add((Value) ie.getArgs().get(1));
425 break;
Cheers,
Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120411/1f59a175/attachment.html
More information about the Soot-list
mailing list