From 47128b7def4954c4cf544924c94f018d88033374 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 2 Sep 2018 15:32:56 +0200 Subject: misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- enrealloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'enrealloc.c') diff --git a/enrealloc.c b/enrealloc.c index 59033e7..878674c 100644 --- a/enrealloc.c +++ b/enrealloc.c @@ -27,6 +27,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 5); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); info->refcount += 1; } stpcpy(ptr, "test"); @@ -36,6 +37,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 10); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); assert(ptr != old); free(old); } @@ -46,6 +48,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 5); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); info->refcount += 1; } stpcpy(ptr, "test"); @@ -55,6 +58,7 @@ main(void) assert((info = get_allocinfo(ptr))); assert(info->size == 10); assert(!info->zeroed); + assert(!((uintptr_t)ptr % (uintptr_t)(info->alignment))); assert(ptr != old); free(old); } -- cgit v1.2.3-70-g09d2