[PATCH] Use correct type for glibc.malloc.perturb in tst-tunconf1.c
DJ Delorie
dj@redhat.com
Fri Jul 10 16:35:30 GMT 2026
Stefan Liebler <stli@linux.ibm.com> writes:
> According to elf/dl-tunables.list, glibc.malloc.perturb is of type
> int32_t (4byte) and not size_t (8byte) which was used for
> TUNABLE_GET_FULL inside the testcase. Therefore the correct 32bit
> value 0x2a=42 is written to the to the wrong place and leads to the
> comparison failure.
I'm wondering how it passed for me... does it only show up on MSB systems?
> + printf("perturb is %d (should be 42, from /etc)\n",
> + perturb);
Do we know that %d matches int32_t on all platforms? Or should we cast
this to (int) ?
More information about the Libc-alpha
mailing list