about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2014-09-19 13:36:02 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2014-09-19 13:36:02 +0100
commit547dd6fbf929d769b7a9a38c152bfb315d7a25a0 (patch)
tree97d886bc175c4161b4511dd58bfa519ff92ff621 /lib
parent2497fdcb63ab5af7c047b384f4373cd0f2b95f2d (diff)
downloadklee-547dd6fbf929d769b7a9a38c152bfb315d7a25a0.tar.gz
Removed code related to underConstrained, as it is unused (issue pointed out by @hpalikareva).
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/ExecutionState.cpp3
-rw-r--r--lib/Core/SpecialFunctionHandler.cpp51
2 files changed, 10 insertions, 44 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp
index e81c776c..5d32c936 100644
--- a/lib/Core/ExecutionState.cpp
+++ b/lib/Core/ExecutionState.cpp
@@ -68,7 +68,6 @@ StackFrame::~StackFrame() {
 
 ExecutionState::ExecutionState(KFunction *kf) 
   : fakeState(false),
-    underConstrained(false),
     depth(0),
     pc(kf->instructions),
     prevPC(pc),
@@ -83,7 +82,6 @@ ExecutionState::ExecutionState(KFunction *kf)
 
 ExecutionState::ExecutionState(const std::vector<ref<Expr> > &assumptions) 
   : fakeState(true),
-    underConstrained(false),
     constraints(assumptions),
     queryCost(0.),
     ptreeNode(0) {
@@ -105,7 +103,6 @@ ExecutionState::~ExecutionState() {
 ExecutionState::ExecutionState(const ExecutionState& state)
   : fnAliases(state.fnAliases),
     fakeState(state.fakeState),
-    underConstrained(state.underConstrained),
     depth(state.depth),
     pc(state.pc),
     prevPC(state.prevPC),
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp
index 8625fa63..59e269cb 100644
--- a/lib/Core/SpecialFunctionHandler.cpp
+++ b/lib/Core/SpecialFunctionHandler.cpp
@@ -249,14 +249,7 @@ void SpecialFunctionHandler::handleAbort(ExecutionState &state,
                            KInstruction *target,
                            std::vector<ref<Expr> > &arguments) {
   assert(arguments.size()==0 && "invalid number of arguments to abort");
-
-  //XXX:DRE:TAINT
-  if(state.underConstrained) {
-    llvm::errs() << "TAINT: skipping abort fail\n";
-    executor.terminateState(state);
-  } else {
-    executor.terminateStateOnError(state, "abort failure", "abort.err");
-  }
+  executor.terminateStateOnError(state, "abort failure", "abort.err");
 }
 
 void SpecialFunctionHandler::handleExit(ExecutionState &state,
@@ -291,32 +284,18 @@ void SpecialFunctionHandler::handleAssert(ExecutionState &state,
                                           KInstruction *target,
                                           std::vector<ref<Expr> > &arguments) {
   assert(arguments.size()==3 && "invalid number of arguments to _assert");  
-  
-  //XXX:DRE:TAINT
-  if(state.underConstrained) {
-    llvm::errs() << "TAINT: skipping assertion:"
-                 << readStringAtAddress(state, arguments[0]) << "\n";
-    executor.terminateState(state);
-  } else
-    executor.terminateStateOnError(state, 
-                                   "ASSERTION FAIL: " + readStringAtAddress(state, arguments[0]),
-                                   "assert.err");
+  executor.terminateStateOnError(state,
+				 "ASSERTION FAIL: " + readStringAtAddress(state, arguments[0]),
+				 "assert.err");
 }
 
 void SpecialFunctionHandler::handleAssertFail(ExecutionState &state,
                                               KInstruction *target,
                                               std::vector<ref<Expr> > &arguments) {
   assert(arguments.size()==4 && "invalid number of arguments to __assert_fail");
-  
-  //XXX:DRE:TAINT
-  if(state.underConstrained) {
-    llvm::errs() << "TAINT: skipping assertion:"
-                 << readStringAtAddress(state, arguments[0]) << "\n";
-    executor.terminateState(state);
-  } else
-    executor.terminateStateOnError(state, 
-                                   "ASSERTION FAIL: " + readStringAtAddress(state, arguments[0]),
-                                   "assert.err");
+  executor.terminateStateOnError(state,
+				 "ASSERTION FAIL: " + readStringAtAddress(state, arguments[0]),
+				 "assert.err");
 }
 
 void SpecialFunctionHandler::handleReportError(ExecutionState &state,
@@ -325,17 +304,9 @@ void SpecialFunctionHandler::handleReportError(ExecutionState &state,
   assert(arguments.size()==4 && "invalid number of arguments to klee_report_error");
   
   // arguments[0], arguments[1] are file, line
-  
-  //XXX:DRE:TAINT
-  if(state.underConstrained) {
-    llvm::errs() << "TAINT: skipping klee_report_error:"
-                 << readStringAtAddress(state, arguments[2]) << ":"
-                 << readStringAtAddress(state, arguments[3]) << "\n";
-    executor.terminateState(state);
-  } else
-    executor.terminateStateOnError(state, 
-                                   readStringAtAddress(state, arguments[2]),
-                                   readStringAtAddress(state, arguments[3]).c_str());
+  executor.terminateStateOnError(state,
+				 readStringAtAddress(state, arguments[2]),
+				 readStringAtAddress(state, arguments[3]).c_str());
 }
 
 void SpecialFunctionHandler::handleMerge(ExecutionState &state,
@@ -736,5 +707,3 @@ void SpecialFunctionHandler::handleMarkGlobal(ExecutionState &state,
     mo->isGlobal = true;
   }
 }
-
-