diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2014-09-19 13:36:02 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2014-09-19 13:36:02 +0100 |
commit | 547dd6fbf929d769b7a9a38c152bfb315d7a25a0 (patch) | |
tree | 97d886bc175c4161b4511dd58bfa519ff92ff621 | |
parent | 2497fdcb63ab5af7c047b384f4373cd0f2b95f2d (diff) | |
download | klee-547dd6fbf929d769b7a9a38c152bfb315d7a25a0.tar.gz |
Removed code related to underConstrained, as it is unused (issue pointed out by @hpalikareva).
-rw-r--r-- | include/klee/ExecutionState.h | 5 | ||||
-rw-r--r-- | lib/Core/ExecutionState.cpp | 3 | ||||
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 51 |
3 files changed, 11 insertions, 48 deletions
diff --git a/include/klee/ExecutionState.h b/include/klee/ExecutionState.h index 824fbed5..97b700c1 100644 --- a/include/klee/ExecutionState.h +++ b/include/klee/ExecutionState.h @@ -72,9 +72,6 @@ private: public: bool fakeState; - // Are we currently underconstrained? Hack: value is size to make fake - // objects. - unsigned underConstrained; unsigned depth; // pc - pointer to current instruction stream @@ -113,7 +110,7 @@ public: void removeFnAlias(std::string fn); private: - ExecutionState() : fakeState(false), underConstrained(0), ptreeNode(0) {} + ExecutionState() : fakeState(false), ptreeNode(0) {} public: ExecutionState(KFunction *kf); 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; } } - - |