From patchwork Tue Aug 22 12:16:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 22303 Received: (qmail 11831 invoked by alias); 22 Aug 2017 12:16:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11426 invoked by uid 89); 22 Aug 2017 12:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f67.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Cz81G2FVwjEyOEw8JmzWYoFXvi0H2n5QM2c66uFjd+k=; b=e1QAMnqdn/L7OEcMIAEb3VcujGfFNWnLxkmm12sQphJiieYzeOGwDVHv0vNpJ1K5nG 24qEiBW0vvZKBWNrcoifk79y+eyY/u3PlSK/2/aAoe7fSxRdZlHDSh0ixam0xEuEo/rE XOjwMmTWc9ffwM5+rAXUogkXFs1hV4ePR1VfnxBh3rrciF9BKw8aRSAAwIAnmweWrdQO O6/yrAAV7cB40p2qf3HB1BUfmHqM140kEDhMMsCC8bV3ELblcW0e7puqPPTZ6JCEMWEG 1I2L6W6gFG0Ll9nz4MPnJUHdUDmyAw/FcpjGoOnt2KszfK+TshqTXNvyM6svr7AZBh/J Fg2g== X-Gm-Message-State: AHYfb5jZ4xMkAarVUby2ChDKHY/BISBHAKQfnhYv4Rda6f9k8L1iotHi 4KjEQ2j4U+ilsh8L+8KCAuM/xQUcHxOh X-Received: by 10.202.75.75 with SMTP id y72mr596331oia.2.1503404209185; Tue, 22 Aug 2017 05:16:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20170817122244.GA14297@gmail.com> <1cb1b2db-db57-85dd-02ff-a7a1371bcee3@redhat.com> <0bd41ea7-65f6-da5d-2025-dd41d5f8c61a@redhat.com> <116a6dce-db6b-65f0-ad65-de22ea0aff8c@redhat.com> <3fb17a0b-fcf2-713a-9753-d63b4170c085@redhat.com> From: "H.J. Lu" Date: Tue, 22 Aug 2017 05:16:48 -0700 Message-ID: Subject: Re: [PATCH] Add hidden visibility to internal function prototypes To: Joseph Myers Cc: Florian Weimer , GNU C Library On Tue, Aug 22, 2017 at 4:45 AM, Joseph Myers wrote: > On Tue, 22 Aug 2017, Florian Weimer wrote: > >> On 08/22/2017 12:47 PM, Florian Weimer wrote: >> > I think the attached approach will work for the math subdirectory. >> > Tested on aarch64 and ppc64le. >> > >> > I see additional aarch64 failures, though (outside math). >> >> The failure was spurious (probably clock skew). >> >> I have since tried “make xcheck” and “make bench-build” on both >> architectures and don't see any failures anymore with the patch I posted >> (and the revert reverted). > > Thanks. This patch (and restoring HJ's patch) is OK to allow continued > progress on the visibility changes (although the alternative of using > mini-gmp in these tests is attractive as well, in line with the general > principle of limiting tests to using public interfaces when they have no > real need for internal interfaces). I tried mini-gmp from gmp 6.1.2. Some GMP functions are missing from mini-gmp. It seems that these math tests depend on the GMP in glibc. I didn't see the issue on x86 because ./sysdeps/x86_64/rshift.S ./sysdeps/powerpc/powerpc32/rshift.S ./sysdeps/m68k/m680x0/rshift.S ./sysdeps/hppa/rshift.S ./sysdeps/i386/rshift.S ./sysdeps/i386/i586/rshift.S ./sysdeps/sparc/sparc32/rshift.S ./sysdeps/sparc/sparc64/rshift.S ./sysdeps/mips/rshift.S ./sysdeps/mips/mips64/rshift.S ./sysdeps/alpha/rshift.S ./sysdeps/alpha/alphaev5/rshift.S Only targets which use stdlib/rshift.c have this issue. This patch copies the debug approach from stdlib/lshift.c and works on aarch64, From 3478fe3a92a8c85fa342a38ef3bf9bcc704bea94 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Aug 2017 17:07:36 -0700 Subject: [PATCH] rshift.c: Replace assert with DEBUG and abort assert in stdlib/rshift.c should be for debug purpose only and there is no such check in any rshift assembly implementations nor in lshift.c. This patch replaces assert with DEBUG and abort, similar to lshift.c so that generic GMP codes from libc.a can be linked with libc.so in atest-exp, atest-exp2 and atest-sincos, which depend on the GMP implementation in glibc. * stdlib/rshift.c (mpn_rshift): Replace ssert with DEBUG and abort. --- stdlib/rshift.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/rshift.c b/stdlib/rshift.c index d4c7f77769..ab69dd7915 100644 --- a/stdlib/rshift.c +++ b/stdlib/rshift.c @@ -42,7 +42,10 @@ mpn_rshift (register mp_ptr wp, register mp_size_t i; mp_limb_t retval; - assert (usize != 0 && cnt != 0); +#ifdef DEBUG + if (usize == 0 || cnt == 0) + abort (); +#endif sh_1 = cnt; -- 2.13.5