From f3fca58efcfb3e67ad5e86768e0778d8ebfd910c Mon Sep 17 00:00:00 2001 From: Antoniu Pop Date: Mon, 28 Feb 2022 11:03:07 +0000 Subject: [PATCH] fix(runtime): add missing assert on context BSK. --- compiler/lib/Runtime/context.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/lib/Runtime/context.cpp b/compiler/lib/Runtime/context.cpp index 29294aaae..bab957771 100644 --- a/compiler/lib/Runtime/context.cpp +++ b/compiler/lib/Runtime/context.cpp @@ -31,6 +31,9 @@ get_bootstrap_key(mlir::concretelang::RuntimeContext *context) { std::string threadName = hpx::get_thread_name(); auto bskIt = context->bsk.find(threadName); if (bskIt == context->bsk.end()) { + assert((bskIt = context->bsk.find(RuntimeContext::BASE_CONTEXT_BSK)) != + context->bsk.end() && + bskIt->second && "No BASE_CONTEXT_BSK registered in context."); bskIt = context->bsk .insert(std::pair( threadName,