On Fri, Nov 23, 2012 at 8:16 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Fri, Nov 23, 2012 at 10:59 AM, Uros Bizjak <ubiz...@gmail.com> wrote: >> Hello! >> >>> This patch allocates extra 16 bytes for -fsanitize=address so that >>> asan won't report read beyond memory buffer. It is used by >>> bootstrap-asan. OK to install? >> >> /* Resize buffer if we allocated substantially too much, or if we >> - haven't enough space for the \n-terminator. */ >> + haven't enough space for the \n-terminator. Allocate extra 16 >> + bytes for -fsanitize=address. */ >> >> I guess that extra _15_ bytes should be enough? The maximum we need >> for SSE stringops is additional 15 bytes, when only the first byte is >> allocated in the 16byte bundle. >> > > If we need to clear the extra bytes, clearing 16 bytes can be faster > than 16 bytes.
(I assume "... than 15 bytes"). However, this is ideal for the code below, where we add either +16 or +1, considering also additional byte for the terminator. Uros.