[Soot-list] Inconsitency in ReflectiveCallsInliner
Eric Bodden
eric.bodden at ec-spride.de
Thu Apr 12 03:28:09 EDT 2012
Hi Christophe.
Thanks. I think the fix is correct. I have committed it in revision 3711.
Eric
On 11 April 2012 18:33, Christophe Foket <christophe.foket at elis.ugent.be> wrote:
> 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
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
--
Eric Bodden, Ph.D., http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Principal Investigator in Secure Services at CASED
Tel: +49 6151 16-75422 Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
More information about the Soot-list
mailing list