From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37884 invoked by alias); 28 Jun 2018 13:22:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 37376 invoked by uid 89); 28 Jun 2018 13:22:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Subject: Re: [PATCH v3] libc: Extend __libc_freeres framework (Bug 23329). To: Carlos O'Donell , GNU C Library , DJ Delorie References: <9666df73-e500-2b2e-e202-a71087bdab91@redhat.com> From: Florian Weimer Message-ID: <2389af1a-a479-0a20-8cb4-034fe0767e5c@redhat.com> Date: Thu, 28 Jun 2018 13:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <9666df73-e500-2b2e-e202-a71087bdab91@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-06/txt/msg00890.txt.bz2 > + [BZ #23329] > + * include/libc-symbols.h: Comment the freeres framework. > + * include/set-hooks.h: Include libc-symbols.h. Fix comment. > + * dlfcn/Makefile (libdl-routines): Add dlfreeres. > + * dlfcn/Versions (GLIBC_PRIVATE): Add __libdl_freeres. > + * dlfcn/dlerror.c: Include libc-symbols.h > + (__dlerror_main_freeres): New function. > + * dlfcn/dlfreeres.c: New file. > + * dlfcn/sdlfreeres.c: New file. > + * include/dlfcn.h: Declare __dlerror_main_freeres. > + * malloc/set-freeres.c: Declare __libdl_freeres, and > + __libpthread_freeres. > + (__libc_subfreeres): Call __libdl_freeres, and __libpthread_freeres if > + the releavant libraries are loaded. > + * malloc/thread-freeres.c: Add comments. > + * nptl/Makefile (libpthread-routines): Add nptlfreeres. > + * nptl/Version (GLIBC_PRIVATE): Add __libpthread_freeres. > + * nptl/allocatestack.c (__nptl_free_stacks): New function. > + (__free_stacks): Rename to... > + (free_stacks): ...this. Mark static. > + (queue_stack): Call free_stacks. > + * nptl/libc_pthread_init.c [SHARED] (freeres_libpthread): Delete. > + * nptl/nptl-init.c: Delete delcaration of nptl_freeres. > + * sysdeps/nptl/pthread-functions.h (pthread_functions): Remove > + ptr_freeres element from struct. > + (pthread_functions): Remove .ptr_freeres from struct initializer. > + [SHARED] (nptl_freeres): Remove. > + * nptl/nptlfreeres.c: New file. > + * nptl/pthreadP.h > + [IS_IN (libpthread) && SHARED ] (__unwind_freeres): Rename to... > + [IS_IN (libpthread)] (__nptl_unwind_freeres): ...this. Mark > + attribute_hidden. > + (__free_stacks): Rename to... > + (__nptl_stacks_freeres): ...this. > + (__shm_directory_freeres): Declare. > + * nptl/unwind-forcedunwind.c (__unwind_freeres): Rename to... > + (__nptl_unwind_freeres): ...this. > + * resolv/res-close.c: Add comment. > + * resolv/resolv_conf.c: Include libc-symbols.h. > + * string/strerror_l.c: Include libc-symbols.h. > + * sunrpc/rpc_thread.c: Include libc-symbols.h. > + * sysdeps/mach/strerror_l.c: Inlcude libc-symbols.h > + * sysdeps/unix/sysv/linux/shm-directory.c (freeit): Rename to... > + [IS_IN (libpthread)] (__shm_directory_freeres): ...this. ChangeLog looks okay now (but it still does not apply with git am -3 --reject). > diff --git a/dlfcn/dlfreeres.c b/dlfcn/dlfreeres.c > new file mode 100644 > index 0000000000..8c18731b5c … > +void > +__libdl_freeres (void) > +{ > + call_function_static_weak (__dlerror_main_freeres); > +} > +libc_hidden_def (__libdl_freeres) Please remove the last line of the file before committing. It is a no-op (otherwise it wouldn't compile due to the missing libc_hidden_proto). Thanks, Florian