[PATCH 3/3] elf/tst-dl_find_object: Disable subtests for non-contiguous maps (bug 28732)

Florian Weimer fweimer@redhat.com
Fri Jan 14 15:10:18 GMT 2022


* H. J. Lu:

> On Mon, Jan 3, 2022 at 9:13 AM Florian Weimer via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>> ---
>>  elf/tst-dl_find_object.c | 29 +++++++++++++++++------------
>>  1 file changed, 17 insertions(+), 12 deletions(-)
>>
>> diff --git a/elf/tst-dl_find_object.c b/elf/tst-dl_find_object.c
>> index 21cdc0f848..2ad1924088 100644
>> --- a/elf/tst-dl_find_object.c
>> +++ b/elf/tst-dl_find_object.c
>> @@ -71,19 +71,24 @@ check (void *address,
>>                __FILE__, line, address,
>>                actual.dlfo_flags, expected->dlfo_flags);
>>      }
>> -  if (actual.dlfo_flags != expected->dlfo_flags)
>> +  if (expected->dlfo_link_map->l_contiguous)
>>      {
>> -      support_record_failure ();
>> -      printf ("%s:%d: error: %p: map start is %p, expected %p\n",
>> -              __FILE__, line,
>> -              address, actual.dlfo_map_start, expected->dlfo_map_start);
>> -    }
>> -  if (actual.dlfo_map_end != expected->dlfo_map_end)
>> -    {
>> -      support_record_failure ();
>> -      printf ("%s:%d: error: %p: map end is %p, expected %p\n",
>> -              __FILE__, line,
>> -              address, actual.dlfo_map_end, expected->dlfo_map_end);
>> +      /* If the mappings are not contiguous, the actual and execpted
>> +         mappings may differ, so this subtest will not work.  */
>> +      if (actual.dlfo_flags != expected->dlfo_flags)
>> +        {
>> +          support_record_failure ();
>> +          printf ("%s:%d: error: %p: map start is %p, expected %p\n",
>> +                  __FILE__, line,
>> +                  address, actual.dlfo_map_start, expected->dlfo_map_start);
>> +        }
>> +      if (actual.dlfo_map_end != expected->dlfo_map_end)
>> +        {
>> +          support_record_failure ();
>> +          printf ("%s:%d: error: %p: map end is %p, expected %p\n",
>> +                  __FILE__, line,
>> +                  address, actual.dlfo_map_end, expected->dlfo_map_end);
>> +        }
>>      }
>>    if (actual.dlfo_link_map != expected->dlfo_link_map)
>>      {
>> --
>> 2.33.1
>>
>
> I still see
>
> FAIL: elf/tst-dl_find_object
>
> even when using the new linker with the fix for
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28743
>
> to remove the 1-page gap.  Which file doesn't have
> non-contiguous mapping?

We never set l_contiguous for the main executable, so it doesn't matter
what the link editor does.  And none of the glibc fixes went in so far.

Thanks,
Florian



More information about the Libc-alpha mailing list