Skip to content

Commit ad7920f

Browse files
committed
fixed OOM handling
1 parent 8ee726a commit ad7920f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

soot-infoflow/src/soot/jimple/infoflow/data/pathBuilders/BatchPathBuilder.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,23 @@ public void computeTaintPaths(Set<AbstractionAtSink> res) {
7979
logger.error("Could not wait for executor termination", e);
8080

8181
if (SolverTerminationReasons.isMemoryRelatedTermination(innerBuilder.getTerminationReason())) {
82-
logger.warn("Runnuing out of memory, not computing any further path batches");
82+
logger.warn("Running out of memory, not computing any further path batches");
8383
break;
8484
}
8585
}
8686
resultExecutor.reset();
8787
}
8888
logger.info("Single batch has used " + (System.nanoTime() - beforeBatch) / 1E9 + " seconds");
8989

90-
// Save the termination reason
90+
// If the analysis failed due to an OOM, it doesn't make sense to proceed with
91+
// the next batch and get into yet another OOM
9192
ISolverTerminationReason currentReason = innerBuilder.getTerminationReason();
93+
if (SolverTerminationReasons.isMemoryRelatedTermination(currentReason)) {
94+
logger.warn("Running out of memory, not computing any further path batches");
95+
break;
96+
}
97+
98+
// Save the termination reason
9299
if (this.terminationReason == null)
93100
this.terminationReason = currentReason;
94101
else

0 commit comments

Comments
 (0)