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] Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]


On 03/30/2016 07:53 AM, Florian Weimer wrote:
> On 02/09/2016 03:31 PM, Florian Weimer wrote:
>> 2016-02-09  Florian Weimer  <fweimer@redhat.com>
>>
>> 	[BZ #19509]
>> 	* elf/dl-lookup.c (_dl_lookup_symbol_x): Report error even if
>> 	skip_map != NULL.
>> 	* elf/bug19509.c: New file.
>> 	* elf/Makefile (tests): Add bug19509.
>> 	(bug19509): Link against libdl.
> 
> Ping?
> 
>   https://sourceware.org/ml/libc-alpha/2016-02/msg00172.html

I agree. The only caller with non-NULL skip_map is:

146   else if (handle == RTLD_NEXT)
147     {
148       if (__glibc_unlikely (match == GL(dl_ns)[LM_ID_BASE]._ns_loaded))
149         {
150           if (match == NULL
151               || caller < match->l_map_start
152               || caller >= match->l_map_end)
153             GLRO(dl_signal_error) (0, NULL, NULL, N_("\
154 RTLD_NEXT used in code not dynamically loaded"));
155         }
156 
157       struct link_map *l = match;
158       while (l->l_loader != NULL)
159         l = l->l_loader;
160 
161       result = GLRO(dl_lookup_symbol_x) (name, match, &ref, l->l_local_scope,
162                                          vers, 0, 0, match);
163     }

Whose purpose it is to skip the current map for lookup.

Your patch and testcase look good to me.

-- 
Cheers,
Carlos.


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