This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, pasky/fixes, created. glibc-2.12-126-g50f8c15


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, pasky/fixes has been created
        at  50f8c1575c78bc1d9973bb22d2c0f5af2676e071 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50f8c1575c78bc1d9973bb22d2c0f5af2676e071

commit 50f8c1575c78bc1d9973bb22d2c0f5af2676e071
Author: Petr Baudis <pasky@ucw.cz>
Date:   Sun Aug 22 16:09:22 2010 +0200

    Update sunrpc licence also in LICENSES

diff --git a/ChangeLog b/ChangeLog
index 9e43e72..18b7fc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-20  Petr Baudis <pasky@suse.cz>
+
+	* LICENSES: Sync the sunrpc license.
+
 2010-08-19  Petr Baudis <pasky@suse.cz>
 
 	[BZ #11928]
diff --git a/LICENSES b/LICENSES
index b3b8899..1c99d2c 100644
--- a/LICENSES
+++ b/LICENSES
@@ -63,30 +63,34 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 The Sun RPC support (from rpcsrc-4.0) is covered by the following
 license:
 
-Copyright (C) 1984, Sun Microsystems, Inc.
-
-Sun RPC is a product of Sun Microsystems, Inc. and is provided for
-unrestricted use provided that this legend is included on all tape media
-and as a part of the software program in whole or part.  Users may copy
-or modify Sun RPC without charge, but are not authorized to license or
-distribute it to anyone else except as part of a product or program
-developed by the user.
-
-SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
-WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
-PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
-
-Sun RPC is provided with no support and without any obligation on the
-part of Sun Microsystems, Inc. to assist in its use, correction,
-modification or enhancement.
-
-SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
-INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
-OR ANY PART THEREOF.
-
-In no event will Sun Microsystems, Inc. be liable for any lost revenue
-or profits or other special, indirect and consequential damages, even if
-Sun has been advised of the possibility of such damages.
+Copyright (c) 2010, Oracle America, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials
+      provided with the distribution.
+    * Neither the name of the "Oracle America, Inc." nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 The following CMU license covers some of the support code for Mach,

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a23b81b13fafad2eb6d4af0c857401e1d5287359

commit a23b81b13fafad2eb6d4af0c857401e1d5287359
Author: Petr Baudis <pasky@ucw.cz>
Date:   Sun Aug 22 16:15:17 2010 +0200

    Make nscd load /etc/host.conf options in aicache
    
    This patch makes sure _res_hconf is initialized before resolving is being done.
    
    However, this would not be enough since nscd has its own _res_hconf due to
    nscd/res_hconf.c; _res_hconf_init() would work on different _res_hconf instance
    than the NSS routines. We just need to make sure nscd and glibc share the same
    _res_hconf instance - this should not be a problem since users should run
    matching versions of glibc and nscd anyway.

diff --git a/ChangeLog b/ChangeLog
index b29b17d..9e43e72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-19  Petr Baudis <pasky@suse.cz>
+
+	[BZ #11928]
+        * nscd/aicache.c (addhstaiX): Ensure _res_hconf has been initialized.
+        * resolv/res_hconf.c (_res_hconf): Do not redefine outside of libc.
+
 2010-08-18  Mike Frysinger  <vapier@gentoo.org>
 
 	* sysdeps/unix/sysv/linux/ia64/Makefile: Move dl-static addition to
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 3cb2208..2e92929 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -26,6 +26,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <resolv/res_hconf.h>
 
 #include "dbg_log.h"
 #include "nscd.h"
@@ -103,6 +104,8 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
 
   if (__res_maybe_init (&_res, 0) == -1)
 	    no_more = 1;
+  if (!_res_hconf.initialized)
+    _res_hconf_init ();
 
   /* If we are looking for both IPv4 and IPv6 address we don't want
      the lookup functions to automatically promote IPv4 addresses to
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index ed55bec..c79b85a 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -84,7 +84,9 @@ static const struct cmd
 };
 
 /* Structure containing the state.  */
+#ifndef NOT_IN_libc
 struct hconf _res_hconf;
+#endif
 
 /* Skip white space.  */
 static const char *

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d410f6075951e4ec0ec64850a9fabaf1c3bf2917

commit d410f6075951e4ec0ec64850a9fabaf1c3bf2917
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Aug 22 17:32:46 2010 +0200

    Make sure GLRO(dl_pagesize) is initialized properly on all archs
    
    After a recent change to __getpagesize(), GLRO(dl_pagesize) is required
    to be set.  But that is only done at app init, and shared libraries
    dlopened at runtime by static apps dont have their GLRO() state
    initialized from the linux auxvec.
    
    ia64/mips have long had similar behavior with their __getpagesize(), but
    they have a DL_STATIC_INIT hook to sync some of the static GLRO() fields
    to the dynamic GLRO() fields.  Now that common linux code requires
    GLRO(dl_pagesize) to be set, common linux code now needs that
    DL_STATIC_INIT hook.
    
    This patch takes the ia64 logic and promotes it to common code.

diff --git a/ChangeLog b/ChangeLog
index 682b721..b29b17d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-18  Mike Frysinger  <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/ia64/Makefile: Move dl-static addition to
+	sysdep vars for subdir==elf to ...
+	* sysdeps/unix/sysv/linux/Makefile: ... here.
+	* sysdeps/unix/sysv/linux/ia64/dl-static.c: Move file to ...
+	* sysdeps/unix/sysv/linux/dl-static.c: ... here.
+	* sysdeps/unix/sysv/linux/ia64/ldsodefs.h: Delete, and move the
+	DL_STATIC_INIT defines to ...
+	* sysdeps/unix/sysv/linux/ldsodefs.h: ... here.
+	* sysdeps/unix/sysv/linux/ia64/getpagesize.c: Delete.
+
 2010-05-31  Petr Baudis <pasky@suse.cz>
 
 	[BZ #10085]
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 4302bd3..37c56a3 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -147,7 +147,9 @@ sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
 endif
 
 ifeq ($(subdir),elf)
-sysdep-rtld-routines += dl-brk dl-sbrk
+sysdep-dl-routines += dl-static
+sysdep_routines += dl-static
+sysdep-rtld-routines += dl-brk dl-sbrk dl-static
 
 CPPFLAGS-lddlibc4 += -DNOT_IN_libc
 endif
diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/dl-static.c
similarity index 93%
rename from sysdeps/unix/sysv/linux/ia64/dl-static.c
rename to sysdeps/unix/sysv/linux/dl-static.c
index 4efc077..fa70811 100644
--- a/sysdeps/unix/sysv/linux/ia64/dl-static.c
+++ b/sysdeps/unix/sysv/linux/dl-static.c
@@ -1,5 +1,5 @@
-/* Variable initialization.  IA-64 version.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Variable initialization.
+   Copyright (C) 2001, 2002, 2003, 2004, 2010 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
diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile
index d9a35a7..3bb1ce0 100644
--- a/sysdeps/unix/sysv/linux/ia64/Makefile
+++ b/sysdeps/unix/sysv/linux/ia64/Makefile
@@ -12,12 +12,6 @@ sysdep_headers += sys/io.h
 sysdep_routines += ioperm clone2
 endif
 
-ifeq ($(subdir),elf)
-sysdep-dl-routines += dl-static
-sysdep_routines += $(sysdep-dl-routines)
-sysdep-rtld-routines += $(sysdep-dl-routines)
-endif
-
 ifeq ($(subdir),rt)
 librt-routines += rt-sysdep
 endif
diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c
deleted file mode 100644
index 1155dfd..0000000
--- a/sysdeps/unix/sysv/linux/ia64/getpagesize.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2004 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
-   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 <assert.h>
-#include <unistd.h>
-#include <sys/param.h>
-
-#include <ldsodefs.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Return the system page size.  The return value will depend on how
-   the kernel is configured.  A program must use this call to
-   determine the page size to ensure proper alignment for calls such
-   as mmap and friends.  --davidm 99/11/30 */
-
-int
-__getpagesize ()
-{
-  assert (GLRO(dl_pagesize) != 0);
-  return GLRO(dl_pagesize);
-}
-libc_hidden_def (__getpagesize)
-weak_alias (__getpagesize, getpagesize)
diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
deleted file mode 100644
index 31af624..0000000
--- a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Run-time dynamic linker data structures for loaded ELF shared objects. IA64.
-   Copyright (C) 2001 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
-   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.  */
-
-#ifndef	_LDSODEFS_H
-
-/* Get the real definitions.  */
-#include_next <ldsodefs.h>
-
-/* Now define our stuff.  */
-
-/* We need special support to initialize DSO loaded for statically linked
-   binaries.  */
-extern void _dl_static_init (struct link_map *map);
-#undef DL_STATIC_INIT
-#define DL_STATIC_INIT(map) _dl_static_init (map)
-
-#endif /* ldsodefs.h */
diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
index 5d5b1b4..ecb5d4f 100644
--- a/sysdeps/unix/sysv/linux/ldsodefs.h
+++ b/sysdeps/unix/sysv/linux/ldsodefs.h
@@ -36,6 +36,12 @@ extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
 /* Initialization which is normally done by the dynamic linker.  */
 extern void _dl_non_dynamic_init (void) internal_function;
 
+/* We need special support to initialize DSO loaded for statically linked
+   binaries.  */
+extern void _dl_static_init (struct link_map *map);
+#undef DL_STATIC_INIT
+#define DL_STATIC_INIT(map) _dl_static_init (map)
+
 /* We can assume that the kernel always provides the AT_UID, AT_EUID,
    AT_GID, and AT_EGID values in the auxiliary vector from 2.4.0 or so on.  */
 #if __ASSUME_AT_XID

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c0f1237f0107fd1f0860ee512084b60261280c5

commit 7c0f1237f0107fd1f0860ee512084b60261280c5
Author: Petr Baudis <pasky@ucw.cz>
Date:   Sun Aug 22 16:37:10 2010 +0200

    Fix multiple nss_compat initgroups() bugs
    
    Compat initgroups() is completely broken; the code will always set
    skip_initgroups_dyn to true, so initgroups() will never be actually
    called, but due to the nature of the code, setgrent() won't be called
    either - thus, subsequent invocations of initgroups() will not return
    the NIS group list anymore.
    
    This is a simple patch that makes sure skip_initgroups_dyn is set only
    in case initgroups is not available; it also attempts to handle the
    unavailability of other NSS interfaces better.

diff --git a/ChangeLog b/ChangeLog
index 30ffdff..682b721 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-31  Petr Baudis <pasky@suse.cz>
+
+	[BZ #10085]
+	* nis/nss_compat/compat-initgroups.c (internal_getgrent_r): Fix
+	initialization of skip_initgroups_dyn.
+
 2010-05-17  Michael Matz <matz@suse.de>
 
 	* sysdeps/x86_64/elf/initfini.c (_fini): Add unwind information.
diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c
index 07a3b92..de8d95c 100644
--- a/nis/nss_compat/compat-initgroups.c
+++ b/nis/nss_compat/compat-initgroups.c
@@ -474,18 +474,21 @@ internal_getgrent_r (ent_t *ent, char *buffer, size_t buflen, const char *user,
 	  /* If the selected module does not support getgrent_r or
 	     initgroups_dyn, abort. We cannot find the needed group
 	     entries.  */
-	  if (nss_getgrent_r == NULL && nss_initgroups_dyn == NULL)
+	  if (nss_initgroups_dyn == NULL || nss_getgrgid_r == NULL)
+	    {
+	      if (nss_setgrent != NULL)
+	        {
+		  nss_setgrent (1);
+		  ent->need_endgrent = true;
+		}
+	      ent->skip_initgroups_dyn = true;
+	    }
+
+	  if (ent->skip_initgroups_dyn && nss_getgrent_r == NULL)
 	    return NSS_STATUS_UNAVAIL;
 
 	  ent->files = false;
 
-	  if (nss_initgroups_dyn == NULL && nss_setgrent != NULL)
-	    {
-	      nss_setgrent (1);
-	      ent->need_endgrent = true;
-	    }
-	  ent->skip_initgroups_dyn = true;
-
 	  return getgrent_next_nss (ent, buffer, buflen, user, group,
 				    start, size, groupsp, limit, errnop);
 	}

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8433bbf50c2eaa2f0bf7d7d96f18afdc77a8fd73

commit 8433bbf50c2eaa2f0bf7d7d96f18afdc77a8fd73
Author: Michael Matz <matz@suse.cz>
Date:   Sun Aug 22 16:53:24 2010 +0200

    Add proper unwind information for x86_64 _fini
    
    It is impossible to reliably unwind the stack above _fini() on x86_64 since no
    unwind information is provided for it and it modifies a stack register. This
    matters for gdb backtracing - if a process crashes within a destructor, it can
    frequently be essential to look at why the program began terminating in the
    first place.

diff --git a/ChangeLog b/ChangeLog
index b7b3f65..30ffdff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-17  Michael Matz <matz@suse.de>
+
+	* sysdeps/x86_64/elf/initfini.c (_fini): Add unwind information.
+
 2010-05-12  Petr Baudis <pasky@suse.cz>
 
 	[BZ #11589]
diff --git a/sysdeps/x86_64/elf/initfini.c b/sysdeps/x86_64/elf/initfini.c
index 30161d5..dd1a4ce 100644
--- a/sysdeps/x86_64/elf/initfini.c
+++ b/sysdeps/x86_64/elf/initfini.c
@@ -44,6 +44,25 @@
    * crtn.s puts the corresponding function epilogues
    in the .init and .fini sections. */
 
+/* The unwind annotation for _fini is peculiar for good reasons:
+   (a) We need a real function that isn't constructed separately
+       (i.e. one which has a .size directive) in order to attach unwind
+       info to it.  Hence _fini is a wrapper around _real_fini, the
+       former being a normal function, the latter being the first
+       instruction of the traditional _fini.
+   (b) We must not fiddle with the stack pointer in _real_fini,
+       as we wouldn't be able to describe the effects in unwind info
+   (c) some versions of GCC have no correct unwind info for
+       __do_global_dtors_aux, meaning they can't properly restore %rbp
+       (unwinding through it is possible but later up when we next
+       need %rbp we can't access it anymore)
+       Therefore we save/restore it in _fini for uses later up the call chain.
+       But we don't make the CFA use that register (that would lead to
+       the above problem)
+   (d) We want an 16-aligned stack pointer at _real_fini.  Because of (a)
+       we can't align it in _real_fini, hence we do it in the caller by
+       subtracting 8, making in 8mod16 which the call then make 0mod16
+       again.  */
 __asm__ ("\n\
 #include \"defs.h\"\n\
 \n\
@@ -88,16 +107,28 @@ _init:\n\
 .globl _fini\n\
 	.type	_fini,@function\n\
 _fini:\n\
+	.cfi_startproc\n\
+	push	%rbp\n\
+	.cfi_def_cfa_offset 16\n\
+	.cfi_offset 6,-16\n\
 	subq	$8, %rsp\n\
+	.cfi_def_cfa_offset 24\n\
+	call	_real_fini\n\
+	addq    $8, %rsp\n\
+	.cfi_def_cfa_offset 16\n\
+	pop     %rbp\n\
+	ret\n\
+	.cfi_endproc\n\
 	ALIGN\n\
 	END_FINI\n\
+.size	_fini, .-_fini\n\
+_real_fini:\n\
 \n\
 /*@_fini_PROLOG_ENDS*/\n\
 	call	i_am_not_a_leaf@PLT\n\
 \n\
 /*@_fini_EPILOG_BEGINS*/\n\
 	.section .fini\n\
-	addq	$8, %rsp\n\
 	ret\n\
 	END_FINI\n\
 \n\

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0136375f6537677ee870e34403f26c26fba375de

commit 0136375f6537677ee870e34403f26c26fba375de
Author: Petr Baudis <pasky@ucw.cz>
Date:   Sun Aug 22 16:44:15 2010 +0200

    Fix jn() precision problems around zero points of j0()
    
    There appears to be a really nasty bug in jn() from fdlibm, which is
    the foundation for most libm implementations (including glibc libm).
    The zeroth-order j0() and first-order j1() cylindrical Bessel functions
    are used to recursively generate the jn() value, but only the zeroth-order
    Bessel function is used to normalize it; however, each of the functions
    gets highly imprecise (approaching "bogus") near its zero point, making
    the jn() value itself bogus.
    
    But in fact, the zero points of j0() and j1() never coincide, thus j1()
    should be used in case it is more precise than j0(). (That is, simply
    when its value is further from zero.)
    
    As an example, 2.4048255576957729_8 is the first zero of j0().
    The proper value as calculated by Mathematica is 0.19899990535769...
    However, jn() returns -inf on 64-bit arch, or 0.185007 on 32-bit arch.
    With the proposed patch below, the returned value is 0.199000.
    
    The fix is based on work by Steve Kargl and Tobias Burnus.

diff --git a/ChangeLog b/ChangeLog
index 491a8f3..b7b3f65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-05-12  Petr Baudis <pasky@suse.cz>
+
+	[BZ #11589]
+	* sysdeps/ieee754/dbl-64/e_jn.c: Compensate major precision loss
+	around j0() zero points by switching to j1().
+	* sysdeps/ieee754/flt-32/e_jnf.c: Likewise.
+	* sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise.
+	* sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise.
+
 2009-11-20  Petr Baudis <pasky@suse.cz>
 
 	[BZ #10851]
diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c
index bf4a13d..d9d6f91 100644
--- a/sysdeps/ieee754/dbl-64/e_jn.c
+++ b/sysdeps/ieee754/dbl-64/e_jn.c
@@ -215,7 +215,16 @@ static double zero  =  0.00000000000000000000e+00;
 			}
 	     	    }
 		}
-	    	b = (t*__ieee754_j0(x)/b);
+		/* j0() and j1() suffer enormous loss of precision at and
+		 * near zero; however, we know that their zero points never
+		 * coincide, so just choose the one further away from zero.
+		 */
+		z = __ieee754_j0 (x);
+		w = __ieee754_j1 (x);
+		if (fabs (z) >= fabs (w))
+		  b = (t * z / b);
+		else
+		  b = (t * w / a);
 	    }
 	}
 	if(sgn==1) return -b; else return b;
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index de2e53d..dd3d551 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -165,7 +165,16 @@ static float zero  =  0.0000000000e+00;
 			}
 		    }
 		}
