or just valgrind on a simple:
printf ("%ld\n", sysconf (_SC_PHYS_PAGES));
results in errors like:
==13654== Invalid read of size 8
==13654== at 0x802A9BB824: _IO_vfscanf@@GLIBC_2.4 (in /lib64/libc-2.12.so)
==13654== by 0x802A9C696B: sscanf@@GLIBC_2.4 (in /lib64/libc-2.12.so)
==13654== by 0x802AA57B4B: phys_pages_info (in /lib64/libc-2.12.so)
==13654== by 0x802AA17E1B: sysconf (in /lib64/libc-2.12.so)
==13654== by 0x100005C3: main (in /tmp/z)
==13654== Address 0x7ff00cb20 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes
Could be a valgrind bug or glibc bug or gcc bug.
In any case, valgrind should be tested on several common programs on each of the RHEL6 arches where valgrind is included to make sure there aren't similar problems in RHEL6 GA.
Seems this isn't a bug in valgrind.
0x802a9bb81c <._IO_vfscanf+732>: std r10,592(r31)
0x802a9bb820 <._IO_vfscanf+736>: addi r1,r31,960
=> 0x802a9bb824 <._IO_vfscanf+740>: ld r3,592(r31)
As can be clearly seen, the stack pointer is first incremented and $r31+592 is below the 288 bytes long red zone. So, very likely a gcc bug, going to build glibc now and see if I can reproduce it.
Ok, it is really a gcc bug, tracking it in http://gcc.gnu.org/PR44199.
Once gcc is fixed, glibc will need to be rebuilt.
Note the fixed gcc is already in SNapshot 5, so all that is needed to fix this bug is rebuild glibc.
Reproduced on ppc with old glibc, disappeared with new glibc. Moving to VERIFIED.
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.