Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

7.223. valgrind

Updated valgrind packages that fix several bugs are now available for Red Hat Enterprise Linux 6.
Valgrind is an instrumentation framework that is used for debugging memory, detecting memory leaks, and profiling applications.

Bug Fixes

Valgrind did not recognize Intel Memory Protection Extensions (MPX) instructions or instructions using the MPX bnd prefix. Consequently, Valgrind terminated programs that used MPX instructions with a SIGKILL signal. Valgrind now recognizes the new MPX instructions and bnd prefixes. All new MPX instructions are currently implemented as no operation instructions, and the bnd prefix is ignored. As a result, programs using MPX instructions or bnd prefixes run under Valgrind as if the MPX was not enabled on the CPU and are no longer terminated.
Valgrind was unable to emulate a total LL cache size other than a power of two. Consequently, when detecting CPU caches, Valgrind refused to run the cachegrind tool with a warning message. Now, Valgrind forces down the cache size it emulates to the nearest power of two below the value detected. As a result, cachegrind can be run on systems detected as having a CPU cache size other than a power of two and returns a warning message to indicate the difference between the detected or specified cache size and the emulated cache size.
Valgrind assumed that a processor that supported the Advanced Vector Extensions 2 (AVX2) instruction set also always supported the Leading Zeros Count (LZCNT) instruction. This is not always true under QEMU, which can support AVX2 instructions, but not LZCNT. Consequently, Valgrind failed to run under QEMU when AVX2 instructions were enabled. Valgrind has been fixed to be able to run when the AVX2 instruction set is supported but the LZCNT instruction is not, and Valgrind now runs under QEMU as expected.
Previously, 32-bit PowerPC (ppc32) binaries that were compiled against the valgrind.h header file to include Valgrind client requests could unexpectedly clobber a register (r0) causing subtle bugs. This problem has been addressed in the client-request code sequence for the ppc32 architecture. Existing ppc32 binaries need to be recompiled against the new valgrind.h header file to fix the bug. Valgrind now also detects the erroneous code sequences in binaries that have not been recompiled and returns a warning message.
Valgrind was unable to handle the SIOCETHTOOL ioctl (0x8946), which queries or controls network driver and hardware settings. As a consequence, programs running under Valgrind that use SIOCETHTOOL received a warning message, and arguments were not tracked by Valgrind. Valgrind now correctly recognizes the SIOCETHTOOL ioctl, and the described problem no longer occurs.
Valgrind was unable to recognize the getpriority() and setpriority() system calls on 64-bit PowerPC systems. Consequently, programs running under Valgrind that used the mentioned system calls returned an error message, and arguments to the system call were not tracked. Valgrind has been fixed to recognize the system calls on 64-bit PowerPC systems, and system call arguments are now correctly tracked by Valgrind on all supported architectures.
Previously, on the IBM System z architecture, Valgrind did not recognize certain code jumps that depended only on whether the highest bit of a conditional register was fully defined. Consequently, when a program used a combination of the IBM System z LTG + JHE instructions (jump if >= 0) or LTG + JL instructions (jump if < 0), Valgrind reported the following error message: "Conditional jump or move depends on uninitialised value(s)". Valgrind has been fixed to recognize these instruction patterns as jumps that depend only on whether or not the highest bit is set or unset (defined), and the described problem no longer occurs.
Users of valgrind are advised to upgrade to these updated packages, which fix these bugs.