[PATCH] D34782: [scudo] Change aligned alloc functions to be more compliant & perf changes
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 08:32:34 PDT 2017
cryptoad added inline comments.
================
Comment at: lib/scudo/scudo_allocator.cpp:676
+ }
*MemPtr = Instance.allocate(Size, Alignment, FromMemalign);
return 0;
----------------
cryptoad wrote:
> alekseyshl wrote:
> > To follow the spec, we should check the result too:
> >
> > if (!*MemPtr)
> > return errno_ENOMEM;
> Yeah I wanted to talk to you about that.
> Following what's in https://linux.die.net/man/3/malloc (look for ENOMEM) , we should probably set the errno in ReturnNullOrDieOnFailure::OnOOM (or whichever works better).
I just realized there is no errno_ENOMEM. Do you know the reasoning behind having errno_E* as opposed to using the E* value itself?
https://reviews.llvm.org/D34782
More information about the llvm-commits
mailing list