This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Wed, 30 Mar 2016 19:50:12 -0400
- Subject: Re: [PATCH] Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]
- Authentication-results: sourceware.org; auth=none
- References: <56B9F83A dot 1000500 at redhat dot com> <56FBBE42 dot 8010505 at redhat dot com>
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.