From 56d92f5fdce06d29321b8da568b8413ae0a6df15 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 25 Jun 2015 13:53:05 +0530 Subject: [PATCH] If you prick a code block, does it not bleed? --- vec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vec.md b/vec.md index fd69e4b..94bc65f 100644 --- a/vec.md +++ b/vec.md @@ -444,7 +444,7 @@ end = ptr.offset(len) However because `offset` is marked as a GEP inbounds instruction, this will tell LLVM that ptr is allocated and won't alias other allocated memory. This is fine for zero-sized types, as they can't alias anything. However if we're using -heap::EMPTY as a sentinel for a non-allocation for a *non-zero-sized* type, +`heap::EMPTY` as a sentinel for a non-allocation for a *non-zero-sized* type, this can cause undefined behaviour. Alas, we must therefore special case either cap or len being 0 to not do the offset.