From c0fba136e40cd632adc863451189f0c77afc917b Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Sat, 8 Feb 2020 23:25:27 +0100 Subject: ExecutorUtil: assert that GlobalValue is already known --- lib/Core/ExecutorUtil.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(c)) { return ConstantExpr::alloc(cf->getValueAPF().bitcastToAPInt()); } else if (const GlobalValue *gv = dyn_cast(c)) { - return globalAddresses.find(gv)->second; + auto it = globalAddresses.find(gv); + assert(it != globalAddresses.end()); + return it->second; } else if (isa(c)) { return Expr::createPointer(0); } else if (isa(c) || isa(c)) { -- cgit 1.4.1