aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core/SpecialFunctionHandler.cpp
diff options
context:
space:
mode:
authorFelix Rath <felix.rath@comsys.rwth-aachen.de>2020-05-22 15:56:54 +0200
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-10-12 11:19:24 +0100
commitc6aa4ab021669fe7102288d294662751a4d4b1e6 (patch)
tree0802d22482be8374d47ad1e160aa9a91ad8ecb93 /lib/Core/SpecialFunctionHandler.cpp
parentc09306ffd894f95be195723327d5b17dca73ebd1 (diff)
downloadklee-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.cpp19
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;
}