From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id E331F385381A for ; Thu, 15 Jul 2021 08:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E331F385381A Received: by mail-io1-xd32.google.com with SMTP id g22so5522600iom.1 for ; Thu, 15 Jul 2021 01:34:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/NrfU9/QKjD9X4bckfW8l3uWkEJCPVYhp2nJLXmPLzQ=; b=mR+U807JZPjSB5zG4Wn/wM38xNDokSISQ9Q/+WhYInfvdasm6OaVuB90gNJQuZ9yNT DvuiT+oyBQrPaHw9iwYry5jItvi/lcdEuoPqlqFcnxUFwIUTJN65+zHTun18CO3BPKLv pLCVzHKsHY6JhyIN8qldpEpDynHoa1Pnv9/4cqinGgbhNik6olF0+it57wG6uR+4ReiV TzR1tX3MHgPG5TdX9EYIPKuQwZS50i2SsUXhwWbGCaxs2bqjjhyZL2yWAD7/LMjCF3+i qmJjofKCOECzZekUfHINAXR+1KbToABThFAaxMdXxyIm0Vzi72PulQ/9uxCWtpfE1Ffm +/jQ== X-Gm-Message-State: AOAM530DkxO+A1+m1TIHBUdwe9zYZkmrAXrZUIv11n4i8b4TSF75lRCB E5T6gqn195Y1S90TNN3pGvROFmL2PY2XOZC7mEI= X-Google-Smtp-Source: ABdhPJxC9kpVNDW1PiF9P/dfPkazD8+fL2mKox4J2Kt6Iy5eeuMSVMtGPKWLjw4RkIdBj0wcUcdMYMw1L0yQMXSjNe0= X-Received: by 2002:a6b:e016:: with SMTP id z22mr2282375iog.187.1626338042447; Thu, 15 Jul 2021 01:34:02 -0700 (PDT) MIME-Version: 1.0 References: <816ce216-bf6a-75ca-4241-4861ec43ab27@gmail.com> In-Reply-To: <816ce216-bf6a-75ca-4241-4861ec43ab27@gmail.com> From: Christophe Lyon Date: Thu, 15 Jul 2021 10:33:51 +0200 Message-ID: Subject: Re: [PATCH libatomic/arm] avoid warning on constant addresses (PR 101379) To: Martin Sebor Cc: gcc-patches , Christophe Lyon X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Thu, 15 Jul 2021 08:34:04 -0000 Hi, On Sat, Jul 10, 2021 at 1:11 AM Martin Sebor via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > The attached tweak avoids the new -Warray-bounds instances when > building libatomic for arm. Christophe confirms it resolves > the problem (thank you!) > > As we have discussed, the main goal of this class of warnings > is to detect accesses at addresses derived from null pointers > (e.g., to struct members or array elements at a nonzero offset). > Diagnosing accesses at hardcoded addresses is incidental because > at the stage they are detected the two are not distinguishable > from each another. > > I'm planning (hoping) to implement detection of invalid pointer > arithmetic involving null for GCC 12, so this patch is a stopgap > solution to unblock the arm libatomic build without compromising > the warning. Once the new detection is in place these workarounds > can be removed or replaced with something more appropriate (e.g., > declaring the objects at the hardwired addresses with an attribute > like AVR's address or io; that would enable bounds checking at > those addresses as well). > > May I ping this patch? ARM toolchain build (cross & bootstrap) has been broken for more than a week, preventing regression detection. Thanks, Christophe Martin >