From d8fb549de0ef3299436c448f7b45fd8ebee8e733 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 3 Mar 2012 00:01:37 +0000 Subject: Sat Mar 3 00:01:37 UTC 2012 --- multilib-testing/lib32-glibc/PKGBUILD | 110 ++- ....12.2-ignore-origin-of-privileged-program.patch | 12 - ....15-__libc_res_nquerydomain-out-of-bounds.patch | 24 + .../lib32-glibc/glibc-2.15-feraiseexcept-plt.patch | 20 + .../glibc-2.15-fix-res_query-assert.patch | 51 ++ .../lib32-glibc/glibc-2.15-fmtmsg-locking.patch | 148 ++++ .../lib32-glibc/glibc-2.15-ifunc.patch | 23 - .../glibc-2.15-multiarch-x86-strcmp.patch | 39 + .../glibc-2.15-nearbyintf-rounding.patch | 75 ++ .../glibc-2.15-non-signalling-comparisons.patch | 886 +++++++++++++++++++++ .../glibc-2.15-revert-netlink-cache.patch | 20 - .../lib32-glibc/glibc-2.15-rintf-rounding.patch | 158 ++++ .../lib32-glibc/glibc-2.15-scanf.patch | 13 - multilib-testing/lib32-glibc/glibc-2.15-vdso.patch | 40 + .../lib32-glibc/glibc-2.15-vfprintf-nargs.patch | 174 ++++ 15 files changed, 1693 insertions(+), 100 deletions(-) create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-feraiseexcept-plt.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-fix-res_query-assert.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-fmtmsg-locking.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-nearbyintf-rounding.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-non-signalling-comparisons.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-rintf-rounding.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-vdso.patch create mode 100644 multilib-testing/lib32-glibc/glibc-2.15-vfprintf-nargs.patch (limited to 'multilib-testing') diff --git a/multilib-testing/lib32-glibc/PKGBUILD b/multilib-testing/lib32-glibc/PKGBUILD index 6b8124e27..72a563645 100644 --- a/multilib-testing/lib32-glibc/PKGBUILD +++ b/multilib-testing/lib32-glibc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 64480 2012-02-14 08:41:39Z heftig $ +# $Id: PKGBUILD 66927 2012-03-01 17:16:36Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Jan de Groot # Contributor: Allan McRae @@ -9,7 +9,7 @@ _pkgbasename=glibc pkgname=lib32-$_pkgbasename pkgver=2.15 -pkgrel=6 +pkgrel=7 _glibcdate=20111227 pkgdesc="GNU C Library for multilib" arch=('x86_64') @@ -20,13 +20,12 @@ makedepends=('gcc-multilib>=4.6') options=('!strip' '!emptydirs') source=(ftp://ftp.archlinux.org/other/glibc/${_pkgbasename}-${pkgver}_${_glibcdate}.tar.xz glibc-2.10-dont-build-timezone.patch - glibc-2.10-bz4781.patch glibc-__i686.patch glibc-2.12.2-ignore-origin-of-privileged-program.patch glibc-2.14-libdl-crash.patch - glibc-2.14-revert-4768ae77.patch glibc-2.14-reexport-rpc-interface.patch glibc-2.14-reinstall-nis-rpc-headers.patch + glibc-2.15-fix-res_query-assert.patch glibc-2.15-regex.patch glibc-2.15-lddebug-scopes.patch glibc-2.15-revert-c5a0802a.patch @@ -38,57 +37,64 @@ source=(ftp://ftp.archlinux.org/other/glibc/${_pkgbasename}-${pkgver}_${_glibcda glibc-2.15-revert-netlink-cache.patch glibc-2.15-arena.patch glibc-2.15-negative-result-cache.patch + glibc-2.15-multiarch-x86-strcmp.patch + glibc-2.15-vdso.patch + glibc-2.15-feraiseexcept-plt.patch + glibc-2.15-vfprintf-nargs.patch + glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch + glibc-2.15-fmtmsg-locking.patch + glibc-2.15-non-signalling-comparisons.patch + glibc-2.15-rintf-rounding.patch + glibc-2.15-nearbyintf-rounding.patch lib32-glibc.conf) md5sums=('6ffdf5832192b92f98bdd125317c0dfc' '4dadb9203b69a3210d53514bb46f41c3' - '0c5540efc51c0b93996c51b57a8540ae' '40cd342e21f71f5e49e32622b25acc52' - 'b042647ea7d6f22ad319e12e796bd13e' + 'e60e33591c9ec1447e4cddadcbb9cf3a' '6970bcfeb3bf88913436d5112d16f588' - '7da8c554a3b591c7401d7023b1928afc' 'c5de2a946215d647c8af5432ec4b0da0' '55febbb72139ac7b65757df085024b83' + '31f415b41197d85d3bbee3d1eecd06a3' 'b3526cbd5e29773560dba725db99af5a' '3c219ddfb619b6df903cac4cc42c611d' '7ae3e426251ae33e73dbad71f9c91378' - '39353f53168f4a7509ba5fe0d9f218b8' - '136eb969f5d6bb6f5155f72a1a7cf23e' + 'f0782ddbf38e0b30ec6b85348816046f' + '3d844b53b2dbb7c996e39c7ad932f55d' '41ae047ac88e8f6f547c70b0a0bc3b72' 'fccb89f6628f59752278e125c35941f8' 'c4cd34f20ccd37817f6c1374bd4ee68e' - '6771b0b2bb8aa3870a259fd2f46c424f' + '94b61302a7ca6c5764d013dc7738fcfe' 'a9ffadcfd2d357f91fee0b861fd4a7c6' '2c46b8e294de24c531f2253ff69aeef3' + '7a2998a04ebfcf8bf820540f490ce714' + '0d77d20fa7fe2f87ad945cb9edb4d91d' + 'bfdefac3d705f41fbf84b1de1dc945af' + 'dded423e264cdd178500f3e8ad62fe66' + '340deaa582a95ddde86edb624c3bfea0' + '6bbac50e6ff82187654e6a0a7bd849e7' + 'c483504cf404ed0b44480af627813a97' + '1419d61fd1dbc6cdc48bb59da86fa66f' + '7ff501435078b1a2622124fbeaafc921' '6e052f1cb693d5d3203f50f9d4e8c33b') build() { cd ${srcdir}/glibc # timezone data is in separate package (tzdata) - patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch + patch -p1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch - # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781 - patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch - - # Undefine __i686 for gcc <= 4.6 + # undefine __i686 for gcc <= 4.6 # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html # fix in http://sourceware.org/git/?p=glibc.git;a=commit;h=d4a54ac6 requires additional backporting... - patch -Np1 -i ${srcdir}/glibc-__i686.patch + patch -p1 -i ${srcdir}/glibc-__i686.patch # http://www.exploit-db.com/exploits/15274/ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (fedora branch) - patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch + patch -p1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (fedora branch) # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html - patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch - - # Revert commit causing issues with crappy DNS servers... - # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER! - # Note that both these patches appear not to fix the issue completely (but rebuilds may fix): - # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 (used by opensuse) - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (fedora branch) - patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch + patch -p1 -i ${srcdir}/glibc-2.14-libdl-crash.patch # re-export RPC interface until libtirpc is ready as a replacement # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (fedora branch) @@ -96,7 +102,11 @@ build() { # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (fedora branch) patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch - # Fix up regcomp/regexec + # fix res_query assertion + # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 + patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch + + # fix up regcomp/regexec # http://sourceware.org/git/?p=glibc.git;a=commit;h=2ba92745 patch -Np1 -i ${srcdir}/glibc-2.15-regex.patch @@ -121,29 +131,65 @@ build() { # fix AVX detection # http://sourceware.org/git/?p=glibc.git;a=commit;h=afc5ed09 # http://sourceware.org/git/?p=glibc.git;a=commit;h=08cf777f - patch -Np1 -i ${srcdir}/glibc-2.15-avx.patch + patch -p1 -i ${srcdir}/glibc-2.15-avx.patch # and "fix" strcasecmp - patch -Np1 -i ${srcdir}/glibc-2.15-strcasecmp-disable-avx.patch + patch -p1 -i ${srcdir}/glibc-2.15-strcasecmp-disable-avx.patch # fix GB18030 charmap # http://sourceware.org/bugzilla/show_bug.cgi?id=11837 # http://sourceware.org/git/?p=glibc.git;a=commit;h=2a57bd79 (fedora branch) # http://sourceware.org/git/?p=glibc.git;a=commit;h=3d828a61 (fedora branch) - patch -Np1 -i ${srcdir}/glibc-2.15-gb18030.patch + patch -p1 -i ${srcdir}/glibc-2.15-gb18030.patch # fix crash in __nscd_get_mapping if nscd not running # http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential "fix" in comment) # reverts commit 3a2c0242 and other necessary following changes... - patch -Np1 -i ${srcdir}/glibc-2.15-revert-netlink-cache.patch + patch -p1 -i ${srcdir}/glibc-2.15-revert-netlink-cache.patch # handle ARENA_TEST correctly # http://sourceware.org/git/?p=glibc.git;a=commit;h=41b81892 - patch -Np1 -i ${srcdir}/glibc-2.15-arena.patch + patch -p1 -i ${srcdir}/glibc-2.15-arena.patch # Do not cache negative results in nscd if these are transient # http://sourceware.org/git/?p=glibc.git;a=commit;h=3e1aa84e - patch -Np1 -i ${srcdir}/glibc-2.15-negative-result-cache.patch + patch -p1 -i ${srcdir}/glibc-2.15-negative-result-cache.patch + # strcasecmp_l, strncasecmp_l act as strcmp for multiarch x86 + # http://sourceware.org/git/?p=glibc.git;a=commit;h=0bab47b6 + patch -p1 -i ${srcdir}/glibc-2.15-multiarch-x86-strcmp.patch + + # always set l_used for vDSO. + # http://sourceware.org/git/?p=glibc.git;a=commit;h=1f393a11 + patch -p1 -i ${srcdir}/glibc-2.15-vdso.patch + + # fix x86 PLT slot usage for feraiseexcept + # http://sourceware.org/git/?p=glibc.git;a=commit;h=7c35ffed + patch -p1 -i ${srcdir}/glibc-2.15-feraiseexcept-plt.patch + + # vfprintf nargs overflow - CVE-2012-0864 + # http://sourceware.org/bugzilla/show_bug.cgi?id=13656 + # http://sourceware.org/ml/libc-alpha/2012-02/msg00328.html + patch -p1 -i ${srcdir}/glibc-2.15-vfprintf-nargs.patch + + # avoid out ouf bounds read in __libc_res_nquerydomain + # http://sourceware.org/git/?p=glibc.git;a=commit;h=8fdceb2e + patch -p1 -i ${srcdir}/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch + + # make fmtmsg function thread-safe + # http://sourceware.org/git/?p=glibc.git;a=commit;h=7724defc + patch -p1 -i ${srcdir}/glibc-2.15-fmtmsg-locking.patch + + # use non-signaling floating-point comparisons in math functions + # http://sourceware.org/git/?p=glibc.git;a=commit;h=92221550 + patch -p1 -i ${srcdir}/glibc-2.15-non-signalling-comparisons.patch + + # fix rintf rounding. + # http://sourceware.org/git/?p=glibc.git;a=commit;h=fe45ce09 + patch -p1 -i ${srcdir}/glibc-2.15-rintf-rounding.patch + + # fix nearbyintf rounding + # http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47 + patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch cd ${srcdir} mkdir glibc-build diff --git a/multilib-testing/lib32-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch b/multilib-testing/lib32-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch index ce089b49c..533fc1b4b 100644 --- a/multilib-testing/lib32-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch +++ b/multilib-testing/lib32-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch @@ -1,13 +1,3 @@ -From d14e6b09d60d52cc12f0396c3106b14e1bd0fe8f Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Thu, 9 Dec 2010 15:00:59 +0100 -Subject: [PATCH 1/1] Ignore origin of privileged program - ---- - ChangeLog | 5 +++++ - elf/dl-object.c | 3 +++ - 2 files changed, 8 insertions(+), 0 deletions(-) - diff --git a/elf/dl-object.c b/elf/dl-object.c index 22a1635..7674d49 100644 --- a/elf/dl-object.c @@ -22,5 +12,3 @@ index 22a1635..7674d49 100644 return new; } --- -1.7.2 diff --git a/multilib-testing/lib32-glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch b/multilib-testing/lib32-glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch new file mode 100644 index 000000000..6f0a0398f --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch @@ -0,0 +1,24 @@ +diff --git a/resolv/res_query.c b/resolv/res_query.c +index 947c651..abccd4a 100644 +--- a/resolv/res_query.c ++++ b/resolv/res_query.c +@@ -556,12 +556,16 @@ __libc_res_nquerydomain(res_state statp, + * copy without '.' if present. + */ + n = strlen(name); +- if (n >= MAXDNAME) { ++ ++ /* Decrement N prior to checking it against MAXDNAME ++ so that we detect a wrap to SIZE_MAX and return ++ a reasonable error. */ ++ n--; ++ if (n >= MAXDNAME - 1) { + RES_SET_H_ERRNO(statp, NO_RECOVERY); + return (-1); + } +- n--; +- if (n >= 0 && name[n] == '.') { ++ if (name[n] == '.') { + strncpy(nbuf, name, n); + nbuf[n] = '\0'; + } else diff --git a/multilib-testing/lib32-glibc/glibc-2.15-feraiseexcept-plt.patch b/multilib-testing/lib32-glibc/glibc-2.15-feraiseexcept-plt.patch new file mode 100644 index 000000000..c41acc169 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-feraiseexcept-plt.patch @@ -0,0 +1,20 @@ +diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c +index 70f9ee2..6e2ce35 100644 +--- a/sysdeps/i386/fpu/feupdateenv.c ++++ b/sysdeps/i386/fpu/feupdateenv.c +@@ -1,5 +1,5 @@ + /* Install given floating-point environment and raise exceptions. +- Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc. ++ Copyright (C) 1997,99,2000,01,07,2010,2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + +@@ -44,7 +44,7 @@ __feupdateenv (const fenv_t *envp) + /* Raise the saved exception. Incidently for us the implementation + defined format of the values in objects of type fexcept_t is the + same as the ones specified using the FE_* constants. */ +- feraiseexcept ((int) temp); ++ __feraiseexcept ((int) temp); + + /* Success. */ + return 0; diff --git a/multilib-testing/lib32-glibc/glibc-2.15-fix-res_query-assert.patch b/multilib-testing/lib32-glibc/glibc-2.15-fix-res_query-assert.patch new file mode 100644 index 000000000..a894da9c7 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-fix-res_query-assert.patch @@ -0,0 +1,51 @@ +--- a/resolv/res_query.c ++++ a/resolv/res_query.c +@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp, + int *resplen2) + { + HEADER *hp = (HEADER *) answer; ++ HEADER *hp2; + int n, use_malloc = 0; + u_int oflags = statp->_flags; + +@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp, + /* __libc_res_nsend might have reallocated the buffer. */ + hp = (HEADER *) *answerp; + +- /* We simplify the following tests by assigning HP to HP2. It +- is easy to verify that this is the same as ignoring all +- tests of HP2. */ +- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; +- +- if (n < (int) sizeof (HEADER) && answerp2 != NULL +- && *resplen2 > (int) sizeof (HEADER)) ++ /* We simplify the following tests by assigning HP to HP2 or ++ vice versa. It is easy to verify that this is the same as ++ ignoring all tests of HP or HP2. */ ++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER)) + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp = hp2; ++ hp2 = hp; + } +- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) +- && n > (int) sizeof (HEADER)) ++ else + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp2 = hp; ++ hp2 = (HEADER *) *answerp2; ++ if (n < (int) sizeof (HEADER)) ++ { ++ hp = hp2; ++ } + } + ++ /* Make sure both hp and hp2 are defined */ ++ assert((hp != NULL) && (hp2 != NULL)); ++ + if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) + && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { + #ifdef DEBUG diff --git a/multilib-testing/lib32-glibc/glibc-2.15-fmtmsg-locking.patch b/multilib-testing/lib32-glibc/glibc-2.15-fmtmsg-locking.patch new file mode 100644 index 000000000..f5976abd9 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-fmtmsg-locking.patch @@ -0,0 +1,148 @@ +diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c +index 9203317..4c02302 100644 +--- a/stdlib/fmtmsg.c ++++ b/stdlib/fmtmsg.c +@@ -103,7 +103,6 @@ fmtmsg (long int classification, const char *label, int severity, + const char *text, const char *action, const char *tag) + { + __libc_once_define (static, once); +- int result = MM_OK; + struct severity_info *severity_rec; + + /* Make sure everything is initialized. */ +@@ -124,17 +123,6 @@ fmtmsg (long int classification, const char *label, int severity, + return MM_NOTOK; + } + +- for (severity_rec = severity_list; severity_rec != NULL; +- severity_rec = severity_rec->next) +- if (severity == severity_rec->severity) +- /* Bingo. */ +- break; +- +- /* If we don't know anything about the severity level return an error. */ +- if (severity_rec == NULL) +- return MM_NOTOK; +- +- + #ifdef __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ +@@ -143,54 +131,73 @@ fmtmsg (long int classification, const char *label, int severity, + 0); + #endif + +- /* Now we can print. */ +- if (classification & MM_PRINT) +- { +- int do_label = (print & label_mask) && label != MM_NULLLBL; +- int do_severity = (print & severity_mask) && severity != MM_NULLSEV; +- int do_text = (print & text_mask) && text != MM_NULLTXT; +- int do_action = (print & action_mask) && action != MM_NULLACT; +- int do_tag = (print & tag_mask) && tag != MM_NULLTAG; +- +- if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n", +- do_label ? label : "", +- do_label && (do_severity | do_text | do_action | do_tag) +- ? ": " : "", +- do_severity ? severity_rec->string : "", +- do_severity && (do_text | do_action | do_tag) +- ? ": " : "", +- do_text ? text : "", +- do_text && (do_action | do_tag) ? "\n" : "", +- do_action ? "TO FIX: " : "", +- do_action ? action : "", +- do_action && do_tag ? " " : "", +- do_tag ? tag : "") < 0) +- /* Oh, oh. An error occurred during the output. */ +- result = MM_NOMSG; +- } ++ __libc_lock_lock (lock); + +- if (classification & MM_CONSOLE) ++ for (severity_rec = severity_list; severity_rec != NULL; ++ severity_rec = severity_rec->next) ++ if (severity == severity_rec->severity) ++ /* Bingo. */ ++ break; ++ ++ /* If we don't know anything about the severity level return an error. */ ++ int result = MM_NOTOK; ++ if (severity_rec != NULL) + { +- int do_label = label != MM_NULLLBL; +- int do_severity = severity != MM_NULLSEV; +- int do_text = text != MM_NULLTXT; +- int do_action = action != MM_NULLACT; +- int do_tag = tag != MM_NULLTAG; +- +- syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n", +- do_label ? label : "", +- do_label && (do_severity | do_text | do_action | do_tag) +- ? ": " : "", +- do_severity ? severity_rec->string : "", +- do_severity && (do_text | do_action | do_tag) ? ": " : "", +- do_text ? text : "", +- do_text && (do_action | do_tag) ? "\n" : "", +- do_action ? "TO FIX: " : "", +- do_action ? action : "", +- do_action && do_tag ? " " : "", +- do_tag ? tag : ""); ++ result = MM_OK; ++ ++ /* Now we can print. */ ++ if (classification & MM_PRINT) ++ { ++ int do_label = (print & label_mask) && label != MM_NULLLBL; ++ int do_severity = (print & severity_mask) && severity != MM_NULLSEV; ++ int do_text = (print & text_mask) && text != MM_NULLTXT; ++ int do_action = (print & action_mask) && action != MM_NULLACT; ++ int do_tag = (print & tag_mask) && tag != MM_NULLTAG; ++ int need_colon = (do_label ++ && (do_severity | do_text | do_action | do_tag)); ++ ++ if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n", ++ do_label ? label : "", ++ need_colon ? ": " : "", ++ do_severity ? severity_rec->string : "", ++ do_severity && (do_text | do_action | do_tag) ++ ? ": " : "", ++ do_text ? text : "", ++ do_text && (do_action | do_tag) ? "\n" : "", ++ do_action ? "TO FIX: " : "", ++ do_action ? action : "", ++ do_action && do_tag ? " " : "", ++ do_tag ? tag : "") < 0) ++ /* Oh, oh. An error occurred during the output. */ ++ result = MM_NOMSG; ++ } ++ ++ if (classification & MM_CONSOLE) ++ { ++ int do_label = label != MM_NULLLBL; ++ int do_severity = severity != MM_NULLSEV; ++ int do_text = text != MM_NULLTXT; ++ int do_action = action != MM_NULLACT; ++ int do_tag = tag != MM_NULLTAG; ++ int need_colon = (do_label ++ && (do_severity | do_text | do_action | do_tag)); ++ ++ syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n", ++ do_label ? label : "", ++ need_colon ? ": " : "", ++ do_severity ? severity_rec->string : "", ++ do_severity && (do_text | do_action | do_tag) ? ": " : "", ++ do_text ? text : "", ++ do_text && (do_action | do_tag) ? "\n" : "", ++ do_action ? "TO FIX: " : "", ++ do_action ? action : "", ++ do_action && do_tag ? " " : "", ++ do_tag ? tag : ""); ++ } + } + ++ __libc_lock_unlock (lock); ++ + #ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); + #endif diff --git a/multilib-testing/lib32-glibc/glibc-2.15-ifunc.patch b/multilib-testing/lib32-glibc/glibc-2.15-ifunc.patch index 8ad0b9d7a..115afa02a 100644 --- a/multilib-testing/lib32-glibc/glibc-2.15-ifunc.patch +++ b/multilib-testing/lib32-glibc/glibc-2.15-ifunc.patch @@ -1,23 +1,3 @@ - -From 6ee65ed6ddbf04402fad0bec6aa9c73b9d982ae4 Mon Sep 17 00:00:00 2001 -From: Ulrich Drepper -Date: Fri, 27 Jan 2012 15:05:19 -0500 -Subject: [PATCH] Sort objects before relocations - ---- - ChangeLog | 11 ++++ - Makeconfig | 6 ++ - NEWS | 4 +- - elf/Makefile | 15 +++++- - elf/dl-open.c | 128 ++++++++++++++++++++++++++++++++++++------------ - elf/tst-relsort1.c | 19 +++++++ - elf/tst-relsort1mod1.c | 7 +++ - elf/tst-relsort1mod2.c | 7 +++ - 8 files changed, 160 insertions(+), 37 deletions(-) - create mode 100644 elf/tst-relsort1.c - create mode 100644 elf/tst-relsort1mod1.c - create mode 100644 elf/tst-relsort1mod2.c - diff --git a/Makeconfig b/Makeconfig index 2db2821..68547b2 100644 --- a/Makeconfig @@ -280,6 +260,3 @@ index 0000000..a2c3e55 +{ + return floor (d) != 0.0; +} --- -1.7.3.4 - diff --git a/multilib-testing/lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch b/multilib-testing/lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch new file mode 100644 index 000000000..38c9e617f --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-multiarch-x86-strcmp.patch @@ -0,0 +1,39 @@ +diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c +index d10e872..d4fcd2b 100644 +--- a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c ++++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c +@@ -6,6 +6,8 @@ extern __typeof (strcasecmp_l) __strcasecmp_l_nonascii; + #define USE_IN_EXTENDED_LOCALE_MODEL 1 + #include + ++strong_alias (__strcasecmp_l_nonascii, __strcasecmp_l_ia32) ++ + /* The needs of strcasecmp in libc are minimal, no need to go through + the IFUNC. */ + strong_alias (__strcasecmp_l_nonascii, __GI___strcasecmp_l) +diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S +index 5410d17..b3b9eb8 100644 +--- a/sysdeps/i386/i686/multiarch/strcmp.S ++++ b/sysdeps/i386/i686/multiarch/strcmp.S +@@ -111,6 +111,7 @@ END(STRCMP) + # endif + #endif + +-#ifndef USE_AS_STRNCMP ++#if !defined USE_AS_STRNCMP && !defined USE_AS_STRCASECMP_L \ ++ && !defined USE_AS_STRNCASECMP_L + # include "../strcmp.S" + #endif +diff --git a/sysdeps/i386/i686/multiarch/strncase_l-c.c b/sysdeps/i386/i686/multiarch/strncase_l-c.c +index 0c68b8d..7e601af 100644 +--- a/sysdeps/i386/i686/multiarch/strncase_l-c.c ++++ b/sysdeps/i386/i686/multiarch/strncase_l-c.c +@@ -6,6 +6,8 @@ extern __typeof (strncasecmp_l) __strncasecmp_l_nonascii; + #define USE_IN_EXTENDED_LOCALE_MODEL 1 + #include + ++strong_alias (__strncasecmp_l_nonascii, __strncasecmp_l_ia32) ++ + /* The needs of strcasecmp in libc are minimal, no need to go through + the IFUNC. */ + strong_alias (__strncasecmp_l_nonascii, __GI___strncasecmp_l) diff --git a/multilib-testing/lib32-glibc/glibc-2.15-nearbyintf-rounding.patch b/multilib-testing/lib32-glibc/glibc-2.15-nearbyintf-rounding.patch new file mode 100644 index 000000000..b2bb9caac --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-nearbyintf-rounding.patch @@ -0,0 +1,75 @@ +diff --git a/math/libm-test.inc b/math/libm-test.inc +index c8186c8..1016753 100644 +--- a/math/libm-test.inc ++++ b/math/libm-test.inc +@@ -4632,6 +4632,29 @@ nearbyint_test (void) + TEST_f_f (nearbyint, 524286.75, 524287.0); + TEST_f_f (nearbyint, 524288.75, 524289.0); + ++ TEST_f_f (nearbyint, 1048576.75, 1048577.0); ++ TEST_f_f (nearbyint, 2097152.75, 2097153.0); ++ TEST_f_f (nearbyint, 2492472.75, 2492473.0); ++ TEST_f_f (nearbyint, 2886220.75, 2886221.0); ++ TEST_f_f (nearbyint, 3058792.75, 3058793.0); ++ TEST_f_f (nearbyint, -1048576.75, -1048577.0); ++ TEST_f_f (nearbyint, -2097152.75, -2097153.0); ++ TEST_f_f (nearbyint, -2492472.75, -2492473.0); ++ TEST_f_f (nearbyint, -2886220.75, -2886221.0); ++ TEST_f_f (nearbyint, -3058792.75, -3058793.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (nearbyint, 70368744177664.75, 70368744177665.0); ++ TEST_f_f (nearbyint, 140737488355328.75, 140737488355329.0); ++ TEST_f_f (nearbyint, 281474976710656.75, 281474976710657.0); ++ TEST_f_f (nearbyint, 562949953421312.75, 562949953421313.0); ++ TEST_f_f (nearbyint, 1125899906842624.75, 1125899906842625.0); ++ TEST_f_f (nearbyint, -70368744177664.75, -70368744177665.0); ++ TEST_f_f (nearbyint, -140737488355328.75, -140737488355329.0); ++ TEST_f_f (nearbyint, -281474976710656.75, -281474976710657.0); ++ TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0); ++ TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0); ++#endif ++ + END (nearbyint); + } + +diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c +index 04ef9ab..a6d602b 100644 +--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c ++++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c +@@ -30,18 +30,12 @@ __nearbyintf(float x) + { + fenv_t env; + int32_t i0,j0,sx; +- u_int32_t i,i1; + float w,t; + GET_FLOAT_WORD(i0,x); + sx = (i0>>31)&1; + j0 = ((i0>>23)&0xff)-0x7f; + if(j0<23) { + if(j0<0) { +- if((i0&0x7fffffff)==0) return x; +- i1 = (i0&0x07fffff); +- i0 &= 0xfff00000; +- i0 |= ((i1|-i1)>>9)&0x400000; +- SET_FLOAT_WORD(x,i0); + libc_feholdexceptf (&env); + w = TWO23[sx]+x; + t = w-TWO23[sx]; +@@ -49,17 +43,11 @@ __nearbyintf(float x) + GET_FLOAT_WORD(i0,t); + SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31)); + return t; +- } else { +- i = (0x007fffff)>>j0; +- if((i0&i)==0) return x; /* x is integral */ +- i>>=1; +- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0); + } + } else { + if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } +- SET_FLOAT_WORD(x,i0); + libc_feholdexceptf (&env); + w = TWO23[sx]+x; + t = w-TWO23[sx]; diff --git a/multilib-testing/lib32-glibc/glibc-2.15-non-signalling-comparisons.patch b/multilib-testing/lib32-glibc/glibc-2.15-non-signalling-comparisons.patch new file mode 100644 index 000000000..874f8b4cb --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-non-signalling-comparisons.patch @@ -0,0 +1,886 @@ +diff --git a/math/w_acos.c b/math/w_acos.c +index 3138408..0490933 100644 +--- a/math/w_acos.c ++++ b/math/w_acos.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + double + __acos (double x) + { +- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabs (x), 1.0), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_acosf.c b/math/w_acosf.c +index 0e41a2c..2500a7d 100644 +--- a/math/w_acosf.c ++++ b/math/w_acosf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + float + __acosf (float x) + { +- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_acosh.c b/math/w_acosh.c +index 0bd2686..d632987 100644 +--- a/math/w_acosh.c ++++ b/math/w_acosh.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + double + __acosh (double x) + { +- if (__builtin_expect (x < 1.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 1.0), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard (x, x, 29); + +diff --git a/math/w_acoshf.c b/math/w_acoshf.c +index c59bf94..f77df2b 100644 +--- a/math/w_acoshf.c ++++ b/math/w_acoshf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + float + __acoshf (float x) + { +- if (__builtin_expect (x < 1.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard_f (x, x, 129); + +diff --git a/math/w_acoshl.c b/math/w_acoshl.c +index 819bdfc..cc823b8 100644 +--- a/math/w_acoshl.c ++++ b/math/w_acoshl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + long double + __acoshl (long double x) + { +- if (__builtin_expect (x < 1.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_) + /* acosh(x<1) */ + return __kernel_standard (x, x, 229); + +diff --git a/math/w_acosl.c b/math/w_acosl.c +index 6417068..05023b4 100644 +--- a/math/w_acosl.c ++++ b/math/w_acosl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + long double + __acosl (long double x) + { +- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* acos(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_asin.c b/math/w_asin.c +index d4e89ce..0fa9487 100644 +--- a/math/w_asin.c ++++ b/math/w_asin.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + double + __asin (double x) + { +- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabs (x), 1.0), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_asinf.c b/math/w_asinf.c +index 270961f..c28edab 100644 +--- a/math/w_asinf.c ++++ b/math/w_asinf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + float + __asinf (float x) + { +- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_asinl.c b/math/w_asinl.c +index 32e5273..e4036d8 100644 +--- a/math/w_asinl.c ++++ b/math/w_asinl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + long double + __asinl (long double x) + { +- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0) ++ && _LIB_VERSION != _IEEE_) + { + /* asin(|x|>1) */ + feraiseexcept (FE_INVALID); +diff --git a/math/w_atanh.c b/math/w_atanh.c +index 1022bd5..190d2e9 100644 +--- a/math/w_atanh.c ++++ b/math/w_atanh.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,8 @@ + double + __atanh (double x) + { +- if (__builtin_expect (fabs (x) >= 1.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0) ++ && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, + fabs (x) > 1.0 + ? 30 /* atanh(|x|>1) */ +diff --git a/math/w_atanhf.c b/math/w_atanhf.c +index 3c8cf83..e0c5dc3 100644 +--- a/math/w_atanhf.c ++++ b/math/w_atanhf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,8 @@ + float + __atanhf (float x) + { +- if (__builtin_expect (fabsf (x) >= 1.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0) ++ && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, + fabsf (x) > 1.0f + ? 130 /* atanh(|x|>1) */ +diff --git a/math/w_atanhl.c b/math/w_atanhl.c +index f582acf..319535d 100644 +--- a/math/w_atanhl.c ++++ b/math/w_atanhl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,8 @@ + long double + __atanhl (long double x) + { +- if (__builtin_expect (fabsl (x) >= 1.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0) ++ && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, + fabsl (x) > 1.0L + ? 230 /* atanh(|x|>1) */ +diff --git a/math/w_exp2.c b/math/w_exp2.c +index bf22326..7a3b0af 100644 +--- a/math/w_exp2.c ++++ b/math/w_exp2.c +@@ -12,7 +12,8 @@ static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1); + double + __exp2 (double x) + { +- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0) ++ if (__builtin_expect (islessequal (x, u_threshold) ++ || isgreater (x, o_threshold), 0) + && _LIB_VERSION != _IEEE_ && __finite (x)) + /* exp2 overflow: 44, exp2 underflow: 45 */ + return __kernel_standard (x, x, 44 + (x <= o_threshold)); +diff --git a/math/w_exp2f.c b/math/w_exp2f.c +index 7215fca..c4e9e94 100644 +--- a/math/w_exp2f.c ++++ b/math/w_exp2f.c +@@ -12,7 +12,8 @@ static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1); + float + __exp2f (float x) + { +- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0) ++ if (__builtin_expect (islessequal (x, u_threshold) ++ || isgreater (x, o_threshold), 0) + && _LIB_VERSION != _IEEE_ && __finitef (x)) + /* exp2 overflow: 144, exp2 underflow: 145 */ + return __kernel_standard_f (x, x, 144 + (x <= o_threshold)); +diff --git a/math/w_exp2l.c b/math/w_exp2l.c +index ac8d231..442a637 100644 +--- a/math/w_exp2l.c ++++ b/math/w_exp2l.c +@@ -13,7 +13,8 @@ static const long double u_threshold + long double + __exp2l (long double x) + { +- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0) ++ if (__builtin_expect (islessequal (x, u_threshold) ++ || isgreater (x, o_threshold), 0) + && _LIB_VERSION != _IEEE_ && __finitel (x)) + /* exp2 overflow: 244, exp2 underflow: 245 */ + return __kernel_standard (x, x, 244 + (x <= o_threshold)); +diff --git a/math/w_j0.c b/math/w_j0.c +index 1dff8b4..f8d3724 100644 +--- a/math/w_j0.c ++++ b/math/w_j0.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + double + j0 (double x) + { +- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 34); + +@@ -40,7 +41,8 @@ strong_alias (j0, j0l) + double + y0 (double x) + { +- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { +diff --git a/math/w_j0f.c b/math/w_j0f.c +index fc52f26..cef36aa 100644 +--- a/math/w_j0f.c ++++ b/math/w_j0f.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + float + j0f (float x) + { +- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0) ++ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard_f (x, x, 134); +@@ -38,7 +38,8 @@ j0f (float x) + float + y0f (float x) + { +- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0) ++ if (__builtin_expect (islessequal (x, 0.0f) ++ || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) +diff --git a/math/w_j0l.c b/math/w_j0l.c +index 8d72d50..144f33c 100644 +--- a/math/w_j0l.c ++++ b/math/w_j0l.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + long double + __j0l (long double x) + { +- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* j0(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 234); + +@@ -38,7 +39,8 @@ weak_alias (__j0l, j0l) + long double + __y0l (long double x) + { +- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + { + if (x < 0.0L) + { +diff --git a/math/w_j1.c b/math/w_j1.c +index 358e0e1..e9a5357 100644 +--- a/math/w_j1.c ++++ b/math/w_j1.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + double + j1 (double x) + { +- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 36); + +@@ -40,7 +41,8 @@ strong_alias (j1, j1l) + double + y1 (double x) + { +- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { +diff --git a/math/w_j1f.c b/math/w_j1f.c +index 096fdf5..29bd949 100644 +--- a/math/w_j1f.c ++++ b/math/w_j1f.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + float + j1f (float x) + { +- if (__builtin_expect (fabsf (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard_f (x, x, 136); + +@@ -37,7 +38,8 @@ j1f (float x) + float + y1f (float x) + { +- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0) ++ if (__builtin_expect (islessequal (x, 0.0f) ++ || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) +diff --git a/math/w_j1l.c b/math/w_j1l.c +index 93e4ee4..01b8551 100644 +--- a/math/w_j1l.c ++++ b/math/w_j1l.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + long double + __j1l (long double x) + { +- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* j1(|x|>X_TLOSS) */ + return __kernel_standard (x, x, 236); + +@@ -38,7 +39,8 @@ weak_alias (__j1l, j1l) + long double + __y1l (long double x) + { +- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + { + if (x < 0.0L) + { +diff --git a/math/w_jn.c b/math/w_jn.c +index f0dd8c6..fd3fb16 100644 +--- a/math/w_jn.c ++++ b/math/w_jn.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,8 @@ + double + jn (int n, double x) + { +- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + /* jn(n,|x|>X_TLOSS) */ + return __kernel_standard (n, x, 38); + +@@ -40,7 +41,8 @@ strong_alias (jn, jnl) + double + yn (int n, double x) + { +- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0) ++ && _LIB_VERSION != _IEEE_) + { + if (x < 0.0) + { +diff --git a/math/w_jnf.c b/math/w_jnf.c +index ef29eb4..36d6f6d 100644 +--- a/math/w_jnf.c ++++ b/math/w_jnf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + float + jnf (int n, float x) + { +- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0) ++ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + /* jn(n,|x|>X_TLOSS) */ + return __kernel_standard_f (n, x, 138); +@@ -38,7 +38,8 @@ jnf (int n, float x) + float + ynf (int n, float x) + { +- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0) ++ if (__builtin_expect (islessequal (x, 0.0f) ++ || isgreater (x, (float) X_TLOSS), 0) + && _LIB_VERSION != _IEEE_) + { + if (x < 0.0f) +diff --git a/math/w_log.c b/math/w_log.c +index efc1c4c..ec33605 100644 +--- a/math/w_log.c ++++ b/math/w_log.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + double + __log (double x) + { +- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { +diff --git a/math/w_log10.c b/math/w_log10.c +index 2717ade..fe799ad 100644 +--- a/math/w_log10.c ++++ b/math/w_log10.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + double + __log10 (double x) + { +- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { +diff --git a/math/w_log10f.c b/math/w_log10f.c +index 60737ca..4b821f7 100644 +--- a/math/w_log10f.c ++++ b/math/w_log10f.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + float + __log10f (float x) + { +- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0f) + { +diff --git a/math/w_log10l.c b/math/w_log10l.c +index b26f18c..0e5a137 100644 +--- a/math/w_log10l.c ++++ b/math/w_log10l.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + long double + __log10l (long double x) + { +- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { +diff --git a/math/w_log2.c b/math/w_log2.c +index 998e5d9..e58e109 100644 +--- a/math/w_log2.c ++++ b/math/w_log2.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + double + __log2 (double x) + { +- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { +diff --git a/math/w_log2f.c b/math/w_log2f.c +index 6d91bf4..6963ed2 100644 +--- a/math/w_log2f.c ++++ b/math/w_log2f.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + float + __log2f (float x) + { +- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0) + { +diff --git a/math/w_log2l.c b/math/w_log2l.c +index e51c1bc..eed04ff6c 100644 +--- a/math/w_log2l.c ++++ b/math/w_log2l.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + long double + __log2l (long double x) + { +- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { +diff --git a/math/w_logf.c b/math/w_logf.c +index 8aa27c8..38d408f 100644 +--- a/math/w_logf.c ++++ b/math/w_logf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + float + __logf (float x) + { +- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0f) + { +diff --git a/math/w_logl.c b/math/w_logl.c +index a3139ff..593b37d 100644 +--- a/math/w_logl.c ++++ b/math/w_logl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -25,7 +25,7 @@ + long double + __logl (long double x) + { +- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + { + if (x == 0.0L) + { +diff --git a/math/w_sqrt.c b/math/w_sqrt.c +index 409a6df..f6ba542 100644 +--- a/math/w_sqrt.c ++++ b/math/w_sqrt.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + double + __sqrt (double x) + { +- if (__builtin_expect (x < 0.0, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 26); /* sqrt(negative) */ + + return __ieee754_sqrt (x); +diff --git a/math/w_sqrtf.c b/math/w_sqrtf.c +index 3c3d2f8..c128e9b 100644 +--- a/math/w_sqrtf.c ++++ b/math/w_sqrtf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + float + __sqrtf (float x) + { +- if (__builtin_expect (x < 0.0f, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 126); /* sqrt(negative) */ + + return __ieee754_sqrtf (x); +diff --git a/math/w_sqrtl.c b/math/w_sqrtl.c +index 5e18f44..2a4a048 100644 +--- a/math/w_sqrtl.c ++++ b/math/w_sqrtl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -24,7 +24,7 @@ + long double + __sqrtl (long double x) + { +- if (__builtin_expect (x < 0.0L, 0) && _LIB_VERSION != _IEEE_) ++ if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 226); /* sqrt(negative) */ + + return __ieee754_sqrtl (x); +diff --git a/sysdeps/ieee754/dbl-64/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c +index 9fc21ab..5f471b1 100644 +--- a/sysdeps/ieee754/dbl-64/e_atanh.c ++++ b/sysdeps/ieee754/dbl-64/e_atanh.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -46,7 +46,7 @@ __ieee754_atanh (double x) + { + double xa = fabs (x); + double t; +- if (xa < 0.5) ++ if (isless (xa, 0.5)) + { + if (__builtin_expect (xa < 0x1.0p-28, 0)) + { +@@ -57,11 +57,11 @@ __ieee754_atanh (double x) + t = xa + xa; + t = 0.5 * __log1p (t + t * xa / (1.0 - xa)); + } +- else if (__builtin_expect (xa < 1.0, 1)) ++ else if (__builtin_expect (isless (xa, 1.0), 1)) + t = 0.5 * __log1p ((xa + xa) / (1.0 - xa)); + else + { +- if (xa > 1.0) ++ if (isgreater (xa, 1.0)) + return (x - x) / (x - x); + + return x / 0.0; +diff --git a/sysdeps/ieee754/dbl-64/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c +index ee42587..b584ed8 100644 +--- a/sysdeps/ieee754/dbl-64/w_exp.c ++++ b/sysdeps/ieee754/dbl-64/w_exp.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -28,12 +28,12 @@ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ + double + __exp (double x) + { +- if (__builtin_expect (x > o_threshold, 0)) ++ if (__builtin_expect (isgreater (x, o_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 6); + } +- else if (__builtin_expect (x < u_threshold, 0)) ++ else if (__builtin_expect (isless (x, u_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 7); +diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c +index 75ed691..7af2f6c 100644 +--- a/sysdeps/ieee754/flt-32/e_atanhf.c ++++ b/sysdeps/ieee754/flt-32/e_atanhf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -46,7 +46,7 @@ __ieee754_atanhf (float x) + { + float xa = fabsf (x); + float t; +- if (xa < 0.5f) ++ if (isless (xa, 0.5f)) + { + if (__builtin_expect (xa < 0x1.0p-28f, 0)) + { +@@ -57,11 +57,11 @@ __ieee754_atanhf (float x) + t = xa + xa; + t = 0.5f * __log1pf (t + t * xa / (1.0f - xa)); + } +- else if (__builtin_expect (xa < 1.0f, 1)) ++ else if (__builtin_expect (isless (xa, 1.0f), 1)) + t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa)); + else + { +- if (xa > 1.0f) ++ if (isgreater (xa, 1.0f)) + return (x - x) / (x - x); + + return x / 0.0f; +diff --git a/sysdeps/ieee754/flt-32/w_expf.c b/sysdeps/ieee754/flt-32/w_expf.c +index 5500872..bc3b2f6 100644 +--- a/sysdeps/ieee754/flt-32/w_expf.c ++++ b/sysdeps/ieee754/flt-32/w_expf.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -28,12 +28,12 @@ u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */ + float + __expf (float x) + { +- if (__builtin_expect (x > o_threshold, 0)) ++ if (__builtin_expect (isgreater (x, o_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 106); + } +- else if (__builtin_expect (x < u_threshold, 0)) ++ else if (__builtin_expect (isless (x, u_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard_f (x, x, 107); +diff --git a/sysdeps/ieee754/ldbl-96/w_expl.c b/sysdeps/ieee754/ldbl-96/w_expl.c +index ec9d8a7..d61c0a3 100644 +--- a/sysdeps/ieee754/ldbl-96/w_expl.c ++++ b/sysdeps/ieee754/ldbl-96/w_expl.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. ++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2011. + +@@ -30,12 +30,12 @@ u_threshold= -1.140019167866942050398521670162263001513e4; + long double + __expl (long double x) + { +- if (__builtin_expect (x > o_threshold, 0)) ++ if (__builtin_expect (isgreater (x, o_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 206); + } +- else if (__builtin_expect (x < u_threshold, 0)) ++ else if (__builtin_expect (isless (x, u_threshold), 0)) + { + if (_LIB_VERSION != _IEEE_) + return __kernel_standard (x, x, 207); diff --git a/multilib-testing/lib32-glibc/glibc-2.15-revert-netlink-cache.patch b/multilib-testing/lib32-glibc/glibc-2.15-revert-netlink-cache.patch index f35f6c5f0..87d04c794 100644 --- a/multilib-testing/lib32-glibc/glibc-2.15-revert-netlink-cache.patch +++ b/multilib-testing/lib32-glibc/glibc-2.15-revert-netlink-cache.patch @@ -1,20 +1,3 @@ -From 2a3a38c03b6e376a9bc8a1937641e5dee979bcbf Mon Sep 17 00:00:00 2001 -From: Allan McRae -Date: Sat, 4 Feb 2012 15:28:54 +1000 -Subject: [PATCH] revert stuff - ---- - include/ifaddrs.h | 5 - - inet/check_pf.c | 18 +---- - nscd/connections.c | 119 ------------------------ - nscd/nscd-client.h | 18 +---- - nscd/nscd_gethst_r.c | 23 +----- - nscd/nscd_helper.c | 10 +- - sysdeps/posix/getaddrinfo.c | 10 +- - sysdeps/unix/sysv/linux/Makefile | 2 +- - sysdeps/unix/sysv/linux/check_pf.c | 176 +++++++----------------------------- - 9 files changed, 46 insertions(+), 335 deletions(-) - diff --git a/include/ifaddrs.h b/include/ifaddrs.h index e1c6cac..50e4c48 100644 --- a/include/ifaddrs.h @@ -695,6 +678,3 @@ index 0738a70..d5ad7ea 100644 - } - } -} --- -1.7.9 - diff --git a/multilib-testing/lib32-glibc/glibc-2.15-rintf-rounding.patch b/multilib-testing/lib32-glibc/glibc-2.15-rintf-rounding.patch new file mode 100644 index 000000000..e0240ac6c --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-rintf-rounding.patch @@ -0,0 +1,158 @@ +diff --git a/math/libm-test.inc b/math/libm-test.inc +index 6243e1e..c8186c8 100644 +--- a/math/libm-test.inc ++++ b/math/libm-test.inc +@@ -5037,6 +5037,22 @@ rint_test (void) + TEST_f_f (rint, 262142.75, 262143.0); + TEST_f_f (rint, 524286.75, 524287.0); + TEST_f_f (rint, 524288.75, 524289.0); ++ TEST_f_f (rint, 1048576.75, 1048577.0); ++ TEST_f_f (rint, 2097152.75, 2097153.0); ++ TEST_f_f (rint, -1048576.75, -1048577.0); ++ TEST_f_f (rint, -2097152.75, -2097153.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0); ++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0); ++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0); ++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0); ++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0); ++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0); ++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0); ++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0); ++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0); ++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0); ++#endif + #ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); +@@ -5137,6 +5153,22 @@ rint_test_tonearest (void) + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -1.0); ++ TEST_f_f (rint, 1048576.75, 1048577.0); ++ TEST_f_f (rint, 2097152.75, 2097153.0); ++ TEST_f_f (rint, -1048576.75, -1048577.0); ++ TEST_f_f (rint, -2097152.75, -2097153.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0); ++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0); ++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0); ++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0); ++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0); ++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0); ++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0); ++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0); ++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0); ++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0); ++#endif + #ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); +@@ -5207,6 +5239,22 @@ rint_test_towardzero (void) + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -0.0); ++ TEST_f_f (rint, 1048576.75, 1048576.0); ++ TEST_f_f (rint, 2097152.75, 2097152.0); ++ TEST_f_f (rint, -1048576.75, -1048576.0); ++ TEST_f_f (rint, -2097152.75, -2097152.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (rint, 70368744177664.75, 70368744177664.0); ++ TEST_f_f (rint, 140737488355328.75, 140737488355328.0); ++ TEST_f_f (rint, 281474976710656.75, 281474976710656.0); ++ TEST_f_f (rint, 562949953421312.75, 562949953421312.0); ++ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0); ++ TEST_f_f (rint, -70368744177664.75, -70368744177664.0); ++ TEST_f_f (rint, -140737488355328.75, -140737488355328.0); ++ TEST_f_f (rint, -281474976710656.75, -281474976710656.0); ++ TEST_f_f (rint, -562949953421312.75, -562949953421312.0); ++ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0); ++#endif + #ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L); +@@ -5277,6 +5325,22 @@ rint_test_downward (void) + TEST_f_f (rint, -0.1, -1.0); + TEST_f_f (rint, -0.25, -1.0); + TEST_f_f (rint, -0.625, -1.0); ++ TEST_f_f (rint, 1048576.75, 1048576.0); ++ TEST_f_f (rint, 2097152.75, 2097152.0); ++ TEST_f_f (rint, -1048576.75, -1048577.0); ++ TEST_f_f (rint, -2097152.75, -2097153.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (rint, 70368744177664.75, 70368744177664.0); ++ TEST_f_f (rint, 140737488355328.75, 140737488355328.0); ++ TEST_f_f (rint, 281474976710656.75, 281474976710656.0); ++ TEST_f_f (rint, 562949953421312.75, 562949953421312.0); ++ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0); ++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0); ++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0); ++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0); ++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0); ++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0); ++#endif + #ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L); +@@ -5347,6 +5411,22 @@ rint_test_upward (void) + TEST_f_f (rint, -0.1, -0.0); + TEST_f_f (rint, -0.25, -0.0); + TEST_f_f (rint, -0.625, -0.0); ++ TEST_f_f (rint, 1048576.75, 1048577.0); ++ TEST_f_f (rint, 2097152.75, 2097153.0); ++ TEST_f_f (rint, -1048576.75, -1048576.0); ++ TEST_f_f (rint, -2097152.75, -2097152.0); ++#ifndef TEST_FLOAT ++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0); ++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0); ++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0); ++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0); ++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0); ++ TEST_f_f (rint, -70368744177664.75, -70368744177664.0); ++ TEST_f_f (rint, -140737488355328.75, -140737488355328.0); ++ TEST_f_f (rint, -281474976710656.75, -281474976710656.0); ++ TEST_f_f (rint, -562949953421312.75, -562949953421312.0); ++ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0); ++#endif + #ifdef TEST_LDOUBLE + /* The result can only be represented in long double. */ + TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L); +diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c +index 9ea9b6f..9ba6b57 100644 +--- a/sysdeps/ieee754/flt-32/s_rintf.c ++++ b/sysdeps/ieee754/flt-32/s_rintf.c +@@ -26,34 +26,22 @@ float + __rintf(float x) + { + int32_t i0,j0,sx; +- u_int32_t i,i1; + float w,t; + GET_FLOAT_WORD(i0,x); + sx = (i0>>31)&1; + j0 = ((i0>>23)&0xff)-0x7f; + if(j0<23) { + if(j0<0) { +- if((i0&0x7fffffff)==0) return x; +- i1 = (i0&0x07fffff); +- i0 &= 0xfff00000; +- i0 |= ((i1|-i1)>>9)&0x400000; +- SET_FLOAT_WORD(x,i0); + w = TWO23[sx]+x; + t = w-TWO23[sx]; + GET_FLOAT_WORD(i0,t); + SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31)); + return t; +- } else { +- i = (0x007fffff)>>j0; +- if((i0&i)==0) return x; /* x is integral */ +- i>>=1; +- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0); + } + } else { + if(j0==0x80) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } +- SET_FLOAT_WORD(x,i0); + w = TWO23[sx]+x; + return w-TWO23[sx]; + } diff --git a/multilib-testing/lib32-glibc/glibc-2.15-scanf.patch b/multilib-testing/lib32-glibc/glibc-2.15-scanf.patch index 7655ae5ab..a2561b232 100644 --- a/multilib-testing/lib32-glibc/glibc-2.15-scanf.patch +++ b/multilib-testing/lib32-glibc/glibc-2.15-scanf.patch @@ -1,13 +1,3 @@ -From 20b38e0301279a37a3f1e769843933bcc0d5f736 Mon Sep 17 00:00:00 2001 -From: Paul Pluzhnikov -Date: Sun, 8 Jan 2012 20:13:35 -0500 -Subject: [PATCH 1/1] sscanf always calls realloc - ---- - ChangeLog | 5 +++++ - stdio-common/vfscanf.c | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 0e71deb..e18a6c3 100644 --- a/stdio-common/vfscanf.c @@ -27,6 +17,3 @@ index 0e71deb..e18a6c3 100644 { \ wp = realloc (use_malloc ? wp : NULL, newsize); \ if (wp == NULL) \ --- -1.7.3.4 - diff --git a/multilib-testing/lib32-glibc/glibc-2.15-vdso.patch b/multilib-testing/lib32-glibc/glibc-2.15-vdso.patch new file mode 100644 index 000000000..7fd394f90 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-vdso.patch @@ -0,0 +1,40 @@ +diff --git a/elf/Makefile b/elf/Makefile +index 8234ba7..25ffc57 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -1203,3 +1203,14 @@ $(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so + $(objpfx)tst-relsort1mod2.so: $(libm) + $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \ + $(objpfx)tst-relsort1mod2.so ++ ++tests: $(objpfx)tst-unused-dep.out ++ ++$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so ++ LD_TRACE_LOADED_OBJECTS=1 \ ++ LD_DEBUG=unused \ ++ LD_PRELOAD= \ ++ $(elf-objpfx)${rtld-installed-name} \ ++ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \ ++ $< > $@ ++ cmp $@ /dev/null > /dev/null +diff --git a/elf/rtld.c b/elf/rtld.c +index 2e4f97f..3e15447 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -1,5 +1,5 @@ + /* Run time dynamic linker. +- Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc. ++ Copyright (C) 1995-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -1375,6 +1375,9 @@ of this helper program; chances are you did not intend to run this program.\n\ + _dl_setup_hash (l); + l->l_relocated = 1; + ++ /* The vDSO is always used. */ ++ l->l_used = 1; ++ + /* Initialize l_local_scope to contain just this map. This allows + the use of dl_lookup_symbol_x to resolve symbols within the vdso. + So we create a single entry list pointing to l_real as its only diff --git a/multilib-testing/lib32-glibc/glibc-2.15-vfprintf-nargs.patch b/multilib-testing/lib32-glibc/glibc-2.15-vfprintf-nargs.patch new file mode 100644 index 000000000..6a37bde68 --- /dev/null +++ b/multilib-testing/lib32-glibc/glibc-2.15-vfprintf-nargs.patch @@ -0,0 +1,174 @@ +diff --git a/stdio-common/Makefile b/stdio-common/Makefile +index a847b28..080badc 100644 +--- a/stdio-common/Makefile ++++ b/stdio-common/Makefile +@@ -59,7 +59,8 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ + tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \ + tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \ + bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \ +- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 ++ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \ ++ bug-vfprintf-nargs + + test-srcs = tst-unbputc tst-printf + +diff --git a/stdio-common/bug-vfprintf-nargs.c b/stdio-common/bug-vfprintf-nargs.c +new file mode 100644 +index 0000000..13c66c0 +--- /dev/null ++++ b/stdio-common/bug-vfprintf-nargs.c +@@ -0,0 +1,78 @@ ++/* Test for vfprintf nargs allocation overflow (BZ #13656). ++ Copyright (C) 2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Kees Cook , 2012. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int ++format_failed (const char *fmt, const char *expected) ++{ ++ char output[80]; ++ ++ printf ("%s : ", fmt); ++ ++ memset (output, 0, sizeof output); ++ /* Having sprintf itself detect a failure is good. */ ++ if (sprintf (output, fmt, 1, 2, 3, "test") > 0 ++ && strcmp (output, expected) != 0) ++ { ++ printf ("FAIL (output '%s' != expected '%s')\n", output, expected); ++ return 1; ++ } ++ puts ("ok"); ++ return 0; ++} ++ ++static int ++do_test (void) ++{ ++ int rc = 0; ++ char buf[64]; ++ ++ /* Regular positionals work. */ ++ if (format_failed ("%1$d", "1") != 0) ++ rc = 1; ++ ++ /* Regular width positionals work. */ ++ if (format_failed ("%1$*2$d", " 1") != 0) ++ rc = 1; ++ ++ /* Positional arguments are constructed via read_int, so nargs can only ++ overflow on 32-bit systems. On 64-bit systems, it will attempt to ++ allocate a giant amount of memory and possibly crash, which is the ++ expected situation. Since the 64-bit behavior is arch-specific, only ++ test this on 32-bit systems. */ ++ if (sizeof (long int) == 4) ++ { ++ sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int)); ++ if (format_failed (buf, "1 %$d") != 0) ++ rc = 1; ++ } ++ ++ return rc; ++} ++ ++#define TEST_FUNCTION do_test () ++#include "../test-skeleton.c" +diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c +index 863cd5d..022e72b 100644 +--- a/stdio-common/vfprintf.c ++++ b/stdio-common/vfprintf.c +@@ -235,6 +235,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) + 0 if unknown. */ + int readonly_format = 0; + ++ /* For the argument descriptions, which may be allocated on the heap. */ ++ void *args_malloced = NULL; ++ + /* This table maps a character into a number representing a + class. In each step there is a destination label for each + class. */ +@@ -1647,9 +1650,10 @@ do_positional: + determine the size of the array needed to store the argument + attributes. */ + size_t nargs = 0; +- int *args_type; +- union printf_arg *args_value = NULL; ++ size_t bytes_per_arg; ++ union printf_arg *args_value; + int *args_size; ++ int *args_type; + + /* Positional parameters refer to arguments directly. This could + also determine the maximum number of arguments. Track the +@@ -1698,13 +1702,33 @@ do_positional: + + /* Determine the number of arguments the format string consumes. */ + nargs = MAX (nargs, max_ref_arg); ++ bytes_per_arg = sizeof (*args_value) + sizeof (*args_size) ++ + sizeof (*args_type); ++ ++ /* Check for potential integer overflow. */ ++ if (nargs > SIZE_MAX / bytes_per_arg) ++ { ++ done = -1; ++ goto all_done; ++ } + + /* Allocate memory for the argument descriptions. */ +- args_type = alloca (nargs * sizeof (int)); ++ if (__libc_use_alloca (nargs * bytes_per_arg)) ++ args_value = alloca (nargs * bytes_per_arg); ++ else ++ { ++ args_value = args_malloced = malloc (nargs * bytes_per_arg); ++ if (args_value == NULL) ++ { ++ done = -1; ++ goto all_done; ++ } ++ } ++ ++ args_size = &args_value[nargs].pa_int; ++ args_type = &args_size[nargs]; + memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0', +- nargs * sizeof (int)); +- args_value = alloca (nargs * sizeof (union printf_arg)); +- args_size = alloca (nargs * sizeof (int)); ++ nargs * sizeof (*args_type)); + + /* XXX Could do sanity check here: If any element in ARGS_TYPE is + still zero after this loop, format is invalid. For now we +@@ -1973,8 +1997,8 @@ do_positional: + } + + all_done: +- if (__builtin_expect (workstart != NULL, 0)) +- free (workstart); ++ free (args_malloced); ++ free (workstart); + /* Unlock the stream. */ + _IO_funlockfile (s); + _IO_cleanup_region_end (0); -- cgit v1.2.3