This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v7] Remove Linuxism from tst-tls-atexit
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Cc: roland at hack dot frob dot com
- Date: Mon, 20 Jul 2015 13:34:28 -0400
- Subject: Re: [PATCH v7] Remove Linuxism from tst-tls-atexit
- Authentication-results: sourceware.org; auth=none
- References: <55ACF201 dot 6010505 at redhat dot com> <1437412960-12587-1-git-send-email-siddhesh at redhat dot com>
On 07/20/2015 01:22 PM, Siddhesh Poyarekar wrote:
> The tst-tls-atexit test case searches for its module in /proc/PID/maps
> to verify that it is unloaded, which is a Linux-specific test. This
> patch makes the test generic by looking for the library in the link
> map list in the _r_debug structure.
>
> Verified that the test continues to succeed on x86_64. There is a bug
> in the test case where it calls dlclose once again, which is actually
> incorrect but still manages to unload the DSO thanks to an existing
> bug in __tls_call_dtors. This will be fixed in a later patch which
> also fixes up the __cxa_thread_atexit_impl implementation. I have
> added a FIXME comment to that call momentarily, which I will remove
> when I fix the problem.
>
> * stdlib/tst-tls-atexit-lib.c (do_foo): Rename to reg_dtor.
> * stdlib/tst-tls-atexit.c: (is_loaded): New function.
> (spawn_thread): New function.
> (load): Rename to reg_dtor_and_close. Move dlopen to...
> (do_test): ... here. Use IS_LOADED to test for its
> availability.
Looks good to me for 2.22.
I know this is coupled with the fix we want for the l_tls_dtors_count.
Cheers,
Carlos.