-		b = (t*__ieee754_j0f(x)/b);
+		/* j0() and j1() suffer enormous loss of precision at and
+		 * near zero; however, we know that their zero points never
+		 * coincide, so just choose the one further away from zero.
+		 */
+		z = __ieee754_j0f (x);
+		w = __ieee754_j1f (x);
+		if (fabsf (z) >= fabsf (w))
+		  b = (t * z / b);
+		else
+		  b = (t * w / a);
 	    }
 	}
 	if(sgn==1) return -b; else return b;
diff --git a/sysdeps/ieee754/ldbl-128/e_jnl.c b/sysdeps/ieee754/ldbl-128/e_jnl.c
index a4a4e24..a7f6772 100644
--- a/sysdeps/ieee754/ldbl-128/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128/e_jnl.c
@@ -285,7 +285,16 @@ __ieee754_jnl (n, x)
 		    }
 		}
 	    }
-	  b = (t * __ieee754_j0l (x) / b);
+	  /* j0() and j1() suffer enormous loss of precision at and
+	   * near zero; however, we know that their zero points never
+	   * coincide, so just choose the one further away from zero.
+	   */
+	  z = __ieee754_j0l (x);
+	  w = __ieee754_j1l (x);
+	  if (fabsl (z) >= fabsl (w))
+	    b = (t * z / b);
+	  else
+	    b = (t * w / a);
 	}
     }
   if (sgn == 1)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
