This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Also use l_tls_dtor_count to decide on object unload
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org, triegel at redhat dot com, carlos at redhat dot com
- Date: Thu, 9 Jul 2015 13:43:01 -0700 (PDT)
- Subject: Re: [PATCH] Also use l_tls_dtor_count to decide on object unload
- Authentication-results: sourceware.org; auth=none
- References: <20150709180724 dot GA8552 at spoyarek dot pnq dot redhat dot com>
> When an TLS destructor is registered, we set the DF_1_NODELETE flag to
> signal that the object should not be destroyed. We then clear the
> DF_1_NODELETE flag when all destructors are called, which is wrong -
> the flag could have been set by other means too.
That sounds like a user-visible bug, which should have both a BZ# and a
concrete test case for a -z nodelete object or some such case that would
demonstrate the bug.
> --- a/stdlib/tst-tls-atexit.c
> +++ b/stdlib/tst-tls-atexit.c
> @@ -82,7 +82,14 @@ do_test (void)
> if (thr_ret != NULL)
> return 1;
>
> - /* Now this should unload the DSO. */
> + /* Now this sequence should unload the DSO. */
> + handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY);
> + if (!handle)
No implicit Boolean coercion.