[PATCH] Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]
Florian Weimer
fweimer@redhat.com
Thu Mar 31 10:05:00 GMT 2016
On 03/31/2016 01:50 AM, Carlos O'Donell wrote:
> 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.
Thanks, here is what I committed. I renamed the test case based on
previous comments on other threads.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Report-dlsym-dlvsym-lookup-errors-using-dlerror-BZ-1.patch
Type: text/x-patch
Size: 4971 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160331/3d855a28/attachment.bin>
More information about the Libc-alpha
mailing list