about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2017-07-30 18:37:08 +0200
committerDan Liew <delcypher@gmail.com>2017-10-15 15:31:39 +0100
commitbf5f1b659729dde0378a867ce21426c09490d518 (patch)
treed92d153acc03346a32e9cdcfc8ea7694da7c811d /lib/Core
parent7071d86f38ec428c31251a5e8dc035b6e2157de1 (diff)
downloadklee-bf5f1b659729dde0378a867ce21426c09490d518.tar.gz
Fixed assert in BFSSearcher that does not hold as part of interleaved searcher
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Searcher.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp
index fc61ab98..d5d35e8f 100644
--- a/lib/Core/Searcher.cpp
+++ b/lib/Core/Searcher.cpp
@@ -104,8 +104,9 @@ void BFSSearcher::update(ExecutionState *current,
   if (!addedStates.empty() && current &&
       std::find(removedStates.begin(), removedStates.end(), current) ==
           removedStates.end()) {
-    assert(states.front() == current);
-    states.pop_front();
+    auto pos = std::find(states.begin(), states.end(), current);
+    assert(pos != states.end());
+    states.erase(pos);
     states.push_back(current);
   }