about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorAdrian Herrera <adrian.herrera02@gmail.com>2020-04-14 13:27:29 +1000
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-06-24 22:13:15 +0100
commite4a2ca614279c8b6febe35edf169eb38c0d85178 (patch)
tree1dfcbca0d875b89ee5c302dbef3b1fdbc92651ce /lib
parentecdddd94fdad39fcb17fe256715cf4cc9bacbfb9 (diff)
downloadklee-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.
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/StatsTracker.cpp2
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) {