diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rwxr-xr-x | localedata/tst-langinfo.sh | 40 | ||||
-rw-r--r-- | nptl/pthread_create.c | 4 | ||||
-rw-r--r-- | stdlib/tst-makecontext.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/vfork.S | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/makecontext.c | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/vfork.S | 3 |
7 files changed, 60 insertions, 35 deletions
@@ -1,3 +1,16 @@ +2008-04-09 Ulrich Drepper <drepper@redhat.com> + + * stdlib/tst-makecontext.c: Change parameter to cf to negative + value to check for correct sign extension. + + [BZ #5436] + * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): + Copy 64-bit parameter values even though this is not required in + the standard. + + * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Record return + PC save. + 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com> * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Record return diff --git a/localedata/tst-langinfo.sh b/localedata/tst-langinfo.sh index 375352d..b169ade 100755 --- a/localedata/tst-langinfo.sh +++ b/localedata/tst-langinfo.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test nl_langinfo. -# Copyright (C) 2000, 2001, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2003, 2007, 2008 Free Software Foundation, Inc. # This file is part of the GNU C Library. # @@ -245,13 +245,13 @@ de_DE.UTF-8 RADIXCHAR , de_DE.UTF-8 THOUSEP . de_DE.UTF-8 YESEXPR ^[jJyY].* de_DE.UTF-8 NOEXPR ^[nN].* -fr_FR.ISO-8859-1 ABDAY_1 dim -fr_FR.ISO-8859-1 ABDAY_2 lun -fr_FR.ISO-8859-1 ABDAY_3 mar -fr_FR.ISO-8859-1 ABDAY_4 mer -fr_FR.ISO-8859-1 ABDAY_5 jeu -fr_FR.ISO-8859-1 ABDAY_6 ven -fr_FR.ISO-8859-1 ABDAY_7 sam +fr_FR.ISO-8859-1 ABDAY_1 dim. +fr_FR.ISO-8859-1 ABDAY_2 lun. +fr_FR.ISO-8859-1 ABDAY_3 mar. +fr_FR.ISO-8859-1 ABDAY_4 mer. +fr_FR.ISO-8859-1 ABDAY_5 jeu. +fr_FR.ISO-8859-1 ABDAY_6 ven. +fr_FR.ISO-8859-1 ABDAY_7 sam. fr_FR.ISO-8859-1 DAY_1 dimanche fr_FR.ISO-8859-1 DAY_2 lundi fr_FR.ISO-8859-1 DAY_3 mardi @@ -259,18 +259,18 @@ fr_FR.ISO-8859-1 DAY_4 mercredi fr_FR.ISO-8859-1 DAY_5 jeudi fr_FR.ISO-8859-1 DAY_6 vendredi fr_FR.ISO-8859-1 DAY_7 samedi -fr_FR.ISO-8859-1 ABMON_1 jan -fr_FR.ISO-8859-1 ABMON_2 fév -fr_FR.ISO-8859-1 ABMON_3 mar -fr_FR.ISO-8859-1 ABMON_4 avr +fr_FR.ISO-8859-1 ABMON_1 janv. +fr_FR.ISO-8859-1 ABMON_2 févr. +fr_FR.ISO-8859-1 ABMON_3 mars +fr_FR.ISO-8859-1 ABMON_4 avril fr_FR.ISO-8859-1 ABMON_5 mai -fr_FR.ISO-8859-1 ABMON_6 jun -fr_FR.ISO-8859-1 ABMON_7 jui -fr_FR.ISO-8859-1 ABMON_8 aoû -fr_FR.ISO-8859-1 ABMON_9 sep -fr_FR.ISO-8859-1 ABMON_10 oct -fr_FR.ISO-8859-1 ABMON_11 nov -fr_FR.ISO-8859-1 ABMON_12 déc +fr_FR.ISO-8859-1 ABMON_6 juin +fr_FR.ISO-8859-1 ABMON_7 juil. +fr_FR.ISO-8859-1 ABMON_8 août +fr_FR.ISO-8859-1 ABMON_9 sept. +fr_FR.ISO-8859-1 ABMON_10 oct. +fr_FR.ISO-8859-1 ABMON_11 nov. +fr_FR.ISO-8859-1 ABMON_12 déc. fr_FR.ISO-8859-1 MON_1 janvier fr_FR.ISO-8859-1 MON_2 février fr_FR.ISO-8859-1 MON_3 mars @@ -284,7 +284,7 @@ fr_FR.ISO-8859-1 MON_10 octobre fr_FR.ISO-8859-1 MON_11 novembre fr_FR.ISO-8859-1 MON_12 décembre fr_FR.ISO-8859-1 D_T_FMT "%a %d %b %Y %T %Z" -fr_FR.ISO-8859-1 D_FMT "%d.%m.%Y" +fr_FR.ISO-8859-1 D_FMT "%d/%m/%Y" fr_FR.ISO-8859-1 T_FMT "%T" fr_FR.ISO-8859-1 RADIXCHAR , fr_FR.ISO-8859-1 THOUSEP " " diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index e08b76a..5fcc72c 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. +/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -598,11 +598,13 @@ compat_symbol (libpthread, __pthread_create_2_0, pthread_create, /* If pthread_create is present, libgcc_eh.a and libsupc++.a expects some other POSIX thread functions to be present as well. */ PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_lock) +PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_trylock) PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_unlock) PTHREAD_STATIC_FN_REQUIRE (pthread_once) PTHREAD_STATIC_FN_REQUIRE (pthread_cancel) PTHREAD_STATIC_FN_REQUIRE (pthread_key_create) +PTHREAD_STATIC_FN_REQUIRE (pthread_key_delete) PTHREAD_STATIC_FN_REQUIRE (pthread_setspecific) PTHREAD_STATIC_FN_REQUIRE (pthread_getspecific) diff --git a/stdlib/tst-makecontext.c b/stdlib/tst-makecontext.c index 1451efa..eae5fc1 100644 --- a/stdlib/tst-makecontext.c +++ b/stdlib/tst-makecontext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007, 2008 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 @@ -28,7 +28,7 @@ __thread int thr; void cf (int i) { - if (i != 78 || thr != 94) + if (i != -78 || thr != 94) { printf ("i %d thr %d\n", i, thr); exit (1); @@ -54,7 +54,7 @@ do_test (void) ucp.uc_link = NULL; ucp.uc_stack.ss_sp = st1; ucp.uc_stack.ss_size = sizeof st1; - makecontext (&ucp, (void (*) (void)) cf, 1, 78); + makecontext (&ucp, (void (*) (void)) cf, 1, -78); if (setcontext (&ucp) != 0) { puts ("setcontext failed"); diff --git a/sysdeps/unix/sysv/linux/i386/vfork.S b/sysdeps/unix/sysv/linux/i386/vfork.S index eefd4b4..2494d9b 100644 --- a/sysdeps/unix/sysv/linux/i386/vfork.S +++ b/sysdeps/unix/sysv/linux/i386/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2004, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab <schwab@gnu.org>. @@ -34,6 +34,7 @@ ENTRY (__vfork) /* Pop the return PC value into ECX. */ popl %ecx cfi_adjust_cfa_offset (-4) + cfi_register (%eip, %ecx) #ifdef SAVE_PID SAVE_PID diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c index 5deea7d..615dede 100644 --- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c +++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 2002. @@ -78,31 +78,39 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) sp[idx_uc_link] = (unsigned long int) ucp->uc_link; va_start (ap, argc); - /* Handle arguments. */ + /* Handle arguments. + + The standard says the parameters must all be int values. This is + an historic accident and would be done differently today. For + x86-64 all integer values are passed as 64-bit values and + therefore extending the API to copy 64-bit values instead of + 32-bit ints makes sense. It does not break existing + functionality and it does not violate the standard which says + that passing non-int values means undefined behavior. */ for (i = 0; i < argc; ++i) switch (i) { case 0: - ucp->uc_mcontext.gregs [REG_RDI] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_RDI] = va_arg (ap, long int); break; case 1: - ucp->uc_mcontext.gregs [REG_RSI] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_RSI] = va_arg (ap, long int); break; case 2: - ucp->uc_mcontext.gregs [REG_RDX] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_RDX] = va_arg (ap, long int); break; case 3: - ucp->uc_mcontext.gregs [REG_RCX] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_RCX] = va_arg (ap, long int); break; case 4: - ucp->uc_mcontext.gregs [REG_R8] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_R8] = va_arg (ap, long int); break; case 5: - ucp->uc_mcontext.gregs [REG_R9] = va_arg (ap, int); + ucp->uc_mcontext.gregs[REG_R9] = va_arg (ap, long int); break; default: /* Put value on stack. */ - sp[(i - 5)] = va_arg (ap, int); + sp[i - 5] = va_arg (ap, unsigned long int); break; } va_end (ap); diff --git a/sysdeps/unix/sysv/linux/x86_64/vfork.S b/sysdeps/unix/sysv/linux/x86_64/vfork.S index 4bad388..e289656 100644 --- a/sysdeps/unix/sysv/linux/x86_64/vfork.S +++ b/sysdeps/unix/sysv/linux/x86_64/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2004, 2008 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 @@ -31,6 +31,7 @@ ENTRY (__vfork) is preserved by the syscall and that we're allowed to destroy. */ popq %rdi cfi_adjust_cfa_offset(-8) + cfi_register(%rip, %rdi) #ifdef SAVE_PID SAVE_PID |