From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7615 invoked by alias); 22 Oct 2018 13:02:26 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 7598 invoked by uid 89); 22 Oct 2018 13:02:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Oct 2018 13:02:20 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B5D730014A1 for ; Mon, 22 Oct 2018 13:02:19 +0000 (UTC) Received: from oldenburg.str.redhat.com (dhcp-192-212.str.redhat.com [10.33.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C541105705D for ; Mon, 22 Oct 2018 13:02:19 +0000 (UTC) Received: by oldenburg.str.redhat.com (Postfix, from userid 1000) id 719CB4399457D; Mon, 22 Oct 2018 15:02:18 +0200 (CEST) Date: Mon, 01 Jan 2018 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.26 COMMITTED] Ignore -Wrestrict for one strncat test. User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20181022130218.719CB4399457D@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 22 Oct 2018 13:02:19 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00010.txt.bz2 From: Joseph Myers With current GCC mainline, one strncat test involving a size close to SIZE_MAX results in a -Wrestrict warning that that buffer size would imply that the two buffers must overlap. This patch fixes the build by adding disabling of -Wrestrict (for GCC versions supporting that option) to the already-present disabling of -Wstringop-overflow= and -Warray-bounds for this test. Tested with build-many-glibcs.py that this restores the testsuite build with GCC mainline for aarch64-linux-gnu. * string/tester.c (test_strncat) [__GNUC_PREREQ (7, 0)]: Also ignore -Wrestrict for one test. (cherry picked from commit 35ebb6b0c48bc671d9c54e089884f9bf6fca540e) 2018-06-14 Joseph Myers * string/tester.c (test_strncat) [__GNUC_PREREQ (7, 0)]: Also ignore -Wrestrict for one test. diff --git a/string/tester.c b/string/tester.c index 02ea8e1e16..8fdbe3de13 100644 --- a/string/tester.c +++ b/string/tester.c @@ -485,6 +485,10 @@ test_strncat (void) deliberately tested here; GCC 8 gives a -Warray-bounds warning about this. */ DIAG_IGNORE_NEEDS_COMMENT (7, "-Wstringop-overflow="); + /* GCC 9 as of 2018-06-14 warns that the size passed is + large enough that, if it were the actual object size, + the objects would have to overlap. */ + DIAG_IGNORE_NEEDS_COMMENT (9, "-Wrestrict"); #endif DIAG_IGNORE_NEEDS_COMMENT (8, "-Warray-bounds"); check (strncat (buf1 + n2, buf2 + n1, ~((size_t) 0) - n4)