r3975 - in glibc-package/trunk/debian: . control.in patches patches/ia64 patches/kfreebsd
Author: aurel32
Date: 2009-11-15 12:41:56 +0000 (Sun, 15 Nov 2009)
New Revision: 3975
Added:
glibc-package/trunk/debian/patches/ia64/cvs-memchr.diff
Removed:
glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/control.in/main
glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
glibc-package/trunk/debian/patches/series
Log:
* patches/ia64/cvs-memchr.diff: new patch from upstream replacing
patches/ia64/submitted-memchr.diff.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2009-11-13 16:17:16 UTC (rev 3974)
+++ glibc-package/trunk/debian/changelog 2009-11-15 12:41:56 UTC (rev 3975)
@@ -2,8 +2,11 @@
* patches/sh4/cvs-mixed-arithmetic.diff: new patch from upstream to fix
build timeout on SH4. Closes: #552407.
+ * kfreebsd/local-sysdeps.diff: update to revision 2825 (from glibc-bsd).
+ * patches/ia64/cvs-memchr.diff: new patch from upstream replacing
+ patches/ia64/submitted-memchr.diff.
- -- Aurelien Jarno <aurel32@debian.org> Fri, 13 Nov 2009 10:26:31 +0100
+ -- Aurelien Jarno <aurel32@debian.org> Sun, 15 Nov 2009 13:41:08 +0100
eglibc (2.10.1-7) unstable; urgency=low
Modified: glibc-package/trunk/debian/control.in/main
===================================================================
--- glibc-package/trunk/debian/control.in/main 2009-11-13 16:17:16 UTC (rev 3974)
+++ glibc-package/trunk/debian/control.in/main 2009-11-15 12:41:56 UTC (rev 3975)
@@ -2,7 +2,7 @@
Section: libs
Priority: required
Build-Depends: gettext, make (>= 3.80), dpkg-dev (>= 1.15.3.1), bzip2, lzma, xz-utils, file, quilt,
- autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 5.0),
+ autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 5.0), tar (>= 1.22),
linux-libc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64],
mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386], gnumach-dev [hurd-i386], libpthread-stubs0-dev [hurd-i386],
kfreebsd-kernel-headers [kfreebsd-i386 kfreebsd-amd64],
Added: glibc-package/trunk/debian/patches/ia64/cvs-memchr.diff
===================================================================
--- glibc-package/trunk/debian/patches/ia64/cvs-memchr.diff (rev 0)
+++ glibc-package/trunk/debian/patches/ia64/cvs-memchr.diff 2009-11-15 12:41:56 UTC (rev 3975)
@@ -0,0 +1,20 @@
+2009-11-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #10162]
+ * sysdeps/ia64/memchr.S: Use a simple loop on data shorter than
+ software pipeline.
+
+diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
+index cd062b2..e721e17 100644
+--- a/sysdeps/ia64/memchr.S
++++ b/sysdeps/ia64/memchr.S
+@@ -71,7 +71,8 @@ ENTRY(__memchr)
+ cmp.ne p7, p0 = r0, r0 // clear p7
+ extr.u chr = in1, 0, 8 // chr = (unsigned char) in1
+ mov len = in2
+- cmp.gtu p6, p0 = 16, in2 // use a simple loop for short
++ // use a simple loop on data shorter than software pipeline
++ cmp.gtu p6, p0 = ((MEMLAT + 1) * 8), in2
+ (p6) br.cond.spnt .srchfew ;; // searches
+ sub loopcnt = 8, tmp // loopcnt = 8 - tmp
+ cmp.eq p6, p0 = tmp, r0
Deleted: glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff
===================================================================
--- glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff 2009-11-13 16:17:16 UTC (rev 3974)
+++ glibc-package/trunk/debian/patches/ia64/submitted-memchr.diff 2009-11-15 12:41:56 UTC (rev 3975)
@@ -1,26 +0,0 @@
-2009-11-09 H.J. Lu <hongjiu.lu@intel.com>
-
- PR libc/10162
- * sysdeps/ia64/memchr.S: Properly recover from shorter read.
-
---- a/sysdeps/ia64/memchr.S
-+++ b/sysdeps/ia64/memchr.S
-@@ -126,7 +126,16 @@ ENTRY(__memchr)
- br.ret.sptk.many b0
-
- .recovery:
-- adds ret0 = -((MEMLAT + 1) * 8), ret0;;
-+#if MEMLAT != 6
-+# error "MEMLAT must be 6!"
-+#endif
-+(p[MEMLAT-6]) add ret0 = -8, ret0;;
-+(p[MEMLAT-5]) add ret0 = -8, ret0;;
-+(p[MEMLAT-4]) add ret0 = -8, ret0;;
-+(p[MEMLAT-3]) add ret0 = -8, ret0;;
-+(p[MEMLAT-2]) add ret0 = -8, ret0;;
-+(p[MEMLAT-1]) add ret0 = -8, ret0;;
-+(p[MEMLAT]) add ret0 = -8, ret0;;
- (p[MEMLAT+1]) add ret0 = -8, ret0;;
- (p[MEMLAT+2]) add ret0 = -8, ret0;;
- .l4:
-
Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-11-13 16:17:16 UTC (rev 3974)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-11-15 12:41:56 UTC (rev 3975)
@@ -3359,7 +3359,7 @@
+
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/fcntl.h
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,180 @@
+/* O_*, F_*, FD_* bit values for FreeBSD.
+ Copyright (C) 1991-1992, 1997, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -3439,6 +3439,18 @@
+#define FWRITE 2
+#endif
+
++#ifdef __USE_ATFILE
++# define AT_FDCWD -100 /* Special value used to indicate
++ the *at functions should use the
++ current working directory. */
++# define AT_EACCESS 0x100 /* Test access permitted for
++ effective IDs, not real IDs. */
++# define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symbolic links. */
++# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
++# define AT_REMOVEDIR 0x800 /* Remove directory instead of
++ unlinking file. */
++#endif
++
+/*
+ * We are out of bits in f_flag (which is a short). However,
+ * the flag bits not set in FMASK are only meaningful in the
@@ -8310,7 +8322,7 @@
+#endif
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/faccessat.c
-@@ -0,0 +1,164 @@
+@@ -0,0 +1,172 @@
+/* Test for access to file, relative to open directory. Linux version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -8381,6 +8393,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -8388,6 +8401,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -8399,7 +8419,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -8477,7 +8497,7 @@
+stub_warning(faccessat)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fchmodat.c
-@@ -0,0 +1,131 @@
+@@ -0,0 +1,139 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -8548,6 +8568,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -8555,6 +8576,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -8566,7 +8594,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -8611,7 +8639,7 @@
+stub_warning(fchmodat)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fchownat.c
-@@ -0,0 +1,130 @@
+@@ -0,0 +1,138 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -8681,6 +8709,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -8688,6 +8717,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -8699,7 +8735,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -9246,7 +9282,7 @@
+/* 'ftruncate64' is the same as 'ftruncate', because __off64_t == __off_t. */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/futimesat.c
-@@ -0,0 +1,131 @@
+@@ -0,0 +1,139 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -9314,6 +9350,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -9321,6 +9358,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -9335,7 +9379,7 @@
+ if (file == NULL)
+ kf_buf = alloca (kf_len);
+ else
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
@@ -9478,7 +9522,7 @@
+hidden_def (__fxstat64)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat.c
-@@ -0,0 +1,151 @@
+@@ -0,0 +1,159 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -9567,6 +9611,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -9574,6 +9619,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -9585,7 +9637,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -9632,7 +9684,7 @@
+stub_warning(fstatat)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat64.c
-@@ -0,0 +1,145 @@
+@@ -0,0 +1,153 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -9715,6 +9767,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -9722,6 +9775,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -9733,7 +9793,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -14663,7 +14723,7 @@
+#endif /* ldsodefs.h */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linkat.c
-@@ -0,0 +1,172 @@
+@@ -0,0 +1,182 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -14736,6 +14796,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t fromlen, tolen;
+
+ if ((fromfd < 0) || (tofd < 0))
+ {
@@ -14743,6 +14804,15 @@
+ return -1;
+ }
+
++ fromlen = strlen (from);
++ tolen = strlen (to);
++ if (__builtin_expect (fromlen == 0, 0)
++ || __builtin_expect (tolen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -14779,7 +14849,7 @@
+ return -1;
+ }
+
-+ buf = alloca (strlen (kf->kf_path) + strlen (from) + 2);
++ buf = alloca (strlen (kf->kf_path) + fromlen + 2);
+ strcpy(buf, kf->kf_path);
+ strcat (buf, "/");
+ strcat (buf, from);
@@ -14814,7 +14884,7 @@
+ return -1;
+ }
+
-+ buf = alloca (strlen (kf->kf_path) + strlen (to) + 2);
++ buf = alloca (strlen (kf->kf_path) + tolen + 2);
+ strcpy(buf, kf->kf_path);
+ strcat (buf, "/");
+ strcat (buf, to);
@@ -15581,7 +15651,7 @@
+hidden_def (__lxstat64)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mkdirat.c
-@@ -0,0 +1,119 @@
+@@ -0,0 +1,127 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -15643,6 +15713,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -15650,6 +15721,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -15661,7 +15739,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -18078,7 +18156,7 @@
+strong_alias (__open_2, __open64_2)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/openat.c
-@@ -0,0 +1,296 @@
+@@ -0,0 +1,312 @@
+/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -18148,6 +18226,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -18155,6 +18234,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -18166,7 +18252,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -18256,6 +18342,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -18263,6 +18350,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -18274,7 +18368,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -18876,7 +18970,7 @@
+weak_alias (__readdir64_r, readdir64_r)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readlinkat.c
-@@ -0,0 +1,123 @@
+@@ -0,0 +1,131 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -18940,6 +19034,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t pathlen;
+
+ if (fd < 0)
+ {
@@ -18947,6 +19042,13 @@
+ return -1;
+ }
+
++ pathlen = strlen (path);
++ if (__builtin_expect (pathlen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -18958,7 +19060,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (path));
++ kf_buf = alloca (kf_len + pathlen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -19205,7 +19307,7 @@
+LIBC_CANCEL_HANDLED (); /* in __libc_recvfrom */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/renameat.c
-@@ -0,0 +1,165 @@
+@@ -0,0 +1,174 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -19270,6 +19372,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t old_filelen, new_filelen;
+
+ if ((oldfd < 0) || (newfd < 0))
+ {
@@ -19277,6 +19380,14 @@
+ return -1;
+ }
+
++ old_filelen = strlen (old);
++ if (__builtin_expect (old_filelen == 0, 0)
++ || __builtin_expect (new_filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -19313,7 +19424,7 @@
+ return -1;
+ }
+
-+ buf = alloca (strlen (kf->kf_path) + strlen (old) + 2);
++ buf = alloca (strlen (kf->kf_path) + old_filelen + 2);
+ strcpy(buf, kf->kf_path);
+ strcat (buf, "/");
+ strcat (buf, old);
@@ -19348,7 +19459,7 @@
+ return -1;
+ }
+
-+ buf = alloca (strlen (kf->kf_path) + strlen (new) + 2);
++ buf = alloca (strlen (kf->kf_path) + new_filelen + 2);
+ strcpy(buf, kf->kf_path);
+ strcat (buf, "/");
+ strcat (buf, new);
@@ -20892,7 +21003,7 @@
+#include <misc/stty.c>
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/symlinkat.c
-@@ -0,0 +1,119 @@
+@@ -0,0 +1,127 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -20954,6 +21065,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t tolen;
+
+ if (tofd < 0)
+ {
@@ -20961,6 +21073,13 @@
+ return -1;
+ }
+
++ tolen = strlen (to);
++ if (__builtin_expect (tolen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -20972,7 +21091,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (to));
++ kf_buf = alloca (kf_len + tolen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -21012,6 +21131,7 @@
+#endif
+}
+stub_warning(symlinkat)
+Binary files null/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/.syscall.h.swp and b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/.syscall.h.swp differ
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/kd.h
@@ -0,0 +1,25 @@
@@ -21481,7 +21601,7 @@
+#endif /* _SYS_MOUNT_H */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/param.h
-@@ -0,0 +1,237 @@
+@@ -0,0 +1,238 @@
+/* Copyright (C) 1995,1996,1997,2000,2001,2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -21524,6 +21644,7 @@
+
+/* Some inet code expects that this file defines the 'u_int32_t' type. */
+#include <sys/types.h>
++#include <stdint.h>
+
+/*
+ * Machine-independent constants (some used in following include files).
@@ -23377,7 +23498,7 @@
+libc_hidden_def (uname)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/unlinkat.c
-@@ -0,0 +1,128 @@
+@@ -0,0 +1,136 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -23446,6 +23567,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -23453,6 +23575,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -23464,7 +23593,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
@@ -27021,7 +27150,7 @@
+weak_alias (__xmknod, _xmknod)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/xmknodat.c
-@@ -0,0 +1,138 @@
+@@ -0,0 +1,146 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -27100,6 +27229,7 @@
+ int mib[4];
+ size_t kf_len = 0;
+ char *kf_buf, *kf_bufp;
++ size_t filelen;
+
+ if (fd < 0)
+ {
@@ -27107,6 +27237,13 @@
+ return -1;
+ }
+
++ filelen = strlen (file);
++ if (__builtin_expect (filelen == 0, 0))
++ {
++ __set_errno (ENOENT);
++ return -1;
++ }
++
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_FILEDESC;
@@ -27118,7 +27255,7 @@
+ return -1;
+ }
+
-+ kf_buf = alloca (kf_len + strlen (file));
++ kf_buf = alloca (kf_len + filelen);
+ if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
+ {
+ __set_errno (ENOSYS);
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2009-11-13 16:17:16 UTC (rev 3974)
+++ glibc-package/trunk/debian/patches/series 2009-11-15 12:41:56 UTC (rev 3975)
@@ -112,7 +112,7 @@
ia64/submitted-sysconf.diff
ia64/submitted-libm.diff
ia64/submitted-siginfo.diff
-ia64/submitted-memchr.diff
+ia64/cvs-memchr.diff
i386/local-biarch.diff
i386/local-clone.diff
Reply to: