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, master, updated. glibc-2.14-463-g1760874


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, master has been updated
       via  1760874da6e4a6934751ea12cf2c06eae936b53c (commit)
       via  51d91b18954c998ccda310231f4d120f21a5fd79 (commit)
      from  b611fb810f3932d60b2952a3d7d012d875e4284d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit 1760874da6e4a6934751ea12cf2c06eae936b53c
Author: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date:   Sat Oct 29 12:24:38 2011 -0400

    Fix readlink call in ldconfig's chroot handling

diff --git a/ChangeLog b/ChangeLog
index 98db094..8e0c37c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13335]
+	* elf/chroot_canon.c (chroot_canon): Fix readlink call.
+	Patch by Thomas Jarosch <thomas.jarosch@intra2net.com>.
+
 	* string/test-strchr.c: Make usable for strchrnul testing.
 	* string/test-strchrnul.c: New file.
 	* string/Makefile (strop-tests): Add strchrnul.
diff --git a/NEWS b/NEWS
index 6063060..c9952a8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-10-27
+GNU C Library NEWS -- history of user-visible changes.  2011-10-29
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -11,7 +11,8 @@ Version 2.15
 
   6779, 6783, 9696, 11589, 12403, 12847, 12868, 12852, 12874, 12885, 12892,
   12907, 12922, 12935, 13007, 13021, 13067, 13068, 13090, 13092, 13114,
-  13118, 13123, 13134, 13138, 13150, 13179, 13192, 13268, 13291, 13344
+  13118, 13123, 13134, 13138, 13150, 13179, 13192, 13268, 13291, 13335,
+  13344
 
 * New program pldd to list loaded object of a process
   Implemented by Ulrich Drepper.
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index 54a6a4c..b639cfa 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file inside chroot.
-   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010
+   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010,2011
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -135,7 +135,7 @@ chroot_canon (const char *chroot, const char *name)
 		  goto error;
 		}
 
-	      n = readlink (rpath, buf, PATH_MAX);
+	      n = readlink (rpath, buf, PATH_MAX - 1);
 	      if (n < 0)
 		{
 		  if (*end == '\0')

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

commit 51d91b18954c998ccda310231f4d120f21a5fd79
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sat Oct 29 11:54:15 2011 -0400

    Add strchrnul performance test

diff --git a/ChangeLog b/ChangeLog
index f673202..98db094 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
 
+	* string/test-strchr.c: Make usable for strchrnul testing.
+	* string/test-strchrnul.c: New file.
+	* string/Makefile (strop-tests): Add strchrnul.
+
 	* po/it.po: Update from translation team.
 	* po/es.po: Likewise.
 
diff --git a/string/Makefile b/string/Makefile
index 109f59b..459cf81 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -50,7 +50,7 @@ strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
 		   strstr strcasestr strnlen strcasecmp strncasecmp	\
-		   strncat rawmemchr
+		   strncat rawmemchr strchrnul
 tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
 		   tst-strlen stratcliff tst-svc tst-inlcall		\
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
diff --git a/string/test-strchr.c b/string/test-strchr.c
index 3bbc2f5..a46ee82 100644
--- a/string/test-strchr.c
+++ b/string/test-strchr.c
@@ -23,7 +23,13 @@
 #include "test-string.h"
 
 #ifndef WIDE
-# define STRCHR strchr
+# ifdef USE_FOR_STRCHRNUL
+#  define STRCHR strchrnul
+#  define stupid_STRCHR stupid_STRCHRNUL
+#  define simple_STRCHR simple_STRCHRNUL
+# else
+#  define STRCHR strchr
+# endif
 # define STRLEN strlen
 # define CHAR char
 # define BIG_CHAR CHAR_MAX
@@ -41,6 +47,13 @@
 # define UCHAR wchar_t
 #endif
 
+#ifdef USE_FOR_STRCHRNUL
+# define NULLRET(endptr) endptr
+#else
+# define NULLRET(endptr) NULL
+#endif
+
+
 typedef CHAR *(*proto_t) (const CHAR *, int);
 
 CHAR *
@@ -48,7 +61,7 @@ simple_STRCHR (const CHAR *s, int c)
 {
   for (; *s != (CHAR) c; ++s)
     if (*s == '\0')
-      return NULL;
+      return NULLRET ((CHAR *) s);
   return (CHAR *) s;
 }
 
@@ -60,7 +73,7 @@ stupid_STRCHR (const CHAR *s, int c)
   while (n--)
     if (*s++ == (CHAR) c)
       return (CHAR *) s - 1;
-  return NULL;
+  return NULLRET ((CHAR *) s - 1);
 }
 
 IMPL (stupid_STRCHR, 0)
@@ -73,8 +86,8 @@ do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
   CHAR *res = CALL (impl, s, c);
   if (res != exp_res)
     {
-      error (0, 0, "Wrong result in function %s %p %p", impl->name,
-	     res, exp_res);
+      error (0, 0, "Wrong result in function %s %#x %p %p", impl->name,
+	     c, res, exp_res);
       ret = 1;
       return;
     }
@@ -129,7 +142,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
   else if (seek_char == 0)
     result = buf + align + len;
   else
-    result = NULL;
+    result = NULLRET (buf + align + len);
 
   if (HP_TIMING_AVAIL)
     printf ("Length %4zd, alignment in bytes %2zd:",
@@ -198,7 +211,7 @@ do_random_tests (void)
       else if (seek_char == 0)
 	result = (CHAR *) (p + len + align);
       else
-	result = NULL;
+	result = NULLRET ((CHAR *) (p + len + align));
 
       FOR_EACH_IMPL (impl, 1)
 	if (CALL (impl, (CHAR *) (p + align), seek_char) != result)
diff --git a/string/test-strchrnul.c b/string/test-strchrnul.c
new file mode 100644
index 0000000..9836af6
--- /dev/null
+++ b/string/test-strchrnul.c
@@ -0,0 +1,2 @@
+#define USE_FOR_STRCHRNUL 1
+#include "test-strchr.c"

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

Summary of changes:
 ChangeLog               |    8 ++++++++
 NEWS                    |    5 +++--
 elf/chroot_canon.c      |    4 ++--
 string/Makefile         |    2 +-
 string/test-strchr.c    |   27 ++++++++++++++++++++-------
 string/test-strchrnul.c |    2 ++
 6 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 string/test-strchrnul.c


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]