diff options
author | Felix Rath <felix.rath@comsys.rwth-aachen.de> | 2020-05-22 15:56:54 +0200 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:19:24 +0100 |
commit | c6aa4ab021669fe7102288d294662751a4d4b1e6 (patch) | |
tree | 0802d22482be8374d47ad1e160aa9a91ad8ecb93 /lib/Core/SpecialFunctionHandler.cpp | |
parent | c09306ffd894f95be195723327d5b17dca73ebd1 (diff) | |
download | klee-c6aa4ab021669fe7102288d294662751a4d4b1e6.tar.gz |
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
Diffstat (limited to 'lib/Core/SpecialFunctionHandler.cpp')
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
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<ref<Expr>> &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<SearchPhaseUnwindingInformation>( - state.unwindingInformation)) { - executor.terminateStateOnError( + if (state.unwindingInformation && + isa<SearchPhaseUnwindingInformation>(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; } |