[Soot-list] Issue with trap generation in Jimple

Eric Bodden eric.bodden at ec-spride.de
Wed Jun 13 05:11:21 EDT 2012


Hello.

>
> A couple of questions to see if I understand things correctly...
>
> 1) Can the return statement throw an exception? If it can then will u still
> need to insert an exceptional edge from the assignment to the handler?

It does not matter whether it can, because it's outside the trap. The
trap ends at label5.

> 2) What happens if an un-related field store is inserted between the
> assignment and the return, like $r1.f = $r2. I.e so you have...
>
> $u0 = 1
> $r1.f = $r2
> return $u;

Same as before. It will be outside the trap.

The issue is really the execution of "$u0 = 1". It will have *no*
effect if it throws an exception, and hence the CFG edge should go
from *before* the statement to the handler, I believe.

Eric


More information about the Soot-list mailing list