index 0eea745..372f942 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
@@ -286,7 +286,16 @@ __ieee754_jnl (n, x)
 		    }
 		}
 	    }
-	  b = (t * __ieee754_j0l (x) / b);
+	  /* j0() and j1() suffer enormous loss of precision at and
+	   * near zero; however, we know that their zero points never
+	   * coincide, so just choose the one further away from zero.
+	   */
+	  z = __ieee754_j0l (x);
+	  w = __ieee754_j1l (x);
+	  if (fabsl (z) >= fabsl (w))
+	    b = (t * z / b);
+	  else
+	    b = (t * w / a);
 	}
     }
   if (sgn == 1)
diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c
index 3d715d3..bedff7d 100644
--- a/sysdeps/ieee754/ldbl-96/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-96/e_jnl.c
@@ -281,7 +281,16 @@ __ieee754_jnl (n, x)
 		    }
 		}
 	    }
-	  b = (t * __ieee754_j0l (x) / b);
+	  /* j0() and j1() suffer enormous loss of precision at and
+	   * near zero; however, we know that their zero points never
+	   * coincide, so just choose the one further away from zero.
+	   */
+	  z = __ieee754_j0l (x);
+	  w = __ieee754_j1l (x);
+	  if (fabsl (z) >= fabsl (w))
+	    b = (t * z / b);
+	  else
+	    b = (t * w / a);
 	}
     }
   if (sgn == 1)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4db7df01a4efd2da3b6ed8eb3d05c0476ce90801

