From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by sourceware.org (Postfix) with ESMTPS id 8CFCA3860C36 for ; Tue, 1 Sep 2020 08:09:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8CFCA3860C36 Received: by mail-oi1-x244.google.com with SMTP id 185so392277oie.11 for ; Tue, 01 Sep 2020 01:09:42 -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=Y8AerRNIxUolO6pYa0frsVBnY2SRmtGez1tc3EwSNPw=; b=JTr81ZfEVUpPPBJCEU1hVx2p8IKKGpM4J3GkZSSque0Y3n3zSqIvw6g2Sd9f646Utn YYNaWtfmodtLiN9D1c8tqn3edBntEEp/9MGgIs0ieXdDzswCR+RP+K9d2fsngFkXXVJP xGDm+bZxjrfCOxB099PUw+Y7eoYxe0TQSyMKmTHuDi9f03ri+JbhBd+r34knxKwY21oI MjmPcnWbyN1iUCF1yUhn2DodClE6/CknsZ/QDQ2qrdkTjtESJ5KmfaEhc2MCKv6BXqm/ 4Y0oabj74VOF8UChMu8uBXVY9j/N3lrEXQf1rERg/dSk9G2UfhTXPUTgVVnPUOvT1LOB osug== X-Gm-Message-State: AOAM530y2WBIaCoIl6OuGSukbUM6BQsHUc/HxWfThsVF332zo7pHWQ4h XnW5U32Ae2UNiJ4OvKdbv/1MlWPOGdwZjg5L5wio8g== X-Google-Smtp-Source: ABdhPJyLZ/xHx9SyjUQRZYZKYWRhDMpWmPhMtmlhIqzOSL8RbhGlIj7HdTTS17XAZ2pAURMlZrR9b/LS8IFsCGwUIuA= X-Received: by 2002:a05:6808:8e5:: with SMTP id d5mr381280oic.64.1598947781837; Tue, 01 Sep 2020 01:09:41 -0700 (PDT) MIME-Version: 1.0 References: <36cbf657-d2ab-0b45-e3a0-cce86cbfe5a2@gmail.com> <3bbdcc0723ef270d8d93e726d13ee293cdd05480.camel@redhat.com> <6f704d8e-c392-effe-d2a2-2864cda1ccaa@gmail.com> In-Reply-To: <6f704d8e-c392-effe-d2a2-2864cda1ccaa@gmail.com> From: Christophe Lyon Date: Tue, 1 Sep 2020 10:09:30 +0200 Message-ID: Subject: Re: [PATCH] separate reading past the end from -Wstringop-overflow To: Martin Sebor Cc: Jeff Law , gcc-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 01 Sep 2020 08:09:44 -0000 On Mon, 31 Aug 2020 at 23:50, Martin Sebor wrote: > > On 8/31/20 4:51 AM, Christophe Lyon wrote: > > Hi, > > > ... > > > > I pushed a small aarch64 patch as obvious: > > 2020-08-31 Christophe Lyon > > > > gcc/testsuite/ > > * gcc.target/aarch64/strcmpopt_6.c: Suppress -Wstringop-overread. > > (same as you added for i386) > > Thank you! > > > > > On arm, there is a regression: > > FAIL: c-c++-common/Warray-bounds-6.c -Wc++-compat (test for excess errors) > > Excess errors: > > /gcc/testsuite/c-c++-common/Warray-bounds-6.c:16:3: warning: 'strncpy' > > writing 1 or more bytes into a region of size 0 overflows the > > destination [-Wstringop-overflow=] > > > > and the new test has several failures: > > gcc.dg/Wstringop-overread.c (test for warnings, line 100) > > gcc.dg/Wstringop-overread.c (test for warnings, line 110) > > gcc.dg/Wstringop-overread.c (test for warnings, line 167) > > gcc.dg/Wstringop-overread.c (test for warnings, line 177) > > gcc.dg/Wstringop-overread.c (test for warnings, line 279) > > gcc.dg/Wstringop-overread.c (test for warnings, line 289) > > gcc.dg/Wstringop-overread.c (test for warnings, line 338) > > gcc.dg/Wstringop-overread.c (test for warnings, line 372) > > gcc.dg/Wstringop-overread.c (test for warnings, line 374) > > gcc.dg/Wstringop-overread.c (test for warnings, line 532) > > gcc.dg/Wstringop-overread.c (test for warnings, line 566) > > gcc.dg/Wstringop-overread.c (test for warnings, line 568) > > gcc.dg/Wstringop-overread.c (test for warnings, line 74) > > gcc.dg/Wstringop-overread.c (test for warnings, line 84) > > FAIL: gcc.dg/Wstringop-overread.c (test for excess errors) > > Excess errors: > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:302:3: warning: 'strnlen' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:306:3: warning: 'strnlen' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:312:3: warning: 'strnlen' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:323:3: warning: 'strnlen' > > reading 1 or more bytes from a region of size 0 [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:351:3: warning: 'strnlen' > > reading 1 or more bytes from a region of size 0 [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:498:3: warning: 'strndup' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:502:3: warning: 'strndup' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:508:3: warning: 'strndup' > > specified bound [1, 4294967295] exceeds source size 0 > > [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:518:3: warning: 'strndup' > > reading 1 or more bytes from a region of size 0 [-Wstringop-overread] > > /gcc/testsuite/gcc.dg/Wstringop-overread.c:545:3: warning: 'strndup' > > reading 1 or more bytes from a region of size 0 [-Wstringop-overread] > > > > Can you check these? > > They should be fixed as of yesterday: > https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552976.html > > Can you please retest with an updated build? Indeed, thanks! > > Martin