[Soot-list] Instrumentation problem for GOTO instructions

Eric Bodden eric.bodden at ec-spride.de
Sat Mar 24 06:14:27 EDT 2012


Hi Joe.

Sorry but what exactly do you mean by "hooking"?

Cheers,
Eric

On 24 March 2012 09:52, Joe <owqian at gmail.com> wrote:
> Hi All,
>
>        I find a strange problem when hooking soot.coffi.CFG.generateJimple
> method.
> The method is very large. After hooking, the goto instructions become
> invalid. It seems
> that the jump offsets overflow the short  integer type.
>       (The hooked method is still less than 64k bytes. No more than the
> maximum JVM method size. )
>
>         package jas;
>         public class Label extends Insn implements RuntimeConstants
>         {
>               void writeOffset(CodeAttr ce, Insn source, DataOutputStream
> out)
>                            throws jasError, IOException
>              {                             // write the offset (as a short)
>                                 // of source
>                      int pc, tpc;
>                     pc = ce.getPc(this);                   // pc = 51250
>                     if (source == null)
>                           tpc = 0;
>                     else
>                           tpc = ce.getPc(source);        // tpc = 2053
>                     short offset = (short) (pc - tpc);   // overflow here
>                     out.writeShort(offset);
>           }
>
>          Now, I'm searching for ways to fix this problem. Can Soot
> automatically change
>  the goto instructions into goto_w instructions?
>
>
> Joe
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> 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