diff options
author | Adrian Herrera <adrian.herrera02@gmail.com> | 2020-04-14 13:27:29 +1000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-06-24 22:13:15 +0100 |
commit | e4a2ca614279c8b6febe35edf169eb38c0d85178 (patch) | |
tree | 1dfcbca0d875b89ee5c302dbef3b1fdbc92651ce | |
parent | ecdddd94fdad39fcb17fe256715cf4cc9bacbfb9 (diff) | |
download | klee-e4a2ca614279c8b6febe35edf169eb38c0d85178.tar.gz |
StatsTracker: initialize indexed stats when user searcher requires MD2U
This is the same check used in Executor::setModule. Without this check, KLEE will segfault in StatisticsManager::incrementIndexedValue, getIndexedValue, and setIndexedValue when `-output-stats=false` or `-output-istats=false` because StatisticsManager::indexedStats has not been allocated.
-rw-r--r-- | lib/Core/StatsTracker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index 395babf0..4b4dc47c 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -195,7 +195,7 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename, } } - if (OutputIStats) + if (useStatistics() || userSearcherRequiresMD2U()) theStatisticManager->useIndexedStats(km->infos->getMaxID()); for (auto &kfp : km->functions) { |