[llvm-bugs] [Bug 32968] New: posix_memalign should return ENOMEM when allocation fails under allocator_may_return_null=1
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 8 08:32:12 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32968
Bug ID: 32968
Summary: posix_memalign should return ENOMEM when allocation
fails under allocator_may_return_null=1
Product: new-bugs
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: tim.g.armstrong at gmail.com
CC: llvm-bugs at lists.llvm.org
ASAN's posix_memalign() should return ENOMEM when the allocation fails due to
lack of memory.
I can reproduce this reliably by making a huge allocation (e.g. 2^48 bytes)
with ASAN_OPTIONS including allocator_may_return_null=1. A null pointer is
returned via the output argument but the return value is 0 (which means
success).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170508/304e0795/attachment.html>
More information about the llvm-bugs
mailing list