This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix strtold on 32-bit sparc (and probably others) (BZ #16965)
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, David Miller <davem at davemloft dot net>
- Date: Tue, 20 May 2014 18:48:06 +0200
- Subject: Re: [PATCH] Fix strtold on 32-bit sparc (and probably others) (BZ #16965)
- Authentication-results: sourceware.org; auth=none
- References: <1400593238-10317-1-git-send-email-aurelien at aurel32 dot net> <Pine dot LNX dot 4 dot 64 dot 1405201433260 dot 29858 at digraph dot polyomino dot org dot uk>
On Tue, May 20, 2014 at 02:34:14PM +0000, Joseph S. Myers wrote:
> On Tue, 20 May 2014, Aurelien Jarno wrote:
>
> > This patch fixes an issue observed running the tst-strtod-round test on
> > 32 bit sparc. In some conditions, strtold calls round_and_return, which in
> > turn calls __mpn_rshift with cnt = 0, while stdlib/rshift.c explicitly says
> > that cnts should satisfy 0 < CNT < BITS_PER_MP_LIMB. In this case, the code
> > end up doing a logical shift right of the same amount than the register,
> > which is undefined in the C standard.
>
> OK (presuming you at least ran the stdlib tests on 32-bit sparc, and that
> you include the usual NEWS update and bug closing when committing).
Yes I ran the full tests on both 32-bit sparc and x86-64, I haven't
seen any regression, and a progression for tst-strtod-round on sparc.
Thanks for the review.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net