[Soot-list] FlowDroid: patching of class Thread

Steven Arzt Steven.Arzt at cased.de
Tue Mar 29 04:27:19 EDT 2016


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

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


More information about the Soot-list mailing list