[PATCH v4] libc: Extend __libc_freeres framework (Bug 23329).
Carlos O'Donell
carlos@redhat.com
Thu Jun 28 13:36:00 GMT 2018
On 06/28/2018 09:22 AM, Florian Weimer wrote:
>> +Â Â Â [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).
Complies and applies fine for me.
This is the only commit I have on top of master.
Where are the conflicts?
>> 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).
Fixed. I missed this, I had a slightly different version before where
I wanted this to be called internally. I don't need hidden def for
a public API.
v4
- Attached. With libc_hidden_def removed for __libdl_freeres.
Cheers,
Carlos.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libc-Extend-__libc_freeres-framework-Bug-23329.patch
Type: text/x-patch
Size: 23282 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180628/8a2dbb58/attachment.bin>
More information about the Libc-alpha
mailing list