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: AS17314 8.43.84.0/22 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, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 15FC91F8C6 for ; Fri, 30 Jul 2021 17:02:34 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE5373951E5E for ; Fri, 30 Jul 2021 17:02:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE5373951E5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627664552; bh=royO8FGJXUkb1yifmJEN37NQ3QqLStczwQ+jIXArBA0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kWjtZVh3kH3PEMFDTiIugEWtlLuk39IaL/yFi6kUoKTZmp0u0CTb2t1xuYqqhqK+r EIFzC35hNIvJB/bMGXM19njrncgrxW2nsSZoE4grbxJFVI/HxYFbeeLrkRfr11Mjhk 0flWOhOVoreJ7O34tRw9AZU2B7217f+9IuvldTRA= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 085B33953827 for ; Fri, 30 Jul 2021 17:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 085B33953827 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-538-KLf3Wfk2MrmFwvw-gaFacg-1; Fri, 30 Jul 2021 13:02:07 -0400 X-MC-Unique: KLf3Wfk2MrmFwvw-gaFacg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD39793923; Fri, 30 Jul 2021 17:02:06 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C6AA5F707; Fri, 30 Jul 2021 17:02:06 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 16UH24UO454197 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 30 Jul 2021 19:02:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 16UH24EC454196; Fri, 30 Jul 2021 19:02:04 +0200 Date: Fri, 30 Jul 2021 19:02:04 +0200 To: Martin Sebor Subject: Re: Failures building glibc with mainline GCC Message-ID: <20210730170204.GP2380545@tucnak> References: <1bcf4c26-1619-06fa-fd8d-4e944ac6f07a@gmail.com> MIME-Version: 1.0 In-Reply-To: <1bcf4c26-1619-06fa-fd8d-4e944ac6f07a@gmail.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: Jakub Jelinek via Libc-alpha Reply-To: Jakub Jelinek Cc: gcc@gcc.gnu.org, libc-alpha@sourceware.org, Joseph Myers Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Fri, Jul 30, 2021 at 10:53:28AM -0600, Martin Sebor via Gcc wrote: > On 7/30/21 9:30 AM, Joseph Myers wrote: > > There are a lot of failures building glibc with mainline GCC right now > > > > (previously, there were ICEs building glibc on various architectures, so > > these might be hard to bisect): > > > > > > * x86_64-linux-gnu: "error: array subscript 0 is outside array bounds of > > '__seg_fs struct pthread * __seg_fs[0]' [-Werror=array-bounds]". This is > > the one discussed in > > . > > I submitted a patch for this warning to Glibc: > https://sourceware.org/pipermail/libc-alpha/2021-July/128829.html > which is what ultimately precipitated Florian's question. If null > pointers to named address spaces are valid I'll adjust GCC to > avoid the warning for now (as has been discussed, for GCC 12 I'd > like to redo the logic to detect the problematic null pointer > arithmetic instead). They are valid for some address spaces. See e.g. how gimple.c (check_loadstore) used by infer_nonnull_range_by_dereference uses a target hook for that: /* Some address spaces may legitimately dereference zero. */ addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (op)); if (targetm.addr_space.zero_address_valid (as)) return false; Jakub