This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Set NODELETE flag when opening already open objects with RTLD_NODELETE
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Date: Thu, 16 Jul 2015 01:01:31 -0400
- Subject: Re: [PATCH] Set NODELETE flag when opening already open objects with RTLD_NODELETE
- Authentication-results: sourceware.org; auth=none
- References: <1436947597-3800-1-git-send-email-siddhesh at redhat dot com>
On 07/15/2015 04:06 AM, Siddhesh Poyarekar wrote:
> The DF_1_NODELETE flag is set too late when opening a DSO, due to
> which, if a DSO is already open, subsequently opening it with
> RTLD_NODELETE fails to set the DF_1_NODELETE flag. This patch fixes
> this by setting the flag immediately after bumping the opencount.
>
> Verified on x86_64.
The change itself looks good. The setting of NODELETE must be
*before* the check to see if it was already open.
> + dlclose (h1);
> + dlclose (h2);
How does the test verify the object was not unloaded?
Post v2?
c.