commit 4db7df01a4efd2da3b6ed8eb3d05c0476ce90801
Author: Petr Baudis <pasky@ucw.cz>
Date:   Sun Aug 22 15:50:48 2010 +0200

    Default to localhost when no nameservers are specified in resolv.conf
    
    This has been the behavior until glibc 2.9, but got broken by 905ef0da.

diff --git a/ChangeLog b/ChangeLog
index 26b3be2..491a8f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-20  Petr Baudis <pasky@suse.cz>
+
+	[BZ #10851]
+	* resolv/res_init.c (__res_vinit): Again initialize nscount to
+	one so that the default localhost nameserver record is used.
+
 2010-06-01  Jan Sembera  <jsembera@suse.cz>
 
 	[BZ #6812]
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 40dbe7d..99ef8cf 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -183,7 +183,7 @@ __res_vinit(res_state statp, int preinit) {
 #endif
 	statp->nsaddr.sin_family = AF_INET;
 	statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
-	statp->nscount = 0;
+	statp->nscount = 1;
 	statp->ndots = 1;
 	statp->pfcode = 0;
 	statp->_vcsock = -1;
@@ -420,7 +420,8 @@ __res_vinit(res_state statp, int preinit) {
 		    continue;
 		}
 	    }
-	    statp->nscount = nservall;
+	    if (nservall > 0)
+	      statp->nscount = nservall;
 #ifdef _LIBC
 	    if (nservall - nserv > 0) {
 		statp->_u._ext.nscount6 = nservall - nserv;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f2691f1a88301c64910b38c0441a55b88c743dd

commit 9f2691f1a88301c64910b38c0441a55b88c743dd
Author: Jan Sembera <jsembera@suse.cz>
Date:   Sun Aug 22 15:43:46 2010 +0200

    nscd/hstcache.c: Propagate TRY_AGAIN properly to the clients.
    
    When nscd host cache gets temporary error from nss, it should return
    temporary error instead of permanent error to the application.

diff --git a/ChangeLog b/ChangeLog
index 1a9f17a..26b3be2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-01  Jan Sembera  <jsembera@suse.cz>
+
+	[BZ #6812]
+	* nscd/hstcache.c: Propagate TRY_AGAIN properly to the clients.
+
 2010-08-19  Ulrich Drepper  <drepper@redhat.com>
 
 	* sunrpc/auth_des.c: Update copyright notice once again.
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 228f6fd..5d3fbe2 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -77,6 +77,20 @@ static const hst_response_header notfound =
 };
 
 
+/* This is the standard reply in case of temporary error */
+static const hst_response_header tryagain =
+{
+  .version = NSCD_VERSION,
+  .found = 0,
+  .h_name_len = 0,
+  .h_aliases_cnt = 0,
+  .h_addrtype = -1,
+  .h_length = -1,
+  .h_addr_list_cnt = 0,
+  .error = TRY_AGAIN
+};
+
+
 static void
 cache_addhst (struct database_dyn *db, int fd, request_header *req,
 	      const void *key, struct hostent *hst, uid_t owner,
@@ -85,6 +99,7 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
 {
   bool all_written = true;
   time_t t = time (NULL);
+  hst_response_header *errhdr;
 
   /* We allocate all data in one memory block: the iov vector,
      the response header and the dataset itself.  */
@@ -112,15 +127,20 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
 	{
 	  /* We have no data.  This means we send the standard reply for this
 	     case.  */
-	  ssize_t total = sizeof (notfound);
+	  ssize_t total = sizeof (hst_response_header);
+	  errhdr = (errval == EAGAIN) ? &tryagain : &notfound;
 
 	  if (fd != -1 &&
-	      TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+	      TEMP_FAILURE_RETRY (send (fd, errhdr, total,
 					MSG_NOSIGNAL)) != total)
 	    all_written = false;
 
-	  dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
-				   1);
+	  if (errval == EAGAIN)
+	      /* Don't store temporary resolver errors at all */
+	      dataset = NULL;
+	  else
+	      dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
+				       IDX_result_data);
 	  /* If we cannot permanently store the result, so be it.  */
 	  if (dataset != NULL)
 	    {
@@ -490,7 +510,7 @@ addhstbyX (struct database_dyn *db, int fd, request_header *req,
 	      /* We set the error to indicate this is (possibly) a
 		 temporary error and that it does not mean the entry
 		 is not available at all.  */
-	      errval = EAGAIN;
+	      h_errno = TRY_AGAIN;
 	      break;
 	    }
 	  use_malloc = true;
@@ -502,7 +522,7 @@ addhstbyX (struct database_dyn *db, int fd, request_header *req,
     }
 
   cache_addhst (db, fd, req, key, hst, uid, he, dh,
-		h_errno == TRY_AGAIN ? errval : 0, ttl);
+		h_errno == TRY_AGAIN ? EAGAIN : 0, ttl);
 
   if (use_malloc)
     free (buffer);

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]