Hello community, here is the log from the commit of package glibc for openSUSE:Factory checked in at 2014-02-28 16:22:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/glibc (Old) and /work/SRC/openSUSE:Factory/.glibc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc" Changes: -------- --- /work/SRC/openSUSE:Factory/glibc/glibc-testsuite.changes 2014-02-13 06:45:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.glibc.new/glibc-testsuite.changes 2014-02-28 16:22:49.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Feb 26 09:03:25 UTC 2014 - [email protected] + +- sin-sign.patch: Fix sign of input to bsloww1 (BZ #16623) +- pldd-wait-ptrace-stop.patch: Update from upstream + +------------------------------------------------------------------- +Mon Feb 24 11:38:41 UTC 2014 - [email protected] + +- nss-dns-memleak.patch: fix memory leak in nss-dns (bnc#863499) +- Don't build glibc-{extra,info,i18ndata,obsolete} and nscd for i686 + +------------------------------------------------------------------- @@ -22,0 +35 @@ +- ppc64le-abilist.patch: Removed glibc-utils.changes: same change glibc.changes: same change New: ---- nss-dns-memleak.patch sin-sign.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glibc-testsuite.spec ++++++ --- /var/tmp/diff_new_pack.JhmcZI/_old 2014-02-28 16:22:50.000000000 +0100 +++ /var/tmp/diff_new_pack.JhmcZI/_new 2014-02-28 16:22:50.000000000 +0100 @@ -50,7 +50,7 @@ %endif %define __filter_GLIBC_PRIVATE 1 -%if %_target_cpu == "i686" +%ifarch i686 # For i686 let's only build what's different from i586, so # no need to build documentation %define build_profile 1 @@ -146,7 +146,7 @@ Requires: glibc = %{version} %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if %_target_cpu == "i686" +%ifarch i686 # We need to avoid to have only the src rpm from i686 on the media, # since it does not work on other architectures. NoSource: 0 @@ -229,12 +229,16 @@ ### # Patches from upstream ### +# PATCH-FIX-UPSTREAM fix memory leak in nss_dns +Patch1000: nss-dns-memleak.patch +# PATCH-FIX-UPSTREAM Fix sign of input to bsloww1 (BZ #16623) +Patch1001: sin-sign.patch +# PATCH-FIX-UPSTREAM Fix pldd not to leave process stopped after detaching +Patch1002: pldd-wait-ptrace-stop.patch ### # Patches awaiting upstream approval ### -# PATCH-FIX-UPSTREAM Fix pldd not to leave process stopped after detaching -Patch2019: pldd-wait-ptrace-stop.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -435,7 +439,9 @@ %patch304 -p1 %patch306 -p1 -%patch2019 -p1 +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 %patch3000 @@ -802,7 +808,7 @@ # Prepare obsolete/, used only on some architectures: export RPM_BUILD_ROOT -%ifarch %ix86 +%ifarch i586 mkdir -p %{buildroot}/%{_lib}/obsolete %endif @@ -871,9 +877,13 @@ # libNoVersion belongs only to glibc-obsolete: %ifarch %ix86 - rm -f %{buildroot}%{_libdir}/libNoVersion* - mkdir -p %{buildroot}/%{_lib}/obsolete/noversion - mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/ +rm -f %{buildroot}%{_libdir}/libNoVersion* +%ifarch i586 +mkdir -p %{buildroot}/%{_lib}/obsolete/noversion +mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/ +%else +rm -f %{buildroot}/%{_lib}/libNoVersion* +%endif %endif # Don't look at ldd! We don't wish a /bin/sh requires @@ -916,6 +926,16 @@ rm -f %{buildroot}%{_mandir}/man1/mtrace.* rm -rf %{buildroot}%{_libdir}/audit +%ifarch i686 +# Remove files from glibc-{extra,info,i18ndata} and nscd +rm -rf %{buildroot}%{_infodir} %{buildroot}%{_prefix}/share/i18n +rm -f %{buildroot}%{_bindir}/makedb %{buildroot}/var/lib/misc/Makefile +rm -f %{buildroot}/etc/*nscd* %{buildroot}%{_sbindir}/*nscd* +rm -rf %{buildroot}/usr/lib/systemd +rm -rf %{buildroot}/usr/lib/tmpfiles.d +rm -rf %{buildroot}/var/run/nscd +%endif # i686 + %endif # %{normal_build} %if %{utils_build} @@ -1134,8 +1154,7 @@ %{_sbindir}/glibc_post_upgrade %{_sbindir}/iconvconfig -%ifarch %ix86 - +%ifarch i586 %files obsolete %defattr (755,root,root,755) %dir /%{_lib}/obsolete/ @@ -1192,6 +1211,7 @@ %{_libdir}/librt.a %{_libdir}/libutil.a +%ifnarch i686 %files info %defattr(-,root,root) %doc %{_infodir}/libc.info.gz @@ -1222,6 +1242,7 @@ %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts +%endif # !i686 %if %{build_profile} %files profile @@ -1241,10 +1262,12 @@ %{_libdir}/libdl_p.a %endif +%ifnarch i686 %files extra %defattr(-,root,root) %{_bindir}/makedb /var/lib/misc/Makefile +%endif # !i686 %endif # %{normal_build} glibc-utils.spec: same change ++++++ glibc.spec ++++++ --- /var/tmp/diff_new_pack.JhmcZI/_old 2014-02-28 16:22:50.000000000 +0100 +++ /var/tmp/diff_new_pack.JhmcZI/_new 2014-02-28 16:22:50.000000000 +0100 @@ -50,7 +50,7 @@ %endif %define __filter_GLIBC_PRIVATE 1 -%if %_target_cpu == "i686" +%ifarch i686 # For i686 let's only build what's different from i586, so # no need to build documentation %define build_profile 1 @@ -146,7 +146,7 @@ Requires: glibc = %{version} %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if %_target_cpu == "i686" +%ifarch i686 # We need to avoid to have only the src rpm from i686 on the media, # since it does not work on other architectures. NoSource: 0 @@ -229,12 +229,16 @@ ### # Patches from upstream ### +# PATCH-FIX-UPSTREAM fix memory leak in nss_dns +Patch1000: nss-dns-memleak.patch +# PATCH-FIX-UPSTREAM Fix sign of input to bsloww1 (BZ #16623) +Patch1001: sin-sign.patch +# PATCH-FIX-UPSTREAM Fix pldd not to leave process stopped after detaching +Patch1002: pldd-wait-ptrace-stop.patch ### # Patches awaiting upstream approval ### -# PATCH-FIX-UPSTREAM Fix pldd not to leave process stopped after detaching -Patch2019: pldd-wait-ptrace-stop.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -435,7 +439,9 @@ %patch304 -p1 %patch306 -p1 -%patch2019 -p1 +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 %patch3000 @@ -802,7 +808,7 @@ # Prepare obsolete/, used only on some architectures: export RPM_BUILD_ROOT -%ifarch %ix86 +%ifarch i586 mkdir -p %{buildroot}/%{_lib}/obsolete %endif @@ -871,9 +877,13 @@ # libNoVersion belongs only to glibc-obsolete: %ifarch %ix86 - rm -f %{buildroot}%{_libdir}/libNoVersion* - mkdir -p %{buildroot}/%{_lib}/obsolete/noversion - mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/ +rm -f %{buildroot}%{_libdir}/libNoVersion* +%ifarch i586 +mkdir -p %{buildroot}/%{_lib}/obsolete/noversion +mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/ +%else +rm -f %{buildroot}/%{_lib}/libNoVersion* +%endif %endif # Don't look at ldd! We don't wish a /bin/sh requires @@ -916,6 +926,16 @@ rm -f %{buildroot}%{_mandir}/man1/mtrace.* rm -rf %{buildroot}%{_libdir}/audit +%ifarch i686 +# Remove files from glibc-{extra,info,i18ndata} and nscd +rm -rf %{buildroot}%{_infodir} %{buildroot}%{_prefix}/share/i18n +rm -f %{buildroot}%{_bindir}/makedb %{buildroot}/var/lib/misc/Makefile +rm -f %{buildroot}/etc/*nscd* %{buildroot}%{_sbindir}/*nscd* +rm -rf %{buildroot}/usr/lib/systemd +rm -rf %{buildroot}/usr/lib/tmpfiles.d +rm -rf %{buildroot}/var/run/nscd +%endif # i686 + %endif # %{normal_build} %if %{utils_build} @@ -1134,8 +1154,7 @@ %{_sbindir}/glibc_post_upgrade %{_sbindir}/iconvconfig -%ifarch %ix86 - +%ifarch i586 %files obsolete %defattr (755,root,root,755) %dir /%{_lib}/obsolete/ @@ -1192,6 +1211,7 @@ %{_libdir}/librt.a %{_libdir}/libutil.a +%ifnarch i686 %files info %defattr(-,root,root) %doc %{_infodir}/libc.info.gz @@ -1222,6 +1242,7 @@ %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts +%endif # !i686 %if %{build_profile} %files profile @@ -1241,10 +1262,12 @@ %{_libdir}/libdl_p.a %endif +%ifnarch i686 %files extra %defattr(-,root,root) %{_bindir}/makedb /var/lib/misc/Makefile +%endif # !i686 %endif # %{normal_build} ++++++ nss-dns-memleak.patch ++++++ 2014-02-18 Andreas Schwab <[email protected]> [BZ #16574] * resolv/res_send.c (send_vc): Add parameter ansp2_malloced. Store non-zero if the second buffer was newly allocated. (send_dg): Likewise. (__libc_res_nsend): Add parameter ansp2_malloced and pass it down to send_vc and send_dg. (res_nsend): Pass NULL for ansp2_malloced. * resolv/res_query.c (__libc_res_nquery): Add parameter answerp2_malloced and pass it down to __libc_res_nsend. (res_nquery): Pass additional NULL to __libc_res_nquery. (__libc_res_nsearch): Add parameter answerp2_malloced and pass it down to __libc_res_nquery and __libc_res_nquerydomain. Deallocate second answer buffer if answerp2_malloced was set. (res_nsearch): Pass additional NULL to __libc_res_nsearch. (__libc_res_nquerydomain): Add parameter answerp2_malloced and pass it down to __libc_res_nquery. (res_nquerydomain): Pass additional NULL to __libc_res_nquerydomain. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Pass additional NULL to __libc_res_nsend and __libc_res_nquery. * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): Pass additional NULL to __libc_res_nsearch. (_nss_dns_gethostbyname4_r): Revert last change. Use new parameter of __libc_res_nsearch to check for separately allocated second buffer. (_nss_dns_gethostbyaddr2_r): Pass additional NULL to __libc_res_nquery. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Pass additional NULL to __libc_res_nquery. * resolv/gethnamaddr.c (gethostbyname2): Pass additional NULL to __libc_res_nsearch. (gethostbyaddr): Pass additional NULL to __libc_res_nquery. * include/resolv.h: Update prototypes of __libc_res_nquery, __libc_res_nsearch, __libc_res_nsend. 2014-02-13 Andreas Schwab <[email protected]> [BZ #16574] * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname4_r): Free the second answer buffer if it was separately allocated. Index: glibc-2.19/include/resolv.h =================================================================== --- glibc-2.19.orig/include/resolv.h +++ glibc-2.19/include/resolv.h @@ -48,11 +48,11 @@ libc_hidden_proto (__res_randomid) libc_hidden_proto (__res_state) int __libc_res_nquery (res_state, const char *, int, int, u_char *, int, - u_char **, u_char **, int *, int *); + u_char **, u_char **, int *, int *, int *); int __libc_res_nsearch (res_state, const char *, int, int, u_char *, int, - u_char **, u_char **, int *, int *); + u_char **, u_char **, int *, int *, int *); int __libc_res_nsend (res_state, const u_char *, int, const u_char *, int, - u_char *, int, u_char **, u_char **, int *, int *) + u_char *, int, u_char **, u_char **, int *, int *, int *) attribute_hidden; libresolv_hidden_proto (_sethtent) Index: glibc-2.19/resolv/gethnamaddr.c =================================================================== --- glibc-2.19.orig/resolv/gethnamaddr.c +++ glibc-2.19/resolv/gethnamaddr.c @@ -621,7 +621,7 @@ gethostbyname2(name, af) buf.buf = origbuf = (querybuf *) alloca (1024); if ((n = __libc_res_nsearch(&_res, name, C_IN, type, buf.buf->buf, 1024, - &buf.ptr, NULL, NULL, NULL)) < 0) { + &buf.ptr, NULL, NULL, NULL, NULL)) < 0) { if (buf.buf != origbuf) free (buf.buf); Dprintf("res_nsearch failed (%d)\n", n); @@ -716,12 +716,12 @@ gethostbyaddr(addr, len, af) buf.buf = orig_buf = (querybuf *) alloca (1024); n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf, 1024, - &buf.ptr, NULL, NULL, NULL); + &buf.ptr, NULL, NULL, NULL, NULL); if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0) { strcpy(qp, "ip6.int"); n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf, buf.buf != orig_buf ? MAXPACKET : 1024, - &buf.ptr, NULL, NULL, NULL); + &buf.ptr, NULL, NULL, NULL, NULL); } if (n < 0) { if (buf.buf != orig_buf) Index: glibc-2.19/resolv/nss_dns/dns-canon.c =================================================================== --- glibc-2.19.orig/resolv/nss_dns/dns-canon.c +++ glibc-2.19/resolv/nss_dns/dns-canon.c @@ -62,7 +62,7 @@ _nss_dns_getcanonname_r (const char *nam { int r = __libc_res_nquery (&_res, name, ns_c_in, qtypes[i], buf, sizeof (buf), &ansp.ptr, NULL, NULL, - NULL); + NULL, NULL); if (r > 0) { /* We need to decode the response. Just one question record. Index: glibc-2.19/resolv/nss_dns/dns-host.c =================================================================== --- glibc-2.19.orig/resolv/nss_dns/dns-host.c +++ glibc-2.19/resolv/nss_dns/dns-host.c @@ -190,7 +190,7 @@ _nss_dns_gethostbyname3_r (const char *n host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024); n = __libc_res_nsearch (&_res, name, C_IN, type, host_buffer.buf->buf, - 1024, &host_buffer.ptr, NULL, NULL, NULL); + 1024, &host_buffer.ptr, NULL, NULL, NULL, NULL); if (n < 0) { switch (errno) @@ -225,7 +225,7 @@ _nss_dns_gethostbyname3_r (const char *n n = __libc_res_nsearch (&_res, name, C_IN, T_A, host_buffer.buf->buf, host_buffer.buf != orig_host_buffer ? MAXPACKET : 1024, &host_buffer.ptr, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL); if (n < 0) { @@ -308,12 +308,13 @@ _nss_dns_gethostbyname4_r (const char *n u_char *ans2p = NULL; int nans2p = 0; int resplen2 = 0; + int ans2p_malloced = 0; int olderr = errno; enum nss_status status; int n = __libc_res_nsearch (&_res, name, C_IN, T_UNSPEC, host_buffer.buf->buf, 2048, &host_buffer.ptr, - &ans2p, &nans2p, &resplen2); + &ans2p, &nans2p, &resplen2, &ans2p_malloced); if (n < 0) { switch (errno) @@ -352,6 +353,10 @@ _nss_dns_gethostbyname4_r (const char *n resplen2, name, pat, buffer, buflen, errnop, herrnop, ttlp); + /* Check whether ans2p was separately allocated. */ + if (ans2p_malloced) + free (ans2p); + if (host_buffer.buf != orig_host_buffer) free (host_buffer.buf); @@ -460,7 +465,7 @@ _nss_dns_gethostbyaddr2_r (const void *a strcpy (qp, "].ip6.arpa"); n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf, 1024, &host_buffer.ptr, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL); if (n >= 0) goto got_it_already; } @@ -481,14 +486,14 @@ _nss_dns_gethostbyaddr2_r (const void *a } n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf, - 1024, &host_buffer.ptr, NULL, NULL, NULL); + 1024, &host_buffer.ptr, NULL, NULL, NULL, NULL); if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0) { strcpy (qp, "ip6.int"); n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf, host_buffer.buf != orig_host_buffer ? MAXPACKET : 1024, &host_buffer.ptr, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL); } if (n < 0) { Index: glibc-2.19/resolv/nss_dns/dns-network.c =================================================================== --- glibc-2.19.orig/resolv/nss_dns/dns-network.c +++ glibc-2.19/resolv/nss_dns/dns-network.c @@ -129,7 +129,7 @@ _nss_dns_getnetbyname_r (const char *nam net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024); anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf, - 1024, &net_buffer.ptr, NULL, NULL, NULL); + 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL); if (anslen < 0) { /* Nothing found. */ @@ -205,7 +205,7 @@ _nss_dns_getnetbyaddr_r (uint32_t net, i net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024); anslen = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf, - 1024, &net_buffer.ptr, NULL, NULL, NULL); + 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL); if (anslen < 0) { /* Nothing found. */ Index: glibc-2.19/resolv/res_query.c =================================================================== --- glibc-2.19.orig/resolv/res_query.c +++ glibc-2.19/resolv/res_query.c @@ -98,7 +98,7 @@ static int __libc_res_nquerydomain(res_state statp, const char *name, const char *domain, int class, int type, u_char *answer, int anslen, u_char **answerp, u_char **answerp2, int *nanswerp2, - int *resplen2); + int *resplen2, int *answerp2_malloced); /* * Formulate a normal query, send, and await answer. @@ -119,7 +119,8 @@ __libc_res_nquery(res_state statp, u_char **answerp, /* if buffer needs to be enlarged */ u_char **answerp2, int *nanswerp2, - int *resplen2) + int *resplen2, + int *answerp2_malloced) { HEADER *hp = (HEADER *) answer; HEADER *hp2; @@ -224,7 +225,8 @@ __libc_res_nquery(res_state statp, } assert (answerp == NULL || (void *) *answerp == (void *) answer); n = __libc_res_nsend(statp, query1, nquery1, query2, nquery2, answer, - anslen, answerp, answerp2, nanswerp2, resplen2); + anslen, answerp, answerp2, nanswerp2, resplen2, + answerp2_malloced); if (use_malloc) free (buf); if (n < 0) { @@ -316,7 +318,7 @@ res_nquery(res_state statp, int anslen) /* size of answer buffer */ { return __libc_res_nquery(statp, name, class, type, answer, anslen, - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL); } libresolv_hidden_def (res_nquery) @@ -335,7 +337,8 @@ __libc_res_nsearch(res_state statp, u_char **answerp, u_char **answerp2, int *nanswerp2, - int *resplen2) + int *resplen2, + int *answerp2_malloced) { const char *cp, * const *domain; HEADER *hp = (HEADER *) answer; @@ -360,7 +363,7 @@ __libc_res_nsearch(res_state statp, if (!dots && (cp = res_hostalias(statp, name, tmp, sizeof tmp))!= NULL) return (__libc_res_nquery(statp, cp, class, type, answer, anslen, answerp, answerp2, - nanswerp2, resplen2)); + nanswerp2, resplen2, answerp2_malloced)); #ifdef DEBUG if (statp->options & RES_DEBUG) @@ -377,7 +380,8 @@ __libc_res_nsearch(res_state statp, if (dots >= statp->ndots || trailing_dot) { ret = __libc_res_nquerydomain(statp, name, NULL, class, type, answer, anslen, answerp, - answerp2, nanswerp2, resplen2); + answerp2, nanswerp2, resplen2, + answerp2_malloced); if (ret > 0 || trailing_dot) return (ret); saved_herrno = h_errno; @@ -386,11 +390,11 @@ __libc_res_nsearch(res_state statp, answer = *answerp; anslen = MAXPACKET; } - if (answerp2 - && (*answerp2 < answer || *answerp2 >= answer + anslen)) + if (answerp2 && *answerp2_malloced) { free (*answerp2); *answerp2 = NULL; + *answerp2_malloced = 0; } } @@ -417,7 +421,7 @@ __libc_res_nsearch(res_state statp, class, type, answer, anslen, answerp, answerp2, nanswerp2, - resplen2); + resplen2, answerp2_malloced); if (ret > 0) return (ret); @@ -425,12 +429,11 @@ __libc_res_nsearch(res_state statp, answer = *answerp; anslen = MAXPACKET; } - if (answerp2 - && (*answerp2 < answer - || *answerp2 >= answer + anslen)) + if (answerp2 && *answerp2_malloced) { free (*answerp2); *answerp2 = NULL; + *answerp2_malloced = 0; } /* @@ -486,7 +489,8 @@ __libc_res_nsearch(res_state statp, && !(tried_as_is || root_on_list)) { ret = __libc_res_nquerydomain(statp, name, NULL, class, type, answer, anslen, answerp, - answerp2, nanswerp2, resplen2); + answerp2, nanswerp2, resplen2, + answerp2_malloced); if (ret > 0) return (ret); } @@ -498,10 +502,11 @@ __libc_res_nsearch(res_state statp, * else send back meaningless H_ERRNO, that being the one from * the last DNSRCH we did. */ - if (answerp2 && (*answerp2 < answer || *answerp2 >= answer + anslen)) + if (answerp2 && *answerp2_malloced) { free (*answerp2); *answerp2 = NULL; + *answerp2_malloced = 0; } if (saved_herrno != -1) RES_SET_H_ERRNO(statp, saved_herrno); @@ -521,7 +526,7 @@ res_nsearch(res_state statp, int anslen) /* size of answer */ { return __libc_res_nsearch(statp, name, class, type, answer, - anslen, NULL, NULL, NULL, NULL); + anslen, NULL, NULL, NULL, NULL, NULL); } libresolv_hidden_def (res_nsearch) @@ -539,7 +544,8 @@ __libc_res_nquerydomain(res_state statp, u_char **answerp, u_char **answerp2, int *nanswerp2, - int *resplen2) + int *resplen2, + int *answerp2_malloced) { char nbuf[MAXDNAME]; const char *longname = nbuf; @@ -581,7 +587,7 @@ __libc_res_nquerydomain(res_state statp, } return (__libc_res_nquery(statp, longname, class, type, answer, anslen, answerp, answerp2, nanswerp2, - resplen2)); + resplen2, answerp2_malloced)); } int @@ -593,7 +599,8 @@ res_nquerydomain(res_state statp, int anslen) /* size of answer */ { return __libc_res_nquerydomain(statp, name, domain, class, type, - answer, anslen, NULL, NULL, NULL, NULL); + answer, anslen, NULL, NULL, NULL, NULL, + NULL); } libresolv_hidden_def (res_nquerydomain) Index: glibc-2.19/resolv/res_send.c =================================================================== --- glibc-2.19.orig/resolv/res_send.c +++ glibc-2.19/resolv/res_send.c @@ -186,12 +186,12 @@ evNowTime(struct timespec *res) { static int send_vc(res_state, const u_char *, int, const u_char *, int, u_char **, int *, int *, int, u_char **, - u_char **, int *, int *); + u_char **, int *, int *, int *); static int send_dg(res_state, const u_char *, int, const u_char *, int, u_char **, int *, int *, int, int *, int *, u_char **, - u_char **, int *, int *); + u_char **, int *, int *, int *); #ifdef DEBUG static void Aerror(const res_state, FILE *, const char *, int, const struct sockaddr *); @@ -343,7 +343,7 @@ int __libc_res_nsend(res_state statp, const u_char *buf, int buflen, const u_char *buf2, int buflen2, u_char *ans, int anssiz, u_char **ansp, u_char **ansp2, - int *nansp2, int *resplen2) + int *nansp2, int *resplen2, int *ansp2_malloced) { int gotsomewhere, terrno, try, v_circuit, resplen, ns, n; @@ -546,7 +546,8 @@ __libc_res_nsend(res_state statp, const try = statp->retry; n = send_vc(statp, buf, buflen, buf2, buflen2, &ans, &anssiz, &terrno, - ns, ansp, ansp2, nansp2, resplen2); + ns, ansp, ansp2, nansp2, resplen2, + ansp2_malloced); if (n < 0) return (-1); if (n == 0 && (buf2 == NULL || *resplen2 == 0)) @@ -556,7 +557,7 @@ __libc_res_nsend(res_state statp, const n = send_dg(statp, buf, buflen, buf2, buflen2, &ans, &anssiz, &terrno, ns, &v_circuit, &gotsomewhere, ansp, - ansp2, nansp2, resplen2); + ansp2, nansp2, resplen2, ansp2_malloced); if (n < 0) return (-1); if (n == 0 && (buf2 == NULL || *resplen2 == 0)) @@ -646,7 +647,7 @@ res_nsend(res_state statp, const u_char *buf, int buflen, u_char *ans, int anssiz) { return __libc_res_nsend(statp, buf, buflen, NULL, 0, ans, anssiz, - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL); } libresolv_hidden_def (res_nsend) @@ -657,7 +658,7 @@ send_vc(res_state statp, const u_char *buf, int buflen, const u_char *buf2, int buflen2, u_char **ansp, int *anssizp, int *terrno, int ns, u_char **anscp, u_char **ansp2, int *anssizp2, - int *resplen2) + int *resplen2, int *ansp2_malloced) { const HEADER *hp = (HEADER *) buf; const HEADER *hp2 = (HEADER *) buf2; @@ -823,6 +824,8 @@ send_vc(res_state statp, } *thisanssizp = MAXPACKET; *thisansp = newp; + if (thisansp == ansp2) + *ansp2_malloced = 1; anhp = (HEADER *) newp; len = rlen; } else { @@ -992,7 +995,7 @@ send_dg(res_state statp, const u_char *buf, int buflen, const u_char *buf2, int buflen2, u_char **ansp, int *anssizp, int *terrno, int ns, int *v_circuit, int *gotsomewhere, u_char **anscp, - u_char **ansp2, int *anssizp2, int *resplen2) + u_char **ansp2, int *anssizp2, int *resplen2, int *ansp2_malloced) { const HEADER *hp = (HEADER *) buf; const HEADER *hp2 = (HEADER *) buf2; @@ -1238,6 +1241,8 @@ send_dg(res_state statp, if (newp != NULL) { *anssizp = MAXPACKET; *thisansp = ans = newp; + if (thisansp == ansp2) + *ansp2_malloced = 1; } } HEADER *anhp = (HEADER *) *thisansp; ++++++ pldd-wait-ptrace-stop.patch ++++++ --- /var/tmp/diff_new_pack.JhmcZI/_old 2014-02-28 16:22:51.000000000 +0100 +++ /var/tmp/diff_new_pack.JhmcZI/_new 2014-02-28 16:22:51.000000000 +0100 @@ -1,12 +1,13 @@ -2013-07-31 Andreas Schwab <[email protected]> +2014-02-24 Andreas Schwab <[email protected]> + [BZ #15804] * elf/pldd.c (wait_for_ptrace_stop): New function. (main): Call it after attaching. -Index: glibc-2.17.90/elf/pldd.c +Index: glibc-2.19/elf/pldd.c =================================================================== ---- glibc-2.17.90.orig/elf/pldd.c -+++ glibc-2.17.90/elf/pldd.c +--- glibc-2.19.orig/elf/pldd.c ++++ glibc-2.19/elf/pldd.c @@ -34,6 +34,7 @@ #include <unistd.h> #include <sys/ptrace.h> @@ -32,7 +33,7 @@ struct thread_list *newp = alloca (sizeof (*newp)); newp->tid = tid; newp->next = thread_list; -@@ -194,6 +198,24 @@ main (int argc, char *argv[]) +@@ -194,6 +198,27 @@ main (int argc, char *argv[]) } @@ -49,7 +50,10 @@ + /* The STOP signal should not be delivered to the tracee. */ + if (WSTOPSIG (status) == SIGSTOP) + return; -+ ptrace (PTRACE_CONT, pid, NULL, (void *) (uintptr_t) WSTOPSIG (status)); ++ if (ptrace (PTRACE_CONT, pid, NULL, ++ (void *) (uintptr_t) WSTOPSIG (status))) ++ /* The only possible error is that the process died. */ ++ return; + } +} + ++++++ sin-sign.patch ++++++ Index: glibc-2.19/sysdeps/ieee754/dbl-64/s_sin.c =================================================================== --- glibc-2.19.orig/sysdeps/ieee754/dbl-64/s_sin.c +++ glibc-2.19/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) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
