This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/20137] aligned_alloc should fail for bad size / alignment [DR#460]
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 27 May 2016 08:21:05 +0000
- Subject: [Bug malloc/20137] aligned_alloc should fail for bad size / alignment [DR#460]
- Auto-submitted: auto-generated
- References: <bug-20137-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20137
--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to joseph@codesourcery.com from comment #7)
> We still need to make aligned_alloc fail for bad alignment values, though
> it's less clear there that a new symbol version is needed as it would be
> for restricting size values.
Agreed.
Martin and I also had an off-bug discussion about the size < alignment check.
I think it is incorrect because it assumes a particular implementation strategy
for malloc, and having aligned small objects is sometimes useful for obtaining
free bits for pointer tagging.
Furthermore, for malloc, the standard already requires that all allocations
(even the smallest ones) have fundamental alignment.
--
You are receiving this mail because:
You are on the CC list for the bug.