Re: [PATCH] Use correct type for glibc.malloc.perturb in tst-tunconf1.c

DJ Delorie <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
Stefan Liebler <[email protected]> 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) ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.