[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r10440 - in /branches/eglibc-2_11/libc: ChangeLog sysdeps/ia64/memchr.S sysdeps/unix/sysv/linux/getsysstats.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r10440 - in /branches/eglibc-2_11/libc: ChangeLog sysdeps/ia64/memchr.S sysdeps/unix/sysv/linux/getsysstats.c
- From: joseph@xxxxxxxxxx
- Date: Tue, 11 May 2010 20:50:23 -0000
Author: joseph
Date: Tue May 11 13:50:23 2010
New Revision: 10440
Log:
Merge changes between r9737 and r10439 from /fsf/glibc-2_11-branch.
Modified:
branches/eglibc-2_11/libc/ChangeLog
branches/eglibc-2_11/libc/sysdeps/ia64/memchr.S
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getsysstats.c
Modified: branches/eglibc-2_11/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_11/libc/ChangeLog (original)
+++ branches/eglibc-2_11/libc/ChangeLog Tue May 11 13:50:23 2010
@@ -1,3 +1,15 @@
+2010-02-05 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #11230]
+ * sysdeps/ia64/memchr.S: Don't read beyond the last byte
+ during recovery.
+
+2010-03-25 Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getsysstats.c (next_line): Remove
+ redundant and incorrect else block which overwrites current line
+ with the partial next line.
+
2010-01-14 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #11127]
Modified: branches/eglibc-2_11/libc/sysdeps/ia64/memchr.S
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/ia64/memchr.S (original)
+++ branches/eglibc-2_11/libc/sysdeps/ia64/memchr.S Tue May 11 13:50:23 2010
@@ -47,7 +47,7 @@
#define saved_lc r16
#define chr r17
#define len r18
-#define pos0 r20
+#define last r20
#define val r21
#define tmp r24
#define chrx8 r25
@@ -67,6 +67,7 @@
mov saved_pr = pr // save the predicates
.body
mov ret0 = str
+ add last = str, in2 // last byte
and tmp = 7, str // tmp = str % 8
cmp.ne p7, p0 = r0, r0 // clear p7
extr.u chr = in1, 0, 8 // chr = (unsigned char) in1
@@ -143,7 +144,10 @@
ld8 tmp = [ret0];; // load the first unchecked 8byte
xor aux[1] = tmp, chrx8;;
czx1.r poschr[1] = aux[1];;
- cmp.ne p7, p0 = 8, poschr[1]
+ cmp.ne p7, p0 = 8, poschr[1];;
+(p7) add ret0 = addr[MEMLAT+2], poschr[1];;
+(p7) cmp.geu p6, p7 = ret0, last // don't go over the last byte
+(p6) br.cond.spnt .notfound;;
(p7) br.cond.spnt .foundit;;
adds ret0 = 8, ret0 // load the next unchecked 8byte
br.sptk .l4;;
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getsysstats.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getsysstats.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/getsysstats.c Tue May 11 13:50:23 2010
@@ -1,5 +1,5 @@
/* Determine various system internal values, Linux version.
- Copyright (C) 1996-2003, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2003,2006,2007,2009,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
@@ -117,18 +117,6 @@
if (nl == NULL)
nl = *re - 1;
}
- else if (nl + 5 >= *re)
- {
- memmove (buffer, nl, *re - nl);
- *re = buffer + (*re - nl);
- nl = *cp = buffer;
-
- ssize_t n = read_not_cancel (fd, *re, buffer_end - *re);
- if (n < 0)
- return NULL;
-
- *re += n;
- }
*cp = nl + 1;
assert (*cp <= *re);