Skip to content

Commit

Permalink
Merge pull request #2086 from MarcMil/develop
Browse files Browse the repository at this point in the history
Do not cache soot objects in a static variable
  • Loading branch information
StevenArzt authored Jun 7, 2024
2 parents 944263d + 7d47e52 commit d4061dc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ClinitElimAnalysis extends ForwardFlowAnalysis<Unit, FlowSet<SootMe
private final CallGraph cg = Scene.v().getCallGraph();
private final UnitGraph g;

private static FlowSet<SootMethod> cachedFlowSet = null;
private FlowSet<SootMethod> cachedFlowSet = null;

public ClinitElimAnalysis(UnitGraph g) {
super(g);
Expand Down Expand Up @@ -88,6 +88,7 @@ protected FlowSet<SootMethod> newInitialFlow() {
cachedFlowSet.copy(returnedFlowSet);
return returnedFlowSet;
}

protected FlowSet<SootMethod> calculateInitialFlow() {
HashSparseSet<SootMethod> newFlowSet = new HashSparseSet<>();
for (Iterator<Edge> mIt = cg.edgesOutOf(g.getBody().getMethod()); mIt.hasNext();) {
Expand Down

0 comments on commit d4061dc

Please sign in to comment.