From c6aa4ab021669fe7102288d294662751a4d4b1e6 Mon Sep 17 00:00:00 2001 From: Felix Rath Date: Fri, 22 May 2020 15:56:54 +0200 Subject: use isa<> and explicit nullptr-check for compilation with older LLVM versions, also mark two errors as ExecErrors, as these should not be caused by users --- lib/Core/SpecialFunctionHandler.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index a36d4324..a853d6ad 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -461,12 +461,10 @@ void SpecialFunctionHandler::handleEhUnwindRaiseExceptionImpl( ExecutionState &state, KInstruction *target, std::vector> &arguments) { if (arguments.size() != 1) { - executor.terminateStateOnError( - state, - "Internal Error: Incorrect number of arguments to " - "_klee_eh_Unwind_RaiseException_impl, " - "should not happen", - Executor::Unhandled); + executor.terminateStateOnExecError( + state, "Internal Error: Incorrect number of arguments to " + "_klee_eh_Unwind_RaiseException_impl, " + "should not happen"); return; } @@ -478,12 +476,11 @@ void SpecialFunctionHandler::handleEhUnwindRaiseExceptionImpl( return; } - if (isa_and_nonnull( - state.unwindingInformation)) { - executor.terminateStateOnError( + if (state.unwindingInformation && + isa(state.unwindingInformation)) { + executor.terminateStateOnExecError( state, - "Internal error: Unwinding restarted during an ongoing search phase", - Executor::Unhandled); + "Internal error: Unwinding restarted during an ongoing search phase"); return; } -- cgit 1.4.1