2004-09-30 Ulrich Drepper <drepper@redhat.com>
+ * posix/Makefile: Add rules to build and run bug-glob1.
+ * posix/bug-glob1.c: New file.
+
+ * iconv/iconv_prog.c (main): Print progress information to stderr.
+
* nscd/nscd.c (termination_handler): Reset timestamp so that
clients immediately stop using the database.
# This file is updated automatically by Makefile.
glibc-branch := fedora
glibc-base := HEAD
-fedora-sync-date := 2004-09-30 08:38 UTC
-fedora-sync-tag := fedora-glibc-20040930T0838
+fedora-sync-date := 2004-10-01 11:34 UTC
+fedora-sync-tag := fedora-glibc-20041001T1134
-%define glibcrelease 61
+%define glibcrelease 62
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define prelinkarches noarch
%define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64
%endif
%changelog
+* Fri Oct 1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-62
+- update from CVS
+ - fix NPTL pthread_mutex_timedwait on i386/x86_64 (BZ #417)
+
* Thu Sep 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-61
- update from CVS
- some nscd fixes (#134193)
int fd, ret;
if (verbose)
- printf ("%s:\n", argv[remaining]);
+ fprintf (stderr, "%s:\n", argv[remaining]);
if (strcmp (argv[remaining], "-") == 0)
fd = 0;
else
+2004-10-01 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+ (__lll_mutex_timedlock_wait): I woken but cannot get the lock,
+ make sure 2 is stored in the futex and we looked at the old value.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+ (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
+ which might very well made the code not working at all before.
+ [BZ #417]
+
2004-09-28 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
ENTER_KERNEL
movl %eax, %ecx
-8:
+8: /* NB: %edx == 2 */
xorl %eax, %eax
- movl $2, %edx
LOCK
cmpxchgl %edx, (%ebx)
/* Check whether the time expired. */
7: cmpl $-ETIMEDOUT, %ecx
je 5f
+
+ /* Make sure the current holder knows we are going to sleep. */
+ movl %edx, %eax
+ xchgl %eax, (%ebx)
+ testl %eax, %eax
+ jz 6b
jmp 1b
3: movl $EINVAL, %eax
movq %rsp, %rdi
xorq %rsi, %rsi
movq $VSYSCALL_ADDR_vgettimeofday, %rax
- /* This is a regular function call, all calleer-save registers
+ /* This is a regular function call, all caller-save registers
might be clobbered. */
callq *%rax
syscall
movq %rax, %rcx
- movl $1, %eax
+8: /* NB: %edx == 2 */
+ xorl %eax, %eax
LOCK
cmpxchgl %edx, (%rdi)
jnz 7f
- movl $2, (%rdi)
- xorl %eax, %eax
-
-8: addq $16, %rsp
+6: addq $16, %rsp
popq %r14
popq %r13
popq %r12
/* Check whether the time expired. */
7: cmpq $-ETIMEDOUT, %rcx
je 5f
+
+ /* Make sure the current holder knows we are going to sleep. */
+ movl %edx, %eax
+ xchgl %eax, (%ebx)
+ testl %eax, %eax
+ jz 6b
jmp 1b
3: movl $EINVAL, %eax
retq
5: movl $ETIMEDOUT, %eax
- jmp 8b
+ jmp 6b
.size __lll_mutex_timedlock_wait,.-__lll_mutex_timedlock_wait
#endif
bug-regex21 bug-regex22 bug-regex23 tst-nice tst-nanosleep \
transbug tst-rxspencer tst-pcre tst-boost \
bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \
- tst-getaddrinfo2
+ tst-getaddrinfo2 bug-glob1
xtests := bug-ga2
ifeq (yes,$(build-shared))
test-srcs := globtest
tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
tst-pcre-ARGS = PCRE.tests
tst-boost-ARGS = BOOST.tests
+bug-glob1-ARGS = "$(objpfx)"
testcases.h: TESTS TESTS2C.sed
sed -f TESTS2C.sed < $< > $@T
--- /dev/null
+/* Test case for globbing dangling symlink. By Ulrich Drepper. */
+#include <errno.h>
+#include <error.h>
+#include <glob.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+static void prepare (int argc, char *argv[]);
+#define PREPARE prepare
+static int do_test (void);
+#define TEST_FUNCTION do_test ()
+
+#include "../test-skeleton.c"
+
+
+static char *fname;
+
+static void
+prepare (int argc, char *argv[])
+{
+ if (argc < 2)
+ error (EXIT_FAILURE, 0, "missing argument");
+
+ size_t len = strlen (argv[1]);
+ static const char ext[] = "globXXXXXX";
+ fname = malloc (len + 1 + sizeof (ext));
+ if (fname == NULL)
+ error (EXIT_FAILURE, errno, "cannot create temp file");
+ strcpy (stpcpy (stpcpy (fname, argv[1]), "/"), ext);
+ fname = mktemp (fname);
+ if (fname == NULL || *fname == '\0')
+ error (EXIT_FAILURE, errno, "cannot create temp file name");
+ if (symlink ("bug-glob1-does-not-exist", fname) != 0)
+ error (EXIT_FAILURE, errno, "cannot create symlink");
+ add_temp_file (fname);
+}
+
+
+static int
+do_test (void)
+{
+ glob_t gl;
+ int retval = 0;
+ int e;
+
+ e = glob (fname, 0, NULL, &gl);
+ if (e == 0)
+ {
+ printf ("glob(\"%s\") succeeded\n", fname);
+ retval = 1;
+ }
+ globfree (&gl);
+
+ size_t fnamelen = strlen (fname);
+ char buf[fnamelen + 2];
+
+ strcpy (buf, fname);
+ buf[fnamelen - 1] = '?';
+ e = glob (buf, 0, NULL, &gl);
+ if (e == 0)
+ {
+ printf ("glob(\"%s\") succeeded\n", buf);
+ retval = 1;
+ }
+ globfree (&gl);
+
+ strcpy (buf, fname);
+ buf[fnamelen] = '*';
+ buf[fnamelen + 1] = '\0';
+ e = glob (buf, 0, NULL, &gl);
+ if (e == 0)
+ {
+ printf ("glob(\"%s\") succeeded\n", buf);
+ retval = 1;
+ }
+ globfree (&gl);
+
+ return retval;
+}