This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tst-rec-dlopen: Use custom malloc instead of hooks


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]