This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] tst-rec-dlopen: Use custom malloc instead of hooks
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, libc-alpha at sourceware dot org
- Date: Fri, 3 Jun 2016 13:30:11 -0400
- Subject: Re: [PATCH] tst-rec-dlopen: Use custom malloc instead of hooks
- Authentication-results: sourceware.org; auth=none
- References: <20160510143805 dot 6AA4141C38D19 at oldenburg dot str dot redhat dot com> <573F5D3B dot 60207 at linaro dot org> <7715b1e0-fc70-e9c6-7638-f6fea80d466b at redhat dot com>
On 06/03/2016 05:50 AM, Florian Weimer wrote:
> On 05/20/2016 08:53 PM, Adhemerval Zanella wrote:
>
>> Since the idea is simulate the hooks for malloc/free, do we still
>> need to add all this code to be used on this single test?
>
> If you interpose malloc, you need to interpose all these functions in
> a matching way.
>
> I wanted to avoid dlsym (RTLD_NEXT), which is why I followed this
> approach, but it turns out this is not necessary because dlsym
> (RTLD_NEXT) works just fine. Updated patch attached.
Looks good to me. Still exercises the key goal which is to call
dlopen recursively from within dlopen and you need an interposed
function to be able to do that e.g. malloc.
--
Cheers,
Carlos.