From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bat.birch.relay.mailchannels.net (bat.birch.relay.mailchannels.net [23.83.209.13]) by sourceware.org (Postfix) with ESMTPS id 37F5E3858C60 for ; Wed, 13 Oct 2021 00:14:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37F5E3858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id CA77A227FC; Wed, 13 Oct 2021 00:14:50 +0000 (UTC) Received: from pdx1-sub0-mail-a53.g.dreamhost.com (100-96-16-65.trex.outbound.svc.cluster.local [100.96.16.65]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5D2BC22750; Wed, 13 Oct 2021 00:14:49 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a53.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.65 (trex/6.4.3); Wed, 13 Oct 2021 00:14:50 +0000 X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Wide-Eyed-Ruddy: 2461c6d47546cbd0_1634084090567_185650580 X-MC-Loop-Signature: 1634084090567:479228491 X-MC-Ingress-Time: 1634084090567 Received: from pdx1-sub0-mail-a53.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a53.g.dreamhost.com (Postfix) with ESMTP id 1FAAB7F6E6; Tue, 12 Oct 2021 17:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=message-id :date:mime-version:subject:to:cc:references:from:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=xeaci1 Wtijt3ti3yMPjuxkw+rYM=; b=gE39KZ8vkH5Lf5jUjt36K2L0uX+Xp1oA82IN8s 0Ef1dH/p3HdRISpK2kIqkDYO30leOQoBqrzqhuSNabBD/mQcgvPEjEYIsLr4ugAg 2c0s93nvPt0d98J4+Oerbmfe5X3NKVLrzz7NMQCtfCZz9fZ5uUkL2H7jbM6m1eYA d9xVw= Received: from [192.168.1.174] (unknown [1.186.121.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a53.g.dreamhost.com (Postfix) with ESMTPSA id 3F1A07F6B4; Tue, 12 Oct 2021 17:14:45 -0700 (PDT) Message-ID: <2b249a4d-4670-a9a4-8b8e-32a95cfb4b65@gotplt.org> Date: Wed, 13 Oct 2021 05:44:40 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] Warray-bounds: Warn only for generic address spaces Content-Language: en-US To: Martin Sebor , gcc-patches@gcc.gnu.org Cc: msebor@redhat.com References: <20211012183347.385794-1-siddhesh@gotplt.org> <7d64e765-0bbe-2ff1-be2e-323194e09450@gmail.com> X-DH-BACKEND: pdx1-sub0-mail-a53 From: Siddhesh Poyarekar In-Reply-To: <7d64e765-0bbe-2ff1-be2e-323194e09450@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3030.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2021 00:14:53 -0000 On 10/13/21 00:36, Martin Sebor wrote: > On 10/12/21 12:33 PM, Siddhesh Poyarekar wrote: >> The warning is falsely triggered for THREAD_SELF in glibc when >> accessing TCB through the segment register. >=20 > Thanks for looking into it!=C2=A0 The Glibc warning is being tracked > in PR 102630.=C2=A0 The root cause behind it is in compute_objsize_r > in pointer-query.cc (which is used by -Warray-bounds as well as > other warnings).=C2=A0 I just posted a patch for it the other day; > it's waiting for approval (though as Joseph noted, I need to > adjust the test and either make it target-independent or move > it under i386). Ahh, targetm.addr_space.zero_address_valid was what I was looking for=20 and didn't find. Your fix looks good to me module moving the test out=20 into gcc.target/i386. Thanks, Siddhesh