[Soot-list] Error in soot analysis

Stefan Gommer listenbaer at gmail.com
Tue Aug 19 08:07:27 EDT 2014


Thank you Julien and Eric,

I reported this as a bug. But I have another issue. I printed the body of dummyMain as Julien suggested : 

$i0 = 0
if $i0 == 0 goto (branch)
if $i0 == 1 goto (branch)
$r0 = new android.os.Bundle
specialinvoke $r0.<android.os.Bundle: void <init>()>()
virtualinvoke $r0.<de.ecspride.MainActivity: void onCreate(android.os.Bundle)>($r0)
$r0 = null
if $i0 == 4 goto $r0 = new android.os.Bundle
if $i0 == 5 goto (branch)
if $i0 == 6 goto $r0 = new android.os.Bundle
if $i0 == 7 goto (branch)
if $i0 == 8 goto (branch)
if $i0 == 9 goto (branch)
return

As you can see, there are two invokes but it seems there are no outgoing edges from the dummyMainMethod:

Iterator<MethodOrMethodContext> ctargets = new Targets(cg.edgesOutOf(k));
while (ctargets.hasNext()) {  // <— hasNext() returns false
…

Shouldn’t I be able to reach at least <android.os.Bundle: void <init> and <de.ecspride.MainActivity: void onCreate(..) ?

Stefan

Am 19.08.2014 um 13:25 schrieb Bodden, Eric <eric.bodden at sit.fraunhofer.de>:

> Hi all.
> 
> To me this looks like a bug in the main-method generator. Can you please report it as a bug?
> 
> https://github.com/Sable/soot/wiki/Reporting-bugs
> 
> Cheers,
> Eric
> 
> On 19.08.2014, at 10:23, Stefan Gommer <listenbaer at gmail.com> wrote:
> 
>> Hello,
>> 
>> I’m doing two analysis on a android apk. First I’m running a flowdroid analysis to use the results given in the InfoflowResults object. Then I wanted to do a soot analysis to inspect the call graph. During the second analysis I’m getting this error
>> 
>> Exception in thread "main" java.lang.RuntimeException: Local not in chain : $r0 in <dummyMainClass: void dummyMainMethod()>
>> 	at soot.Body.validateLocal(Body.java:279)
>> 	at soot.Body.validateLocals(Body.java:267)
>> 	at soot.Body.validate(Body.java:231)
>> 	at soot.jimple.JimpleBody.validate(JimpleBody.java:71)
>> 	at soot.baf.BafBody.<init>(BafBody.java:66)
>> 	at soot.baf.Baf.newBody(Baf.java:560)
>> 	at soot.PackManager.convertJimpleBodyToBaf(PackManager.java:956)
>> 	at soot.PackManager.runBodyPacks(PackManager.java:916)
>> 	at soot.PackManager.runBodyPacks(PackManager.java:584)
>> 	at soot.PackManager.runBodyPacks(PackManager.java:487)
>> 	at soot.PackManager.runPacksNormally(PackManager.java:464)
>> 	at soot.PackManager.runPacks(PackManager.java:388)
>> 	at FlowDroidTest.main(FlowDroidTest.java:87)
>> 
>> I don’t know what this means, can you help me?
>> 
>> Thanks,
>> Stefan
>> 
>> Info: 
>> android.os.Bundle $r0;
>> $r0 = new android.os.Bundle;
>> specialinvoke $r0.<android.os.Bundle: void <init>()>();
>> virtualinvoke $r0.<de.ecspride.MainActivity: void onCreate(android.os.Bundle)>($r0);
>> $r0 = null;
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at CS.McGill.CA
>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> 
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140819/0c15321b/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140819/0c15321b/attachment-0001.bin 


More information about the Soot-list mailing list