diff options
Diffstat (limited to 'lib/Core/SpecialFunctionHandler.cpp')
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index 74d36f27..88e0d1a0 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -74,9 +74,8 @@ static SpecialFunctionHandler::HandlerInfo handlerInfo[] = { addDNR("_exit", handleExit), { "exit", &SpecialFunctionHandler::handleExit, true, false, true }, addDNR("klee_abort", handleAbort), - addDNR("klee_silent_exit", handleSilentExit), + addDNR("klee_silent_exit", handleSilentExit), addDNR("klee_report_error", handleReportError), - add("calloc", handleCalloc, true), add("free", handleFree, false), add("klee_assume", handleAssume, false), @@ -122,14 +121,15 @@ static SpecialFunctionHandler::HandlerInfo handlerInfo[] = { // operator new(unsigned long) add("_Znwm", handleNew, true), - // clang -fsanitize=unsigned-integer-overflow + // Run clang with -fsanitize=signed-integer-overflow and/or + // -fsanitize=unsigned-integer-overflow add("__ubsan_handle_add_overflow", handleAddOverflow, false), add("__ubsan_handle_sub_overflow", handleSubOverflow, false), add("__ubsan_handle_mul_overflow", handleMulOverflow, false), add("__ubsan_handle_divrem_overflow", handleDivRemOverflow, false), #undef addDNR -#undef add +#undef add }; SpecialFunctionHandler::const_iterator SpecialFunctionHandler::begin() { @@ -733,21 +733,21 @@ void SpecialFunctionHandler::handleMarkGlobal(ExecutionState &state, void SpecialFunctionHandler::handleAddOverflow(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { - executor.terminateStateOnError(state, "overflow on unsigned addition", + executor.terminateStateOnError(state, "overflow on addition", Executor::Overflow); } void SpecialFunctionHandler::handleSubOverflow(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { - executor.terminateStateOnError(state, "overflow on unsigned subtraction", + executor.terminateStateOnError(state, "overflow on subtraction", Executor::Overflow); } void SpecialFunctionHandler::handleMulOverflow(ExecutionState &state, KInstruction *target, std::vector<ref<Expr> > &arguments) { - executor.terminateStateOnError(state, "overflow on unsigned multiplication", + executor.terminateStateOnError(state, "overflow on multiplication", Executor::Overflow); } |