From a12357f20521b24d3febc9cac4cfbb8b707b175a Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 19 Jun 2014 12:27:31 +0200 Subject: [PATCH] [mc] Replace test-and-die with assert --- src/mc/mc_snapshot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mc/mc_snapshot.c b/src/mc/mc_snapshot.c index 20d7642d1c..c3eb07ce29 100644 --- a/src/mc/mc_snapshot.c +++ b/src/mc/mc_snapshot.c @@ -102,9 +102,8 @@ void* mc_snapshot_read_region(void* addr, mc_mem_region_t region, void* target, { uintptr_t offset = (uintptr_t) addr - (uintptr_t) region->start_addr; - if (addr < region->start_addr || (char*) addr+size >= (char*)region->start_addr+region->size) { - xbt_die("Trying to read out of the region boundary."); - } + xbt_assert(addr >= region->start_addr && (char*) addr+size < (char*)region->start_addr+region->size, + "Trying to read out of the region boundary."); // Linear memory region: if (region->data) { -- 2.20.1