[PATCH] D31295: Add free_on_realloc_zero=true flag for compatibility with allocators which allow a realloc(p, 0) and don't free the pointer.
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 11:43:21 PDT 2017
It is not detected by ASan, no. On `Allocator::Allocate`, we do a
similar `if (size == 0) size = 1;`.
On Thu, Mar 23, 2017 at 6:41 PM, Vedant Kumar via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:
> vsk added a comment.
> Ah, so is it also allowed to access `P` under ASan after doing `P = malloc(0)`? If so, I can't spot any issues here.
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
More information about the llvm-commits