From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111322 invoked by alias); 21 Sep 2016 18:47:19 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 111282 invoked by uid 89); 21 Sep 2016 18:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:709, our X-HELO: mx1.redhat.com Subject: Re: [PATCH] libio: Add small optimization on fmemopen To: Paul Eggert , Adhemerval Zanella , libc-alpha@sourceware.org References: <1474466758-26544-1-git-send-email-adhemerval.zanella@linaro.org> <2afbe144-bb78-b657-002a-361fb3220269@cs.ucla.edu> <03eb21f7-6979-62eb-0fe8-34ea35b0c7d6@linaro.org> <708fc89d-fbb9-cb20-9ee6-079013baf63b@redhat.com> From: Florian Weimer Message-ID: Date: Wed, 21 Sep 2016 18:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-09/txt/msg00412.txt.bz2 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