]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-2_3-20050729T2336
authorRoland McGrath <roland@gnu.org>
Fri, 29 Jul 2005 23:40:08 +0000 (23:40 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 29 Jul 2005 23:40:08 +0000 (23:40 +0000)
ChangeLog
configure
fedora/branch.mk
misc/Makefile
misc/error.c
misc/tst-error1.c [new file with mode: 0644]
nptl/ChangeLog
nscd/grpcache.c
sysdeps/ieee754/flt-32/e_atan2f.c
sysdeps/s390/fpu/libm-test-ulps
sysdeps/x86_64/fpu/libm-test-ulps

index d21576710148bb4336ea0bcbb37434f04ed5c88c..5cec35b4e967b57da80842c3c8ef6d861ccd06f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2005-07-20  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #1138]
+       * sysdeps/x86_64/fpu/libm-test-ulps: Adjust expected atan2f results.
+       * sysdeps/powerpc/fpu/libm-test-ulps: Likewise.
+       * sysdeps/s390/fpu/libm-test-ulps: Likewise.
+
+2005-07-20  Bob Wilson  <bob.wilson@acm.org>
+           Darin Petkov  <darin@tensilica.com>
+
+       [BZ #1138]
+       * sysdeps/ieee754/flt-32/e_atan2f.c (pi_lo): Correct exponent value.
+
+2005-07-19  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #1137]
+       * misc/Makefile: Add rules to build and run tst-error1.
+       * misc/tst-error1.c: New file.
+       * misc/error.c: Fix memory leak and possibly endless loop.
+
+2005-07-18  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #1113]
+       * nscd/grpcache.c (cache_addgr): Use correct maximum for group ID
+       length.  Patch by Ivan Gyurdiev <ivg2@cornell.edu>.
+
 2005-07-15  Andreas Jaeger  <aj@suse.de>
 
        [BZ #1079]
index 93fff2a64d2e4f9816114eda8afc64df74b729f3..c06de4f6a4b2939b8d99009414a1af12d3397a07 100755 (executable)
--- a/configure
+++ b/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -6775,6 +6775,86 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_SELINUX 1
 _ACEOF
 
+
+  # See if we have the libaudit library
+  echo "$as_me:$LINENO: checking for audit_log_avc in -laudit" >&5
+echo $ECHO_N "checking for audit_log_avc in -laudit... $ECHO_C" >&6
+if test "${ac_cv_lib_audit_audit_log_avc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-laudit  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char audit_log_avc ();
+int
+main ()
+{
+audit_log_avc ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_audit_audit_log_avc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_audit_audit_log_avc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_avc" >&5
+echo "${ECHO_T}$ac_cv_lib_audit_audit_log_avc" >&6
+if test $ac_cv_lib_audit_audit_log_avc = yes; then
+  have_libaudit=yes
+else
+  have_libaudit=no
+fi
+
+  if test "x$have_libaudit" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBAUDIT 1
+_ACEOF
+
+  fi
+
 fi
 
 
@@ -8394,6 +8474,7 @@ s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
 s,@no_whole_archive@,$no_whole_archive,;t t
 s,@exceptions@,$exceptions,;t t
 s,@LIBGD@,$LIBGD,;t t
+s,@have_libaudit@,$have_libaudit,;t t
 s,@have_selinux@,$have_selinux,;t t
 s,@EGREP@,$EGREP,;t t
 s,@sizeof_long_double@,$sizeof_long_double,;t t
index 04bafb09c63bebec9cbb02185a88f6b740e66fa2..960d7750260270dbc8ce9db92c4ef503043baf1f 100644 (file)
@@ -3,5 +3,5 @@ glibc-branch := fedora-2_3
 glibc-base := glibc-2_3-branch
 DIST_BRANCH := FC-3
 COLLECTION := dist-fc3-updates-candidate
-fedora-2_3-sync-date := 2005-07-18 08:04 UTC
-fedora-2_3-sync-tag := fedora-glibc-2_3-20050718T0804
+fedora-2_3-sync-date := 2005-07-29 23:36 UTC
+fedora-2_3-sync-tag := fedora-glibc-2_3-20050729T2336
index 862eb1b800de39ca97802976ef4d0c5561c89832..b4c106c0cbc37a703fe52d415542359e4a40f343 100644 (file)
@@ -65,6 +65,8 @@ routines := brk sbrk sstk ioctl \
 
 distribute := device-nrs.h
 
+generated := tst-error1.mtrace tst-error1-mem
+
 include ../Makeconfig
 
 aux := init-misc
@@ -73,7 +75,11 @@ install-lib := libbsd-compat.a libg.a
 endif
 gpl2lgpl := error.c error.h
 
-tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch
+tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
+        tst-error1
+ifeq (no,$(cross-compiling))
+tests: $(objpfx)tst-error1-mem
+endif
 
 CFLAGS-tsearch.c = $(uses-callbacks)
 CFLAGS-lsearch.c = $(uses-callbacks)
@@ -106,3 +112,8 @@ endif
 ifeq ($(build-bounded),yes)
 $(objpfx)tst-tsearch-bp: $(common-objpfx)math/libm_b.a
 endif
+
+tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
+tst-error1-ARGS = $(objpfx)tst-error1.out
+$(objpfx)tst-error1-mem: $(objpfx)tst-error1.out
+       $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@
index 250158336621343d1a8ab1ed8de6faab9fd14f36..b608913faed8fb4a65f52ee92ad9773b1ade8130 100644 (file)
@@ -74,6 +74,7 @@ unsigned int error_message_count;
 
 # define program_name program_invocation_name
 # include <errno.h>
+# include <limits.h>
 # include <libio/libioP.h>
 
 /* In GNU libc we want do not want to use the common name `error' directly.
@@ -182,14 +183,15 @@ error_tail (int status, int errnum, const char *message, va_list args)
       mbstate_t st;
       size_t res;
       const char *tmp;
+      bool use_malloc = false;
 
-      do
+      while (1)
        {
-         if (len < ALLOCA_LIMIT)
+         if (__libc_use_alloca (len * sizeof (wchar_t)))
            wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
          else
            {
-             if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
+             if (!use_malloc)
                wmessage = NULL;
 
              wchar_t *p = (wchar_t *) realloc (wmessage,
@@ -201,18 +203,38 @@ error_tail (int status, int errnum, const char *message, va_list args)
                  return;
                }
              wmessage = p;
+             use_malloc = true;
            }
 
          memset (&st, '\0', sizeof (st));
          tmp = message;
+
+         res = mbsrtowcs (wmessage, &tmp, len, &st);
+         if (res != len)
+           break;
+
+         if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+           {
+             /* This really should not happen if everything is fine.  */
+             res = (size_t) -1;
+             break;
+           }
+
+         len *= 2;
        }
-      while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
 
       if (res == (size_t) -1)
-       /* The string cannot be converted.  */
-       wmessage = (wchar_t *) L"???";
+       {
+         /* The string cannot be converted.  */
+         if (use_malloc)
+           free (wmessage);
+         wmessage = (wchar_t *) L"???";
+       }
 
       __vfwprintf (stderr, wmessage, args);
+
+      if (use_malloc)
+       free (wmessage);
     }
   else
 #  endif
diff --git a/misc/tst-error1.c b/misc/tst-error1.c
new file mode 100644 (file)
index 0000000..e84843e
--- /dev/null
@@ -0,0 +1,26 @@
+#include <error.h>
+#include <mcheck.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+
+static int
+do_test (int argc, char *argv[])
+{
+  mtrace ();
+  (void) freopen (argc == 1 ? "/dev/stdout" : argv[1], "a", stderr);
+  /* Orient the stream.  */
+  fwprintf (stderr, L"hello world\n");
+  char buf[20000];
+  static const char str[] = "hello world! ";
+  for (int i = 0; i < 1000; ++i)
+    memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
+  error (0, 0, str);
+  error (0, 0, buf);
+  error (0, 0, buf);
+  error (0, 0, str);
+  return 0;
+}
+
+#define TEST_FUNCTION do_test (argc, argv)
+#include "../test-skeleton.c"
index 13ae7372bc0a452aed2ea1ae0e28543d590a1391..db8057a48e358626fe9b5d162cefab79f6f2e0fb 100644 (file)
@@ -19,6 +19,7 @@
 
 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #1075]
        * tst-cancel17.c (do_test): Add arbitrary factor to make sure
        aio_write blocks.
 
@@ -31,6 +32,7 @@
 
 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #1112]
        * pthread_create.c (__pthread_create_2_1): Rename syscall error
        variable to scerr.
 
index 7b6e223f17bce396346bfef4686a87d84f56f6e8..b6ea26b654b24ad310213efcaa50c21acb2509e1 100644 (file)
@@ -167,7 +167,7 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
       char *gr_name;
       char *cp;
       const size_t key_len = strlen (key);
-      const size_t buf_len = 3 + sizeof (grp->gr_gid) + key_len + 1;
+      const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1;
       char *buf = alloca (buf_len);
       ssize_t n;
       size_t cnt;
index 8b3398c0a3c29747cc711cc92e2585e5277e3b92..c0cafb16b8e05cb78b02c86049cbb2c840e25cea 100644 (file)
@@ -30,7 +30,7 @@ zero  = 0.0,
 pi_o_4  = 7.8539818525e-01,  /* 0x3f490fdb */
 pi_o_2  = 1.5707963705e+00,  /* 0x3fc90fdb */
 pi      = 3.1415927410e+00,  /* 0x40490fdb */
-pi_lo   = -8.7422776573e-07; /* 0xb3bbbd2e */
+pi_lo   = -8.7422776573e-08; /* 0xb3bbbd2e */
 
 #ifdef __STDC__
        float __ieee754_atan2f(float y, float x)
index cfade822a3d0f8b361781ccd1495a941cf666855..552ad4afae6241ec1463ea52a652d40e5926f208 100644 (file)
@@ -2,17 +2,14 @@
 
 # atan2
 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
 float: 1
 ifloat: 1
-Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
-float: 6
-ifloat: 6
 
 # atanh
 Test "atanh (0.75) == 0.972955074527656652552676371721589865":
@@ -664,8 +661,8 @@ idouble: 1
 
 # Maximal error of functions:
 Function: "atan2":
-float: 6
-ifloat: 6
+float: 1
+ifloat: 1
 
 Function: "atanh":
 float: 1
index b3ce8bfeee09877a105e9e0565c4c37ca0bec6bf..425549dd0ef5fa47091752e7e9821f7dcfda5cd3 100644 (file)
@@ -24,17 +24,14 @@ ldouble: 1
 
 # atan2
 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
 float: 1
 ifloat: 1
-Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
-float: 6
-ifloat: 6
 
 # atanh
 Test "atanh (0.75) == 0.972955074527656652552676371721589865":
@@ -953,8 +950,8 @@ ildouble: 1
 ldouble: 1
 
 Function: "atan2":
-float: 6
-ifloat: 6
+float: 1
+ifloat: 1
 
 Function: "atanh":
 float: 1