about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2020-02-08 23:25:27 +0100
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-06-25 16:30:10 +0100
commitc0fba136e40cd632adc863451189f0c77afc917b (patch)
tree87f4932c1ea76d3c245022eeee84d22732dfef52 /lib
parenta5524ee8393c06e6328b91b623ab4a8112301f0b (diff)
downloadklee-c0fba136e40cd632adc863451189f0c77afc917b.tar.gz
ExecutorUtil: assert that GlobalValue is already known
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/ExecutorUtil.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp
index 867e76a6..84226a64 100644
--- a/lib/Core/ExecutorUtil.cpp
+++ b/lib/Core/ExecutorUtil.cpp
@@ -48,7 +48,9 @@ namespace klee {
       } else if (const ConstantFP *cf = dyn_cast<ConstantFP>(c)) {
         return ConstantExpr::alloc(cf->getValueAPF().bitcastToAPInt());
       } else if (const GlobalValue *gv = dyn_cast<GlobalValue>(c)) {
-        return globalAddresses.find(gv)->second;
+        auto it = globalAddresses.find(gv);
+        assert(it != globalAddresses.end());
+        return it->second;
       } else if (isa<ConstantPointerNull>(c)) {
         return Expr::createPointer(0);
       } else if (isa<UndefValue>(c) || isa<ConstantAggregateZero>(c)) {