[PATCH] Allocate extra 16 bytes for -fsanitize=address
Hans-Peter Nilsson
hp@bitrange.com
Sat Nov 24 10:52:00 GMT 2012
On Fri, 23 Nov 2012, H.J. Lu wrote:
> On Fri, Nov 23, 2012 at 9:38 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Fri, Nov 23, 2012 at 09:23:37AM -0800, H.J. Lu wrote:
> >> 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?
> >
> > As valgrind warns about that too, I'd say we should do that unconditionally,
> > the additional 16-bytes just aren't a big deal.
>
> This isn't sufficient for valgrind since valgrind will also report
> reading uninitialized data,
Only if that initialized data is actually used in a conditional.
> which requires additional memset
> on extra 16 bytes.
(For plain operations, valgrind just operate on, typically
passing along, the undefinedness.)
Maybe that's what you meant, in which case my comment just
clarifies what I saw as an ambiguity in your statement.
brgds, H-P
More information about the Gcc-patches
mailing list