[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r21209 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/i386/i486/ nptl/sysdeps/unix/sysv/linux/x86_64/ string/ s...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r21209 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/i386/i486/ nptl/sysdeps/unix/sysv/linux/x86_64/ string/ s...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 17 Oct 2012 00:01:56 -0000
Author: eglibc
Date: Wed Oct 17 00:01:55 2012
New Revision: 21209
Log:
Import glibc-mainline for 2012-10-17
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
fsf/trunk/libc/string/str-two-way.h
fsf/trunk/libc/sysdeps/posix/opendir.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Oct 17 00:01:55 2012
@@ -1,3 +1,15 @@
+2012-10-16 Florian Weimer <fweimer@xxxxxxxxxx>
+
+ [BZ #14700]
+ * sysdeps/posix/opendir.c (MAX_DIR_BUFFER_SIZE): New constant.
+ (__alloc_dir): Limit buffer to MAX_DIR_BUFFER_SIZE.
+
+2012-10-16 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * NEWS: Mention BZ #14716.
+ * string/str-two-way.h (two_way_short_needle): Fix thinko introduced
+ when removing AVAILABLE1_USES_J macro.
+
2012-10-12 H.J. Lu <hongjiu.lu@xxxxxxxxx>
* sysdeps/x86/bits/byteswap.h: Include <bits/types.h>.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Oct 17 00:01:55 2012
@@ -16,7 +16,7 @@
14336, 14337, 14347, 14349, 14376, 14417, 14459, 14476, 14477, 14505,
14510, 14516, 14518, 14519, 14530, 14532, 14538, 14543, 14544, 14545,
14557, 14562, 14568, 14576, 14579, 14583, 14587, 14602, 14621, 14638,
- 14645, 14648, 14652, 14660, 14661.
+ 14645, 14648, 14652, 14660, 14661, 14716.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Wed Oct 17 00:01:55 2012
@@ -1,3 +1,16 @@
+2012-10-16 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ [BZ #14652]
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__condvar_tw_cleanup): Adjust the mutex data structure if it
+ was locked by FUTEX_WAIT_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
+ (__condvar_w_cleanup): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__condvar_cleanup2): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+ (__condvar_cleanup1): Likewise.
+
2012-10-10 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
* sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Wed Oct 17 00:01:55 2012
@@ -662,7 +662,10 @@
movl (%eax), %ebx
andl $TID_MASK, %ebx
cmpl %ebx, %gs:TID
- je 9f
+ jne 8f
+ /* We managed to get the lock. Fix it up before returning. */
+ call __pthread_mutex_cond_lock_adjust
+ jmp 9f
8: call __pthread_mutex_cond_lock
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Wed Oct 17 00:01:55 2012
@@ -579,7 +579,10 @@
movl (%eax), %ebx
andl $TID_MASK, %ebx
cmpl %ebx, %gs:TID
- je 9f
+ jne 8f
+ /* We managed to get the lock. Fix it up before returning. */
+ call __pthread_mutex_cond_lock_adjust
+ jmp 9f
8: call __pthread_mutex_cond_lock
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Wed Oct 17 00:01:55 2012
@@ -784,7 +784,10 @@
movl (%rdi), %eax
andl $TID_MASK, %eax
cmpl %eax, %fs:TID
- je 8f
+ jne 7f
+ /* We managed to get the lock. Fix it up before returning. */
+ callq __pthread_mutex_cond_lock_adjust
+ jmp 8f
7: callq __pthread_mutex_cond_lock
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S Wed Oct 17 00:01:55 2012
@@ -508,7 +508,11 @@
movl (%rdi), %eax
andl $TID_MASK, %eax
cmpl %eax, %fs:TID
- je 8f
+ jne 7f
+ /* We managed to get the lock. Fix it up before returning. */
+ callq __pthread_mutex_cond_lock_adjust
+ jmp 8f
+
7: callq __pthread_mutex_cond_lock
Modified: fsf/trunk/libc/string/str-two-way.h
==============================================================================
--- fsf/trunk/libc/string/str-two-way.h (original)
+++ fsf/trunk/libc/string/str-two-way.h Wed Oct 17 00:01:55 2012
@@ -309,13 +309,13 @@
!= (haystack_char = CANON_ELEMENT (*phaystack++)))
{
RET0_IF_0 (haystack_char);
+#if !CHECK_EOL
+ ++j;
+#endif
+ continue;
+ }
+
#if CHECK_EOL
- ++j;
-#endif
- continue;
- }
-
-#if !CHECK_EOL
/* Calculate J if it wasn't kept up-to-date in the first-character
loop. */
j = phaystack - &haystack[suffix] - 1;
Modified: fsf/trunk/libc/sysdeps/posix/opendir.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/opendir.c (original)
+++ fsf/trunk/libc/sysdeps/posix/opendir.c Wed Oct 17 00:01:55 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991-1996,98,2000-2003,2005,2007,2009,2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 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
@@ -33,6 +32,11 @@
#include <not-cancel.h>
#include <kernel-features.h>
+/* The st_blksize value of the directory is used as a hint for the
+ size of the buffer which receives struct dirent values from the
+ kernel. st_blksize is limited to MAX_DIR_BUFFER_SIZE, in case the
+ file system provides a bogus value. */
+#define MAX_DIR_BUFFER_SIZE 1048576U
/* opendir() must not accidentally open something other than a directory.
Some OS's have kernel support for that, some don't. In the worst
@@ -192,8 +196,11 @@
? sizeof (struct dirent64) : BUFSIZ);
size_t allocation = default_allocation;
#ifdef _STATBUF_ST_BLKSIZE
- if (statp != NULL && default_allocation < statp->st_blksize)
- allocation = statp->st_blksize;
+ /* Increase allocation if requested, but not if the value appears to
+ be bogus. */
+ if (statp != NULL)
+ allocation = MIN (MAX ((size_t) statp->st_blksize, default_allocation),
+ MAX_DIR_BUFFER_SIZE);
#endif
DIR *dirp = (DIR *) malloc (sizeof (DIR) + allocation);
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits