From 547dd6fbf929d769b7a9a38c152bfb315d7a25a0 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Fri, 19 Sep 2014 13:36:02 +0100 Subject: Removed code related to underConstrained, as it is unused (issue pointed out by @hpalikareva). --- lib/Core/SpecialFunctionHandler.cpp | 51 ++++++++----------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) (limited to 'lib/Core/SpecialFunctionHandler.cpp') 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 > &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 > &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 > &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; } } - - -- cgit 1.4.1