This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add hidden visibility to internal function prototypes
On Tue, Aug 22, 2017 at 4:45 AM, Joseph Myers <firstname.lastname@example.org> 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
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" <email@example.com>
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
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
@@ -42,7 +42,10 @@ mpn_rshift (register mp_ptr wp,
register mp_size_t i;
- assert (usize != 0 && cnt != 0);
+ if (usize == 0 || cnt == 0)
+ abort ();
sh_1 = cnt;