about summary refs log tree commit diff homepage
path: root/lib/Core/ExecutionState.cpp
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2020-06-16 20:07:06 +0100
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-06-24 13:48:18 +0100
commitaef3ecea2868ea08fafe34632c395df29a99f633 (patch)
tree6934e350882741093f1532e2f11d7c419de6219a /lib/Core/ExecutionState.cpp
parenta36f7a20afaf6e477846cf72814ebe2c346d87ec (diff)
downloadklee-aef3ecea2868ea08fafe34632c395df29a99f633.tar.gz
add ExecutionState IDs
* add getID()/setID()
* use ExecutionStateIDCompare in Executor::states set
* output state id in .err files
Diffstat (limited to 'lib/Core/ExecutionState.cpp')
-rw-r--r--lib/Core/ExecutionState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp
index b3719295..7b600003 100644
--- a/lib/Core/ExecutionState.cpp
+++ b/lib/Core/ExecutionState.cpp
@@ -41,6 +41,10 @@ cl::opt<bool> DebugLogStateMerge(
 
 /***/
 
+std::uint32_t ExecutionState::nextID = 1;
+
+/***/
+
 StackFrame::StackFrame(KInstIterator _caller, KFunction *_kf)
   : caller(_caller), kf(_kf), callPathNode(0), 
     minDistToUncoveredOnReturn(0), varargs(0) {
@@ -75,6 +79,7 @@ ExecutionState::ExecutionState(KFunction *kf) :
     coveredNew(false),
     forkDisabled(false) {
   pushFrame(nullptr, kf);
+  setID();
 }
 
 ExecutionState::ExecutionState(const std::vector<ref<Expr>> &assumptions)
@@ -116,6 +121,7 @@ ExecutionState *ExecutionState::branch() {
   depth++;
 
   auto *falseState = new ExecutionState(*this);
+  falseState->setID();
   falseState->coveredNew = false;
   falseState->coveredLines.clear();