[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r7820 - in /fsf/trunk/libc: ./ include/ localedata/ localedata/locales/ nptl/ nptl/sysdeps/unix/sysv/linux/sh/ nscd/ nss/ sy...
- To: commits@xxxxxxxxxx
- Subject: [commits] r7820 - in /fsf/trunk/libc: ./ include/ localedata/ localedata/locales/ nptl/ nptl/sysdeps/unix/sysv/linux/sh/ nscd/ nss/ sy...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 29 Jan 2009 08:03:07 -0000
Author: eglibc
Date: Thu Jan 29 00:03:06 2009
New Revision: 7820
Log:
Import glibc-mainline for 2009-01-29
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/alloca.h
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/as_IN
fsf/trunk/libc/localedata/locales/bn_BD
fsf/trunk/libc/localedata/locales/bn_IN
fsf/trunk/libc/localedata/locales/hi_IN
fsf/trunk/libc/localedata/locales/mr_IN
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
fsf/trunk/libc/nscd/connections.c
fsf/trunk/libc/nscd/mem.c
fsf/trunk/libc/nss/getent.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h
fsf/trunk/libc/sysdeps/x86_64/stackinfo.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jan 29 00:03:06 2009
@@ -1,3 +1,29 @@
+2009-01-28 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #9750]
+ * nscd/mem.c (gc): Use alloca_count to get the real stack usage.
+ * include/alloca.h (alloca_account): Define.
+ * sysdeps/x86_64/stackinfo.h (stackinfo_get_sp): Define.
+ (stackinfo_sub_sp): Define.
+
+ * nscd/connections.c (nscd_init): If database file access be
+ opened check whether this is due to permission problems and bail
+ in that case.
+
+ [BZ #9741]
+ * nscd/mem.c (gc): Fix assignment of he_data in case malloc is used.
+ Reported by Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx>.
+
+2009-01-14 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL):
+ Add "t" to clobber list.
+ (INTERNAL_SYSCALL_NCS): Likewise.
+
+2009-01-28 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * nss/getent.c (print_networks): Don't print comma between aliases.
+
2009-01-23 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/tst-clone.c (do_test): Avoid warning.
Modified: fsf/trunk/libc/include/alloca.h
==============================================================================
--- fsf/trunk/libc/include/alloca.h (original)
+++ fsf/trunk/libc/include/alloca.h Thu Jan 29 00:03:06 2009
@@ -46,4 +46,17 @@
__alloca (((len) = (newlen)))
#endif
+#if defined stackinfo_get_sp && defined stackinfo_sub_sp
+# define alloca_account(size, avar) \
+ ({ void *old__ = stackinfo_get_sp (); \
+ void *m__ = __alloca (size); \
+ avar += stackinfo_sub_sp (old__); \
+ m__; })
+#else
+# define alloca_account(size, avar) \
+ ({ size_t s__ = (size); \
+ avar += s__; \
+ __alloca (s__); })
#endif
+
+#endif
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Thu Jan 29 00:03:06 2009
@@ -1,3 +1,12 @@
+2009-01-28 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/as_IN: Break circular include loops introduced in last patch.
+ * locales/bn_BD: Likewise.
+ * locales/bn_IN: Likewise.
+ * locales/hi_IN: Likewise.
+ * locales/mr_IN: Likewise.
+ Patch by Pravin Satpute <psatpute@xxxxxxxxxx>.
+
2009-01-08 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #9701]
Modified: fsf/trunk/libc/localedata/locales/as_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/as_IN (original)
+++ fsf/trunk/libc/localedata/locales/as_IN Thu Jan 29 00:03:06 2009
@@ -32,11 +32,7 @@
%%%%%%%%%%%%%
LC_CTYPE
-copy "bn_IN"
-
-translit_start
-include "translit_combining";""
-translit_end
+copy "bn_BD"
END LC_CTYPE
%%%%%%%%%%%%%
Modified: fsf/trunk/libc/localedata/locales/bn_BD
==============================================================================
--- fsf/trunk/libc/localedata/locales/bn_BD (original)
+++ fsf/trunk/libc/localedata/locales/bn_BD Thu Jan 29 00:03:06 2009
@@ -37,7 +37,24 @@
END LC_COLLATE
LC_CTYPE
-copy "bn_IN"
+copy "i18n"
+
+% Bengali uses the alternate digits U+09E6..U+09EF
+outdigit <U09E6>..<U09EF>
+
+% This is used in the scanf family of functions to read Bengali numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U09E6>); /
+ (<U0031>,<U09E7>); /
+ (<U0032>,<U09E8>); /
+ (<U0033>,<U09E9>); /
+ (<U0034>,<U09EA>); /
+ (<U0035>,<U09EB>); /
+ (<U0036>,<U09EC>); /
+ (<U0037>,<U09ED>); /
+ (<U0038>,<U09EE>); /
+ (<U0039>,<U09EF>);
translit_start
include "translit_combining";""
Modified: fsf/trunk/libc/localedata/locales/bn_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/bn_IN (original)
+++ fsf/trunk/libc/localedata/locales/bn_IN Thu Jan 29 00:03:06 2009
@@ -34,28 +34,7 @@
LC_CTYPE
-copy "i18n"
-
-% Bengali uses the alternate digits U+09E6..U+09EF
-outdigit <U09E6>..<U09EF>
-
-% This is used in the scanf family of functions to read Bengali numbers
-% using "%Id" and such.
-map to_inpunct; /
- (<U0030>,<U09E6>); /
- (<U0031>,<U09E7>); /
- (<U0032>,<U09E8>); /
- (<U0033>,<U09E9>); /
- (<U0034>,<U09EA>); /
- (<U0035>,<U09EB>); /
- (<U0036>,<U09EC>); /
- (<U0037>,<U09ED>); /
- (<U0038>,<U09EE>); /
- (<U0039>,<U09EF>);
-
-translit_start
-include "translit_combining";""
-translit_end
+copy "bn_BD"
END LC_CTYPE
Modified: fsf/trunk/libc/localedata/locales/hi_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/hi_IN (original)
+++ fsf/trunk/libc/localedata/locales/hi_IN Thu Jan 29 00:03:06 2009
@@ -32,7 +32,24 @@
END LC_IDENTIFICATION
LC_CTYPE
-copy "mr_IN"
+copy "i18n"
+
+% Devanagari uses the alternate digits U+0966..U+096F
+outdigit <U0966>..<U096F>
+
+% This is used in the scanf family of functions to read devanagari numbers
+% using "%Id" and such.
+map to_inpunct; /
+ (<U0030>,<U0966>); /
+ (<U0031>,<U0967>); /
+ (<U0032>,<U0968>); /
+ (<U0033>,<U0969>); /
+ (<U0034>,<U096A>); /
+ (<U0035>,<U096B>); /
+ (<U0036>,<U096C>); /
+ (<U0037>,<U096D>); /
+ (<U0038>,<U096E>); /
+ (<U0039>,<U096F>);
translit_start
include "translit_combining";""
Modified: fsf/trunk/libc/localedata/locales/mr_IN
==============================================================================
--- fsf/trunk/libc/localedata/locales/mr_IN (original)
+++ fsf/trunk/libc/localedata/locales/mr_IN Thu Jan 29 00:03:06 2009
@@ -32,28 +32,7 @@
END LC_IDENTIFICATION
LC_CTYPE
-copy "i18n"
-
-% Devanagari uses the alternate digits U+0966..U+096F
-outdigit <U0966>..<U096F>
-
-% This is used in the scanf family of functions to read devanagari numbers
-% using "%Id" and such.
-map to_inpunct; /
- (<U0030>,<U0966>); /
- (<U0031>,<U0967>); /
- (<U0032>,<U0968>); /
- (<U0033>,<U0969>); /
- (<U0034>,<U096A>); /
- (<U0035>,<U096B>); /
- (<U0036>,<U096C>); /
- (<U0037>,<U096D>); /
- (<U0038>,<U096E>); /
- (<U0039>,<U096F>);
-
-translit_start
-include "translit_combining";""
-translit_end
+copy "hi_IN"
END LC_CTYPE
LC_COLLATE
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu Jan 29 00:03:06 2009
@@ -1,3 +1,11 @@
+2009-01-14 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.S
+ (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
+ instead of computing relative timeout.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
+ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
+
2009-01-25 Ulrich Drepper <drepper@xxxxxxxxxx>
* pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S Thu Jan 29 00:03:06 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007, 2008
+/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -36,6 +36,13 @@
mov #(FUTEX_WAIT | FUTEX_PRIVATE_FLAG), tmp; \
extu.b tmp, tmp; \
xor tmp, reg
+# define LOAD_FUTEX_WAIT_ABS(reg,tmp,tmp2) \
+ mov #(FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG), tmp; \
+ extu.b tmp, tmp; \
+ mov #(FUTEX_CLOCK_REALTIME >> 8), tmp2; \
+ swap.b tmp2, tmp2; \
+ or tmp2, tmp; \
+ xor tmp, reg
# define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
mov #(FUTEX_WAKE | FUTEX_PRIVATE_FLAG), tmp; \
extu.b tmp, tmp; \
@@ -95,6 +102,22 @@
xor tmp, reg ; \
and tmp2, reg ; \
mov #FUTEX_WAIT, tmp ; \
+ or tmp, reg
+# define LOAD_FUTEX_WAIT_ABS(reg,tmp,tmp2) \
+ stc gbr, tmp ; \
+ mov.w 99f, tmp2 ; \
+ add tmp2, tmp ; \
+ mov.l @tmp, tmp2 ; \
+ bra 98f ; \
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
+99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
+98: extu.b tmp, tmp ; \
+ xor tmp, reg ; \
+ and tmp2, reg ; \
+ mov #FUTEX_WAIT_BITSET, tmp ; \
+ mov #(FUTEX_CLOCK_REALTIME >> 8), tmp2; \
+ swap.b tmp2, tmp2; \
+ or tmp2, tmp; \
or tmp, reg
# endif
# define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
@@ -193,12 +216,85 @@
cfi_endproc
.size __lll_lock_wait,.-__lll_lock_wait
+ /* r5 (r8): futex
+ r7 (r11): flags
+ r6 (r9): timeout
+ r4 (r10): futex value
+ */
.globl __lll_timedlock_wait
.type __lll_timedlock_wait,@function
.hidden __lll_timedlock_wait
.align 5
cfi_startproc
__lll_timedlock_wait:
+ mov.l r12, @-r15
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset (r12, 0)
+
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+ mov.l .Lhave, r1
+# ifdef PIC
+ mova .Lgot, r0
+ mov.l .Lgot, r12
+ add r0, r12
+ add r12, r1
+# endif
+ mov.l @r1, r0
+ tst r0, r0
+ bt .Lreltmo
+# endif
+
+ mov r4, r2
+ mov r5, r4
+ mov r7, r5
+ mov r6, r7
+ LOAD_FUTEX_WAIT_ABS (r5, r0, r1)
+
+ mov #2, r6
+ cmp/eq r6, r2
+ bf/s 2f
+ mov r2, r6
+
+1:
+ mov #2, r6
+ mov #-1, r1
+ mov #SYS_futex, r3
+ extu.b r3, r3
+ trapa #0x16
+ SYSCALL_INST_PAD
+ mov r0, r6
+
+2:
+ XCHG (r2, @r4, r3) /* NB: lock is implied */
+
+ tst r3, r3
+ bt/s 3f
+ mov r6, r0
+
+ cmp/eq #-ETIMEDOUT, r0
+ bt 4f
+ cmp/eq #-EINVAL, r0
+ bf 1b
+4:
+ neg r0, r3
+3:
+ mov r3, r0
+ rts
+ mov.l @r15+, r12
+
+ .align 2
+# ifdef PIC
+.Lgot:
+ .long _GLOBAL_OFFSET_TABLE_
+.Lhave:
+ .long __have_futex_clock_realtime@GOTOFF
+# else
+.Lhave:
+ .long __have_futex_clock_realtime
+# endif
+
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+.Lreltmo:
/* Check for a valid timeout value. */
mov.l @(4,r6), r1
mov.l .L1g, r0
@@ -290,12 +386,15 @@
mov.l @r15+, r8
mov.l @r15+, r9
mov.l @r15+, r10
- rts
- mov.l @r15+, r11
+ mov.l @r15+, r11
+ rts
+ mov.l @r15+, r12
3:
+ mov.l @r15+, r12
rts
mov #EINVAL, r0
+# endif
cfi_endproc
.L1k:
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h Thu Jan 29 00:03:06 2009
@@ -1,4 +1,5 @@
-/* Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009
+ 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
@@ -37,6 +38,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
Modified: fsf/trunk/libc/nscd/connections.c
==============================================================================
--- fsf/trunk/libc/nscd/connections.c (original)
+++ fsf/trunk/libc/nscd/connections.c Thu Jan 29 00:03:06 2009
@@ -1,5 +1,5 @@
/* Inner loops of cache daemon.
- Copyright (C) 1998-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998.
@@ -647,6 +647,9 @@
if (fd != -1)
close (fd);
}
+ else if (errno == EACCES)
+ error (EXIT_FAILURE, 0, _("cannot access '%s'"),
+ dbs[cnt].db_filename);
}
if (dbs[cnt].head == NULL)
Modified: fsf/trunk/libc/nscd/mem.c
==============================================================================
--- fsf/trunk/libc/nscd/mem.c (original)
+++ fsf/trunk/libc/nscd/mem.c Thu Jan 29 00:03:06 2009
@@ -1,5 +1,5 @@
/* Cache memory handling.
- Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2004.
@@ -134,12 +134,11 @@
stack_used = 0;
size_t nmark = (db->head->first_free / BLOCK_ALIGN + BITS - 1) / BITS;
size_t memory_needed = nmark * sizeof (BITMAP_T);
- if (stack_used + memory_needed <= MAX_STACK_USE)
- {
- mark = (BITMAP_T *) alloca (memory_needed);
+ if (__builtin_expect (stack_used + memory_needed <= MAX_STACK_USE, 1))
+ {
+ mark = (BITMAP_T *) alloca_account (memory_needed, stack_used);
mark_use_malloc = false;
memset (mark, '\0', memory_needed);
- stack_used += memory_needed;
}
else
{
@@ -153,19 +152,17 @@
struct hashentry **he;
struct hashentry **he_data;
bool he_use_malloc;
- if (stack_used + memory_needed <= MAX_STACK_USE)
- {
- he = alloca (db->head->nentries * sizeof (struct hashentry *));
- he_data = alloca (db->head->nentries * sizeof (struct hashentry *));
+ if (__builtin_expect (stack_used + memory_needed <= MAX_STACK_USE, 1))
+ {
+ he = alloca_account (memory_needed, stack_used);
he_use_malloc = false;
- stack_used += memory_needed;
}
else
{
he = xmalloc (memory_needed);
- he_data = &he[db->head->nentries * sizeof (struct hashentry *)];
he_use_malloc = true;
}
+ he_data = &he[db->head->nentries];
size_t cnt = 0;
for (size_t idx = 0; idx < db->head->module; ++idx)
@@ -373,11 +370,9 @@
ref_t disp = off_alloc - off_free;
struct moveinfo *new_move;
- if (stack_used + sizeof (*new_move) <= MAX_STACK_USE)
- {
- new_move = alloca (sizeof (*new_move));
- stack_used += sizeof (*new_move);
- }
+ if (__builtin_expect (stack_used + sizeof (*new_move) <= MAX_STACK_USE,
+ 1))
+ new_move = alloca_account (sizeof (*new_move), stack_used);
else
new_move = obstack_alloc (&ob, sizeof (*new_move));
new_move->from = db->data + off_alloc;
Modified: fsf/trunk/libc/nss/getent.c
==============================================================================
--- fsf/trunk/libc/nss/getent.c (original)
+++ fsf/trunk/libc/nss/getent.c Thu Jan 29 00:03:06 2009
@@ -448,8 +448,6 @@
putchar_unlocked (' ');
fputs_unlocked (net->n_aliases[i], stdout);
++i;
- if (net->n_aliases[i] != NULL)
- putchar_unlocked (',');
}
putchar_unlocked ('\n');
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h Thu Jan 29 00:03:06 2009
@@ -1,5 +1,5 @@
/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,
- 2005,2006 Free Software Foundation, Inc.
+ 2005,2006,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@xxxxxxxxxxxxxx>, August 1995.
Changed by Kaz Kojima, <kkojima@xxxxxxxxxxxxxx>.
@@ -339,7 +339,7 @@
asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \
: "=z" (resultvar) \
: "r" (r3) ASMFMT_##nr \
- : "memory"); \
+ : "memory", "t"); \
\
(int) resultvar; })
@@ -353,7 +353,7 @@
asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \
: "=z" (resultvar) \
: "r" (r3) ASMFMT_##nr \
- : "memory"); \
+ : "memory", "t"); \
\
(int) resultvar; })
Modified: fsf/trunk/libc/sysdeps/x86_64/stackinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/stackinfo.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/stackinfo.h Thu Jan 29 00:03:06 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009 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
@@ -25,4 +25,14 @@
/* On x86_64 the stack grows down. */
#define _STACK_GROWS_DOWN 1
+/* Access to the stack pointer. The macros are used in alloca_account
+ for which they need to act as barriers as well, hence the additional
+ (unnecessary) parameters. */
+#define stackinfo_get_sp() \
+ ({ void *p__; asm volatile ("mov %%rsp, %0" : "=r" (p__)); p__; })
+#define stackinfo_sub_sp(ptr) \
+ ({ ptrdiff_t d__; \
+ asm volatile ("sub %%rsp, %0" : "=r" (d__) : "0" (ptr)); \
+ d__; })
+
#endif /* stackinfo.h */