[PATCH v4 20/23] misc: Add tst-getpagesize

Florian Weimer fweimer@redhat.com
Fri May 16 08:22:05 GMT 2025


* Mark Harris:

> On Tue, May 13, 2025 at 3:27 AM Florian Weimer <fweimer@redhat.com> wrote:
>> +  /* Create a few mappings to verify that the address is a multiple of
>> +     the page size.  */
>> +  for (int i = 0; i < 1000; i++)
>> +    TEST_COMPARE ((uintptr_t) xmmap (NULL, 1, PROT_READ | PROT_WRITE,
>> +                                     MAP_PRIVATE | MAP_ANONYMOUS, -1)
>> +                  % 4096, 0);
>
> This doesn't do what the comment claims; it only verifies that the
> address is a multiple of 4096.

Huh.  Thanks, fixed.

Florian



More information about the Libc-alpha mailing list