From 121ee94aa6af104ed33a83bc573739a6f2c02f54 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 7 Jan 2016 23:34:46 +0100 Subject: NPTL: fix infinite recursion fix infinite recursion on application exit triggered by linking libc before libpthread. Patch from OpenWrt. Reported-by: Leonid Lisovskiy --- libpthread/nptl/cleanup_defer_compat.c | 8 ++++---- libpthread/nptl/init.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libpthread/nptl') diff --git a/libpthread/nptl/cleanup_defer_compat.c b/libpthread/nptl/cleanup_defer_compat.c index 64ecb1334..ba15c7983 100644 --- a/libpthread/nptl/cleanup_defer_compat.c +++ b/libpthread/nptl/cleanup_defer_compat.c @@ -21,7 +21,7 @@ void attribute_protected -_pthread_cleanup_push_defer ( +__pthread_cleanup_push_defer ( struct _pthread_cleanup_buffer *buffer, void (*routine) (void *), void *arg) @@ -56,12 +56,12 @@ _pthread_cleanup_push_defer ( THREAD_SETMEM (self, cleanup, buffer); } -strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer) +strong_alias (__pthread_cleanup_push_defer, _pthread_cleanup_push_defer) void attribute_protected -_pthread_cleanup_pop_restore ( +__pthread_cleanup_pop_restore ( struct _pthread_cleanup_buffer *buffer, int execute) { @@ -96,4 +96,4 @@ _pthread_cleanup_pop_restore ( if (execute) buffer->__routine (buffer->__arg); } -strong_alias (_pthread_cleanup_pop_restore, __pthread_cleanup_pop_restore) +strong_alias (__pthread_cleanup_pop_restore, _pthread_cleanup_pop_restore) diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c index 776bec755..eb84d6edd 100644 --- a/libpthread/nptl/init.c +++ b/libpthread/nptl/init.c @@ -104,8 +104,8 @@ static const struct pthread_functions pthread_functions = .ptr___pthread_key_create = __pthread_key_create_internal, .ptr___pthread_getspecific = __pthread_getspecific_internal, .ptr___pthread_setspecific = __pthread_setspecific_internal, - .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer, - .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore, + .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer, + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore, .ptr_nthreads = &__nptl_nthreads, .ptr___pthread_unwind = &__pthread_unwind, .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd, -- cgit v1.2.3