Date: Friday, February 28, 2014 @ 05:33:27 Author: allan Revision: 206495
upgpkg: glibc 2.19-3 add patch to fix some rare sin/cos issues Added: glibc/trunk/glibc-2.19-fix-sign-in-bsloww1-input.patch Modified: glibc/trunk/PKGBUILD --------------------------------------------+ PKGBUILD | 7 ++ glibc-2.19-fix-sign-in-bsloww1-input.patch | 71 +++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-02-28 00:54:11 UTC (rev 206494) +++ PKGBUILD 2014-02-28 04:33:27 UTC (rev 206495) @@ -8,7 +8,7 @@ pkgname=glibc pkgver=2.19 -pkgrel=2 +pkgrel=3 pkgdesc="GNU C Library" arch=('i686' 'x86_64') url="http://www.gnu.org/software/libc" @@ -23,11 +23,13 @@ install=glibc.install source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig} glibc-2.18-xattr-compat-hack.patch + glibc-2.19-fix-sign-in-bsloww1-input.patch locale.gen.txt locale-gen) md5sums=('e26b8cc666b162f999404b03970f14e4' 'SKIP' '7ca96c68a37f2a4ab91792bfa0160a24' + '755a1a9d7844a5e338eddaa9a5d974cd' '07ac979b6ab5eeb778d55f041529d623' '476e9113489f93b348b21e144b6a8fcf') @@ -37,6 +39,9 @@ # hack fix for {linux,sys}/xattr.h incompatibility patch -p1 -i $srcdir/glibc-2.18-xattr-compat-hack.patch + # fix issues in sin/cos slow path calculation - commit ffe768a9 + patch -p1 -i $srcdir/glibc-2.19-fix-sign-in-bsloww1-input.patch + mkdir ${srcdir}/glibc-build } Added: glibc-2.19-fix-sign-in-bsloww1-input.patch =================================================================== --- glibc-2.19-fix-sign-in-bsloww1-input.patch (rev 0) +++ glibc-2.19-fix-sign-in-bsloww1-input.patch 2014-02-28 04:33:27 UTC (rev 206495) @@ -0,0 +1,71 @@ +From ffe768a90912f9bce43b70a82576b3dc99e3121c Mon Sep 17 00:00:00 2001 +From: Siddhesh Poyarekar <siddh...@redhat.com> +Date: Thu, 27 Feb 2014 21:29:16 +0530 +Subject: [PATCH] Fix sign of input to bsloww1 (BZ #16623) + +In 84ba214c, I removed some redundant sign computations and in the +process, I incorrectly got rid of a temporary variable, thus passing +the absolute value of the input to bsloww1. This caused #16623. + +This fix undoes the incorrect change. +--- + sysdeps/ieee754/dbl-64/s_sin.c | 16 ++++++++++------ + 3 files changed, 18 insertions(+), 7 deletions(-) + +diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c +index 6105e9f..50109b8 100644 +--- a/sysdeps/ieee754/dbl-64/s_sin.c ++++ b/sysdeps/ieee754/dbl-64/s_sin.c +@@ -447,19 +447,21 @@ __sin (double x) + } + else + { ++ double t; + if (a > 0) + { + m = 1; ++ t = a; + db = da; + } + else + { + m = 0; +- a = -a; ++ t = -a; + db = -da; + } +- u.x = big + a; +- y = a - (u.x - big); ++ u.x = big + t; ++ y = t - (u.x - big); + res = do_sin (u, y, db, &cor); + cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps; + retval = ((res == res + cor) ? ((m) ? res : -res) +@@ -671,19 +673,21 @@ __cos (double x) + } + else + { ++ double t; + if (a > 0) + { + m = 1; ++ t = a; + db = da; + } + else + { + m = 0; +- a = -a; ++ t = -a; + db = -da; + } +- u.x = big + a; +- y = a - (u.x - big); ++ u.x = big + t; ++ y = t - (u.x - big); + res = do_sin (u, y, db, &cor); + cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps; + retval = ((res == res + cor) ? ((m) ? res : -res) +-- +1.9.0 +