On Mon, Mar 13, 2017 at 2:13 AM, Martin Sebor <mse...@gmail.com> wrote: > r243470 decorates standard allocation functions like alloca > and malloc with attribute alloc_size. However, in applying > the attribute to aligned_alloc I had overlooked that the size > argument is the second one and not the first. That oversight > has led to __builtin_object_size() reporting the wrong size > for aligned_alloc-allocated objects and, consequently, to > checking functions like __memset_chk calling abort for buffer > bogus overflows. > > The attached patch corrects this mistake by decorating the > function with the correct alloc_size attribute.
Ok. Richard. > Martin