From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 24BA21F5AE for ; Wed, 21 Jul 2021 16:20:16 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE56A386FC36 for ; Wed, 21 Jul 2021 16:20:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE56A386FC36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626884413; bh=Jyhu1LhVGA38WIRLJKXQY0EDG8tPV+KPIHHJmMswbp8=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cOTe1+YHfPdkORytHcQ2jvW5lCIU759FgHMPVHsuHctkq/AAR77KYLc4gG2sfLELi CsshNCVQA1dCH3l8i8DweYAphrdRf25vGkNYWMvrah2MYHRRuU9SivS5qySjZpsxsI VAFCkoiAkvK5cJfkFzwBqL2Ny+UnCf2ED0MWEQS8= Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id A6EFE3840004 for ; Wed, 21 Jul 2021 16:17:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6EFE3840004 Received: by mail-oi1-x22e.google.com with SMTP id t143so3393849oie.8 for ; Wed, 21 Jul 2021 09:17:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Jyhu1LhVGA38WIRLJKXQY0EDG8tPV+KPIHHJmMswbp8=; b=IprJSVR5xSIxiRO9BHXTyJ9LHItQjnQdvZmC0T73Xs7xmuIym4H6S9ANCYhvrvtQU6 zXIoYIsHIZc+BAVQfNV3M0Z2f0YnUWjT5k+dZ/PcQVGM+BqwkJ8U6iIgX4erQHnpM/64 Ogcjjmz0Gqxh+vyXCrKPKRZPb/ONrbA+I3JZBRo6Cdh77K48wl5r8KAAeeNeIYdI5xZP idUZP4wQaRYrJvCYdwUYorfPwC3x+syqjvZJFnDsFDqe8GUwxcvRM4yZPby6T461EddS 9+glv/eV6p9tXmH8/R4Xh4WmyJbSWEsLyDtHQd18CBvPeCDS9VE5vQi+W3jJkGOfYj2m ZiDA== X-Gm-Message-State: AOAM533Hh+nPCQTasP1cCYl4E0PFCMJGHiFvCTyBkqP0ZGGRfGmCHtXC AGw0W7URL6KWJ0leXmHQMOgxHVy9q94= X-Google-Smtp-Source: ABdhPJwe9+JeS79PrpoLtyKw4OSZJiC42hAvme0h4shmmYFQgSWDdVcm/cLKTuAxCJgC4aPSbZRgoA== X-Received: by 2002:a54:458b:: with SMTP id z11mr12615391oib.95.1626884273027; Wed, 21 Jul 2021 09:17:53 -0700 (PDT) Received: from [192.168.0.41] (75-166-102-22.hlrn.qwest.net. [75.166.102.22]) by smtp.gmail.com with ESMTPSA id d20sm3085411otq.67.2021.07.21.09.17.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jul 2021 09:17:52 -0700 (PDT) Subject: Re: [RFC patch] avoid warning on accesses to hardwired address To: Florian Weimer , Martin Sebor via Libc-alpha References: <59b05c40-d0a8-233a-27c5-104b24bdc9b4@gmail.com> <87sg0oj8q7.fsf@oldenburg.str.redhat.com> <87lf5zn7e6.fsf@oldenburg.str.redhat.com> Message-ID: Date: Wed, 21 Jul 2021 10:17:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <87lf5zn7e6.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Martin Sebor via Libc-alpha Reply-To: Martin Sebor Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/21/21 7:06 AM, Florian Weimer wrote: > * Florian Weimer: > >> * Martin Sebor via Libc-alpha: >> >>> Thanks to recent code refactoring in GCC 12, -Warray-bounds has >>> started to diagnose accesses to constant addresses just like many >>> other flow based warnings do (e.g., -Wstringop-overflow). >>> The warnings are meant to help detect accesses resulting from >>> invalid arithmetic on null pointers. There may be a better way >>> to detect them but GCC doesn't have the detection yet. This >>> warning change has in turn exposed Glibc's uses of this trick >>> in the implementation of the THREAD_SELF macro. >> >> The warning needs to be disabled in GCC for named address spaces. Null >> pointers are not special for them. > > Is there already a GCC PR for this warning regression? Not one about null pointers and named address spaces. If you could open one and point to where the spec allows null pointers to be dereferenced that would be helpful. Thanks Martin