This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] libio: Add small optimization on fmemopen
On 09/21/2016 11:47 AM, Florian Weimer wrote:
We don't know the nature of the GCC issue, so we cannot work around it
reliably. The most likely explanation is that Address Sanitizer does
not account for a valid GCC optimization.
That's not the sense that I get from looking at Bug 66661. GCC is
assuming it can do an aligned word load of the trailing bytes of a
flexible array member in a properly-aligned structure. This assumption
is something we can easily work around reliably, e.g., with the patch I
suggested. Although the followups to Bug 66661 suggest that there may be
further problems with overaligned structures, the code here is not using
_Alignas so these further problems are not an issue here.