[Soot-list] Instrumenting JRE classes using Soot

Sai Zhang racezhang at gmail.com
Thu Jun 3 21:35:01 EDT 2010


Hey Eric:

I tried TamiFlex to analyze some target problems, and found some issues
(posted in its wiki page).

One issue is that it seems that TamiFlex could not transform about 30
preloaded classes (in
the absence of reflection). That might be problematic if users want to
instrument the whole JDK
(you can easily get instrumenting your instrumentation code, I am afraid).
Technically, only
Object, String, Class classes could not be modified in anyway.

Btw, do you have some best practice in integrating Soot-based transformation
code with the
java instrumentation API? We have a code base of soot-based program
transformation code, but
for some reason, need to use that as load-time instrumentation code. Of
course, we could use
play-in / play-out agent of TamiFlex to do so.But I am wondering is there
any better ways, e.g.
is there any compatible API taking byte[] as input and produce byte[] as
output.

thanks

-Sai


On Sun, Apr 25, 2010 at 11:58 PM, Eric Bodden <
bodden at st.informatik.tu-darmstadt.de> wrote:

>
>
>
> Generally that is correct. Having said that, you can also use just the
> play-in agent in isolation, without doing a play-out before. Play-out
> is only necessary if you have trouble getting your hands on all the
> classes (and reflective calls, but that's a different topic) that an
> application performs. If you already have access to all those classes
> then you can just process these classes with Soot and point the
> play-in agent to Soot's output directory. When you then run the
> application, the agent will cause the application to load its classes
> from this folder instead of where it would normally load its classes
> from.
>
> In any case, for your use case (adding profiling statements) TamiFlex
> should work just fine. After all, this appears to be an offline-only
> transformation.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100603/ecfd9110/attachment.html 


More information about the Soot-list mailing list