[Soot-list] FlowDroid: patching of class Thread

Denis Bogdanas denis.bogdanas at gmail.com
Tue Mar 29 13:57:22 EDT 2016


Reading patched classes behavior is very hard, and I guess tedious and
error-prone to write as well. Is it possible to:

- Instruct Soot not to load a particular class?
- Write a class in Jimple format and load it?

thanks,
Denis


On 29 March 2016 at 01:27, Steven Arzt <Steven.Arzt at cased.de> wrote:

> Hi Denis,
>
>
>
> This code is implemented in a very defensive way. We might already have a
> class java.lang.Thread in our Soot scene. In that case, we only want to
> extend that class to provide the minimum functionality we need. Since we
> cannot make any assumptions on how a private field is named in the various
> implementations of the JDK (Oracle, OpenJDK, Android, etc.), we just take a
> name that’s still free and use that to implement the behavior we want.
>
>
>
> Best regards,
>
>   Steven
>
>
>
> *Von:* soot-list-bounces at CS.McGill.CA [mailto:
> soot-list-bounces at CS.McGill.CA] *Im Auftrag von *Denis Bogdanas
> *Gesendet:* Sonntag, 27. März 2016 23:58
> *An:* soot-list at cs.mcgill.ca; Steven Arzt
> *Betreff:* [Soot-list] FlowDroid: patching of class Thread
>
>
>
> Hi Steven,
>
> In LibraryCalssPatcher.patchThreadImplementation() you have the following
> code:
>
> SootClass sc = Scene.*v*().getSootClassUnsafe(*"java.lang.Thread"*);
>
> ...
>
> *while *((fldTarget = sc.getFieldByNameUnsafe(*"target" *+ fieldIdx)) != *null*)
>    fieldIdx++;
> fldTarget = *new *SootField(*"target" *+ fieldIdx, runnable.getType());
>
>
>
> Here you create a field with name "thread+<some number>" inside Thread.
> Why don't you name it simply "thread", as it is in JDK?
>
> thanks,
>
> --
>
> Denis
>



-- 
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160329/ab5c3aeb/attachment.html 


More information about the Soot-list mailing list