[PATCH] libio: Add small optimization on fmemopen

Florian Weimer fweimer@redhat.com
Wed Sep 21 18:47:00 GMT 2016


On 09/21/2016 08:43 PM, Paul Eggert wrote:
> On 09/21/2016 11:26 AM, Adhemerval Zanella wrote:
>> my idea to use this workaround is
>> to avoid possible issues with faulty compilers.
>
> That's my thought as well. Although we can argue that the C standard,
> GCC, valgrind, etc. are all faulty, possibly the C standard etc. won't
> change (after all, there is a performance advantage to GCC's current
> behavior) and our code would continue to be over the edge.

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.

Florian



More information about the Libc-alpha mailing list