This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/20137] aligned_alloc should fail for bad size / alignment [DR#460]


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]