[Soot-list] Instrumenting exceptional edges in CFG

Bodden, Eric eric.bodden at sit.fraunhofer.de
Sun Feb 2 08:12:55 EST 2014


Hi Nate.


> Unfortunately, doing so causes bytecode generation to fail, as negative 
> stack height is attained while generating Jasmin:

When Jasmin is having trouble this is in almost 100% of the cases an indication that the Jimple code from which the Jasmin is generated is already ill-formed. In your case I am pretty sure that Soot expects that the first non-nop statement within a trap is an identity statement of the form e := @caughtexception. In your case this invariant no longer holds. Would it be possible to transform the code such that it does not break that invariant?

Note that this is not a Soot problem. In Java, within the catch block the exception _will_ be lying on the stack and hence has to be popped off the stack. That's why the identity statement is required.

Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140202/9668775e/attachment.bin 


More information about the Soot-list mailing list