Skip to content

Commit 0cbb74b

Browse files
committed
Merge branch 'develop' of github.com:secure-software-engineering/FlowDroid into develop
2 parents 8dfa211 + ed319ee commit 0cbb74b

15 files changed

Lines changed: 128 additions & 63 deletions

File tree

soot-infoflow-android/test/soot/jimple/infoflow/android/test/otherAPKs/OtherAPKTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.IOException;
44

55
import org.junit.Assert;
6+
import org.junit.Ignore;
67
import org.junit.Test;
78
import org.xmlpull.v1.XmlPullParserException;
89

@@ -18,6 +19,7 @@ public void runTest1() throws IOException, XmlPullParserException {
1819
Assert.assertTrue(res.size() > 0);
1920
}
2021

22+
@Ignore("APK file missing")
2123
@Test
2224
public void runTest2() throws IOException, XmlPullParserException {
2325
InfoflowResults res = analyzeAPKFile

soot-infoflow-summaries/src/soot/jimple/infoflow/methodSummary/data/provider/LazySummaryProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.List;
1010
import java.util.Set;
1111

12+
import soot.jimple.infoflow.collect.ConcurrentHashSet;
1213
import soot.jimple.infoflow.methodSummary.data.summary.ClassMethodSummaries;
1314
import soot.jimple.infoflow.methodSummary.data.summary.ClassSummaries;
1415

@@ -20,7 +21,7 @@ public class LazySummaryProvider extends XMLSummaryProvider {
2021

2122
protected Set<File> files = new HashSet<>();
2223
protected Set<Path> pathes = new HashSet<>();
23-
protected Set<String> loadableClasses = new HashSet<String>();
24+
protected Set<String> loadableClasses = new ConcurrentHashSet<>();
2425

2526
/**
2627
* Loads a summary from a folder within the StubDroid jar file.

soot-infoflow-summaries/src/soot/jimple/infoflow/methodSummary/postProcessor/SummaryPathBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected Runnable getTaintPathTask(AbstractionAtSink abs) {
254254
}
255255

256256
@Override
257-
protected void onTaintPathsComputed() {
257+
protected void cleanupExecutor() {
258258
// Don't shut down the executor, because we reset it and run several iterations
259259
// on the same path builder.
260260
}

soot-infoflow-summaries/test/soot/jimple/infoflow/test/methodSummary/junit/JUnitTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.Before;
2424
import org.junit.BeforeClass;
2525

26+
import soot.jimple.infoflow.AbstractInfoflow;
2627
import soot.jimple.infoflow.IInfoflow;
2728
import soot.jimple.infoflow.Infoflow;
2829
import soot.jimple.infoflow.config.ConfigForTest;
@@ -152,13 +153,14 @@ protected void negativeCheckInfoflow(IInfoflow infoflow) {
152153
}
153154
}
154155

156+
protected abstract AbstractInfoflow createInfoflowInstance();
157+
155158
protected IInfoflow initInfoflow() {
156159
return initInfoflow(false);
157160
}
158161

159162
protected IInfoflow initInfoflow(boolean useTaintWrapper) {
160-
// IInfoflow result = new BackwardsInfoflow();
161-
Infoflow result = new Infoflow();
163+
IInfoflow result = createInfoflowInstance();
162164
ConfigForTest testConfig = new ConfigForTest();
163165
result.setSootConfig(testConfig);
164166
if (useTaintWrapper) {

soot-infoflow-summaries/test/soot/jimple/infoflow/test/methodSummary/junit/SummaryTaintWrapperTests.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
import org.junit.Ignore;
2424
import org.junit.Test;
2525

26-
import soot.jimple.infoflow.BackwardsInfoflow;
27-
import soot.jimple.infoflow.IInfoflow;
28-
import soot.jimple.infoflow.InfoflowConfiguration;
26+
import soot.jimple.infoflow.*;
2927
import soot.jimple.infoflow.config.IInfoflowConfig;
3028
import soot.jimple.infoflow.entryPointCreators.DefaultEntryPointCreator;
3129
import soot.jimple.infoflow.methodSummary.data.provider.EagerSummaryProvider;
@@ -34,7 +32,7 @@
3432
import soot.jimple.infoflow.taintWrappers.ITaintPropagationWrapper;
3533
import soot.options.Options;
3634

37-
public class SummaryTaintWrapperTests {
35+
public abstract class SummaryTaintWrapperTests {
3836
private static String appPath, libPath;
3937

4038
private String[] source = new String[] {
@@ -262,9 +260,10 @@ private void checkInfoflow(IInfoflow infoflow, int resultCount) {
262260
}
263261
}
264262

263+
protected abstract AbstractInfoflow createInfoflowInstance();
264+
265265
protected IInfoflow initInfoflow() throws FileNotFoundException, XMLStreamException {
266-
IInfoflow result = new BackwardsInfoflow();
267-
// Infoflow result = new Infoflow();
266+
IInfoflow result = createInfoflowInstance();
268267
result.getConfig().getAccessPathConfiguration().setUseRecursiveAccessPaths(false);
269268
IInfoflowConfig testConfig = new IInfoflowConfig() {
270269

soot-infoflow-summaries/test/soot/jimple/infoflow/test/methodSummary/junit/WrapperListTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
import soot.jimple.infoflow.methodSummary.taintWrappers.TaintWrapperFactory;
1515
import soot.jimple.infoflow.taintWrappers.ITaintPropagationWrapper;
1616

17-
public class WrapperListTests extends JUnitTests {
17+
public abstract class WrapperListTests extends JUnitTests {
1818

1919
private static File files = new File("testSummaries");
2020
protected final ITaintPropagationWrapper wrapper;
2121

22-
public WrapperListTests() throws FileNotFoundException, XMLStreamException {
22+
public WrapperListTests() {
2323
wrapper = (ITaintPropagationWrapper) TaintWrapperFactory.createTaintWrapper(files);
2424
}
2525

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package soot.jimple.infoflow.test.methodSummary.junit.backward;
2+
3+
import soot.jimple.infoflow.AbstractInfoflow;
4+
import soot.jimple.infoflow.BackwardsInfoflow;
5+
6+
public class SummaryTaintWrapperTests extends soot.jimple.infoflow.test.methodSummary.junit.SummaryTaintWrapperTests {
7+
@Override
8+
protected AbstractInfoflow createInfoflowInstance() {
9+
return new BackwardsInfoflow("", false, null);
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package soot.jimple.infoflow.test.methodSummary.junit.backward;
2+
3+
import soot.jimple.infoflow.AbstractInfoflow;
4+
import soot.jimple.infoflow.BackwardsInfoflow;
5+
6+
public class WrapperListTests extends soot.jimple.infoflow.test.methodSummary.junit.WrapperListTests {
7+
@Override
8+
protected AbstractInfoflow createInfoflowInstance() {
9+
return new BackwardsInfoflow("", false, null);
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package soot.jimple.infoflow.test.methodSummary.junit.forward;
2+
3+
import soot.jimple.infoflow.AbstractInfoflow;
4+
import soot.jimple.infoflow.Infoflow;
5+
6+
public class SummaryTaintWrapperTests extends soot.jimple.infoflow.test.methodSummary.junit.SummaryTaintWrapperTests {
7+
@Override
8+
protected AbstractInfoflow createInfoflowInstance() {
9+
return new Infoflow("", false, null);
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package soot.jimple.infoflow.test.methodSummary.junit.forward;
2+
3+
import soot.jimple.infoflow.AbstractInfoflow;
4+
import soot.jimple.infoflow.Infoflow;
5+
6+
public class WrapperListTests extends soot.jimple.infoflow.test.methodSummary.junit.WrapperListTests {
7+
@Override
8+
protected AbstractInfoflow createInfoflowInstance() {
9+
return new Infoflow("", false, null);
10+
}
11+
}

0 commit comments

Comments
 (0)