From 2d7ae2107d3713981a66011ec62d094e32ec46fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 May 2004 19:25:38 +0000 Subject: [PATCH] Update. * sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention rt-sysdep. * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file. --- ChangeLog | 4 +++ libidn/ChangeLog | 6 +++++ libidn/idna.c | 2 ++ libidn/stringprep.c | 2 +- libidn/stringprep.h | 10 +++---- linuxthreads/ChangeLog | 6 +++++ linuxthreads/tst-stack1.c | 33 ++++++++++++------------ nptl/ChangeLog | 4 +++ nptl/tst-stack3.c | 7 +++-- sysdeps/unix/sysv/linux/ia64/Makefile | 4 +++ sysdeps/unix/sysv/linux/ia64/rt-sysdep.S | 1 + 11 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/ia64/rt-sysdep.S diff --git a/ChangeLog b/ChangeLog index c246a2ce98..68e09e8986 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-04-22 David Mosberger + * sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention + rt-sysdep. + * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file. + * sysdeps/ia64/strcat.c: New file. * sysdeps/ia64/strcat.S: Delete. diff --git a/libidn/ChangeLog b/libidn/ChangeLog index 17e00a6113..045a1e604c 100644 --- a/libidn/ChangeLog +++ b/libidn/ChangeLog @@ -1,3 +1,9 @@ +2004-04-22 Simon Josefsson + + * stringprep.h: Update to latest libidn version. + * stringprep.c: Likewise. + * idna.c: Likewise. + 2004-03-14 Ulrich Drepper * idn-stub.c (__idna_to_unicode_lzlz): Use __strchrnul, not strchrnul. diff --git a/libidn/idna.c b/libidn/idna.c index 69c928fc42..bf692c029b 100644 --- a/libidn/idna.c +++ b/libidn/idna.c @@ -778,6 +778,8 @@ idna_to_unicode_lzlz (const char *input, char **output, int flags) * @IDNA_ICONV_ERROR: Could not convert string in locale encoding. * @IDNA_MALLOC_ERROR: Could not allocate buffer (this is typically a * fatal error). + * @IDNA_DLOPEN_ERROR: Could not dlopen the libcidn DSO (only used + * internally in libc). * * Enumerated return codes of idna_to_ascii_4i(), * idna_to_unicode_44i() functions (and functions derived from those diff --git a/libidn/stringprep.c b/libidn/stringprep.c index 357f9e924f..1841b36178 100644 --- a/libidn/stringprep.c +++ b/libidn/stringprep.c @@ -42,7 +42,7 @@ stringprep_find_character_in_table (uint32_t ucs4, mostly interested in having someone give real-world benchmark on the impact of libidn.) */ - for (i = 0; table[i].start; i++) + for (i = 0; table[i].start || table[i].end; i++) if (ucs4 >= table[i].start && ucs4 <= (table[i].end ? table[i].end : table[i].start)) return i; diff --git a/libidn/stringprep.h b/libidn/stringprep.h index 5f504e8e81..dcc30b3d46 100644 --- a/libidn/stringprep.h +++ b/libidn/stringprep.h @@ -1,5 +1,5 @@ /* stringprep.h Header file for stringprep functions. -*- c -*- - * Copyright (C) 2002, 2003 Simon Josefsson + * Copyright (C) 2002, 2003, 2004 Simon Josefsson * * This file is part of GNU Libidn. * @@ -29,13 +29,9 @@ extern "C" #include /* size_t */ #include /* ssize_t */ -#ifdef _LIBC -# include -#else -# include /* uint32_t */ -#endif +#include /* uint32_t */ -#define STRINGPREP_VERSION "0.4.1" +#define STRINGPREP_VERSION "0.4.3" /* Error codes. */ typedef enum diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 5840521e28..44cfa9edc2 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,9 @@ +2004-05-04 Jakub Jelinek + + * tst-stack1.c: Don't include mcheck.h. + (do_test): Make sure user defined stacks aren't reused, + don't free them at the end. [BZ #110] + 2004-05-02 Jakub Jelinek * manager.c: Include not-cancel.h. diff --git a/linuxthreads/tst-stack1.c b/linuxthreads/tst-stack1.c index fa9aeddd9c..057bfa3f9f 100644 --- a/linuxthreads/tst-stack1.c +++ b/linuxthreads/tst-stack1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -17,11 +17,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Test whether pthread_create/pthread_join with user defined stacks - doesn't leak memory. */ +/* Test pthread_create/pthread_join with user defined stacks. */ #include -#include #include #include #include @@ -37,13 +35,13 @@ tf (void *p) return NULL; } +#define N 16 + static int do_test (void) { - mtrace (); - void *stack; - int res = posix_memalign (&stack, getpagesize (), 4 * PTHREAD_STACK_MIN); + int res = posix_memalign (&stack, getpagesize (), N * 4 * PTHREAD_STACK_MIN); if (res) { printf ("malloc failed %s\n", strerror (res)); @@ -54,15 +52,17 @@ do_test (void) pthread_attr_init (&attr); int result = 0; - res = pthread_attr_setstack (&attr, stack, 4 * PTHREAD_STACK_MIN); - if (res) + for (int i = 0; i < N; ++i) { - printf ("pthread_attr_setstack failed %d\n", res); - result = 1; - } + res = pthread_attr_setstack (&attr, stack + i * 4 * PTHREAD_STACK_MIN, + 4 * PTHREAD_STACK_MIN); + if (res) + { + printf ("pthread_attr_setstack failed %d\n", res); + result = 1; + continue; + } - for (int i = 0; i < 16; ++i) - { /* Create the thread. */ pthread_t th; res = pthread_create (&th, &attr, tf, NULL); @@ -84,13 +84,12 @@ do_test (void) pthread_attr_destroy (&attr); - if (seen != 16) + if (seen != N) { - printf ("seen %d != 16\n", seen); + printf ("seen %d != %d\n", seen, N); result = 1; } - free (stack); return result; } diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 11b282a090..7e3de56ec7 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2004-05-04 Jakub Jelinek + + * tst-stack3.c: Note testing functionality beyond POSIX. + 2004-05-04 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD): diff --git a/nptl/tst-stack3.c b/nptl/tst-stack3.c index fa9aeddd9c..d99e1eacf1 100644 --- a/nptl/tst-stack3.c +++ b/nptl/tst-stack3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -18,7 +18,10 @@ 02111-1307 USA. */ /* Test whether pthread_create/pthread_join with user defined stacks - doesn't leak memory. */ + doesn't leak memory. + NOTE: this tests functionality beyond POSIX. In POSIX user defined + stacks cannot be ever freed once used by pthread_create nor they can + be reused for other thread. */ #include #include diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile index 6ede14a8f4..d9a35a7c67 100644 --- a/sysdeps/unix/sysv/linux/ia64/Makefile +++ b/sysdeps/unix/sysv/linux/ia64/Makefile @@ -18,6 +18,10 @@ sysdep_routines += $(sysdep-dl-routines) sysdep-rtld-routines += $(sysdep-dl-routines) endif +ifeq ($(subdir),rt) +librt-routines += rt-sysdep +endif + # This is a crude attempt to silence the compiler which complains about # then 'current' definition in the kernel headers. CPPFLAGS += -D_ASM_IA64_CURRENT_H diff --git a/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S b/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S new file mode 100644 index 0000000000..f966bf1e59 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S @@ -0,0 +1 @@ +#include