arguslab/Argus-SAF

Error in building InterProceduralSuperSpark

Closed this issue · 3 comments

After upgrading to 3.1.2 I found that InterProceduralSuperSpark APIs changed a lot. I edited my code accordingly but got the following exception while building InterProceduralSuperSpark. Tested with several different APKs.

java.util.NoSuchElementException: key not found: PtaNode(PointArgReturn(v0,0,L110528,5,xxxxxxx;.onStartJob:(Landroid/app/job/JobParameters;)Z),(JobSchedulerService.onStartJob,L110528)(JobSchedulerService.onStartJob,L110528))
at scala.collection.MapLike.default(MapLike.scala:232)
at scala.collection.MapLike.default$(MapLike.scala:231)
at scala.collection.AbstractMap.default(Map.scala:59)
at scala.collection.MapLike.apply(MapLike.scala:141)
at scala.collection.MapLike.apply$(MapLike.scala:140)
at scala.collection.AbstractMap.apply(Map.scala:59)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.getNode(PointerAssignmentGraph.scala:504)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$3(PointerAssignmentGraph.scala:352)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$3$adapted(PointerAssignmentGraph.scala:346)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$2(PointerAssignmentGraph.scala:346)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$2$adapted(PointerAssignmentGraph.scala:337)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$1(PointerAssignmentGraph.scala:337)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$1$adapted(PointerAssignmentGraph.scala:335)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.buildingEdges(PointerAssignmentGraph.scala:335)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$constructGraph$2(PointerAssignmentGraph.scala:201)
at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.constructGraph(PointerAssignmentGraph.scala:197)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.doPTA(InterProceduralSuperSpark.scala:56)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.$anonfun$pta$1(InterProceduralSuperSpark.scala:47)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.$anonfun$pta$1$adapted(InterProceduralSuperSpark.scala:42)
at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.pta(InterProceduralSuperSpark.scala:42)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.build(InterProceduralSuperSpark.scala:37)
fgwei commented

Could you give me one apk to reproduce this bug?

I'm having the same problem, using Java, when i call the 'build' function. I post my output:

Exception in thread "main" java.util.NoSuchElementException: key not found: PtaNode(PointParamExit(v2,android.os.Bundle,0,Llopi/it/lopitestapp/MainActivity;.onCreate:(Landroid/os/Bundle;)V),(MainActivity.onCreate,onCreate)(MainActivity.onCreate,onCreate))

at scala.collection.MapLike.default(MapLike.scala:232)
at scala.collection.MapLike.default$(MapLike.scala:231)
at scala.collection.AbstractMap.default(Map.scala:59)
at scala.collection.MapLike.apply(MapLike.scala:141)
at scala.collection.MapLike.apply$(MapLike.scala:140)
at scala.collection.AbstractMap.apply(Map.scala:59)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.getNode(PointerAssignmentGraph.scala:504)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$3(PointerAssignmentGraph.scala:352)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$3$adapted(PointerAssignmentGraph.scala:346)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$2(PointerAssignmentGraph.scala:346)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$2$adapted(PointerAssignmentGraph.scala:337)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$1(PointerAssignmentGraph.scala:337)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$buildingEdges$1$adapted(PointerAssignmentGraph.scala:335)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.buildingEdges(PointerAssignmentGraph.scala:335)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.$anonfun$constructGraph$2(PointerAssignmentGraph.scala:201)
at scala.collection.immutable.Set$Set3.foreach(Set.scala:167)
at org.argus.jawa.alir.pta.suspark.PointerAssignmentGraph.constructGraph(PointerAssignmentGraph.scala:197)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.doPTA(InterProceduralSuperSpark.scala:56)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.$anonfun$pta$1(InterProceduralSuperSpark.scala:47)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.$anonfun$pta$1$adapted(InterProceduralSuperSpark.scala:42)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:95)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.pta(InterProceduralSuperSpark.scala:42)
at org.argus.jawa.alir.pta.suspark.InterProceduralSuperSpark.build(InterProceduralSuperSpark.scala:37)
at Main.main(Main.java:156)