From 1805c476b62b41082a7d37cd8dabfef8f0b47197 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Sat, 23 Apr 2011 19:51:07 +0000 Subject: Transformed the assert() checking for overlapping objects into a call to klee_error() to make sure the check is done even when assertions are disabled. This makes the AsmAddresses test pass with assertions disabled. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@130067 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/MemoryManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Core') diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp index 69bbd6e3..79fbcecf 100644 --- a/lib/Core/MemoryManager.cpp +++ b/lib/Core/MemoryManager.cpp @@ -55,8 +55,8 @@ MemoryObject *MemoryManager::allocateFixed(uint64_t address, uint64_t size, for (objects_ty::iterator it = objects.begin(), ie = objects.end(); it != ie; ++it) { MemoryObject *mo = *it; - assert(!(address+size > mo->address && address < mo->address+mo->size) && - "allocated an overlapping object"); + if (address+size > mo->address && address < mo->address+mo->size) + klee_error("Trying to allocate an overlapping object"); } #endif -- cgit 1.4.1