diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2014-05-20 14:41:44 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2014-05-20 18:44:28 +0200 |
commit | 4406c41c1d6088abf01c216e49700cd3f8f01fcc (patch) | |
tree | 6f257fdf8bf4d27212a380a049548f24cdf7f389 /ChangeLog | |
parent | ae75a883f2eb312165d1e1f423cea320f3c92ef5 (diff) | |
download | glibc-4406c41c1d6088abf01c216e49700cd3f8f01fcc.tar.gz glibc-4406c41c1d6088abf01c216e49700cd3f8f01fcc.tar.xz glibc-4406c41c1d6088abf01c216e49700cd3f8f01fcc.zip |
Fix strtold on 32-bit sparc (and probably others) (BZ #16965)
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. Due to this bug, 32-bit sparc does not correctly convert the value "0x1p-16446", but it is likely that other architectures are also affected for other input values.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 59464a6478..e87fc225fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,10 @@ * localedata/tst-langinfo.sh: Send output to stdout. * localedata/tst-langinfo-static.c: New file. + [BZ #16965] + * stdlib/strtod_l.c (round_and_return): Add code to shift limbs + when the shift amount is modulo the limb size. + 2014-05-20 Richard Henderson <rth@redhat.com> [BZ #16967] |