FreeBSD The Power to Serve

Valgrind - Preparing for Valgrind 3.21

Contact: Paul Floyd <pjfloyd@wanadoo.fr>

The devel/valgrind-devel port had an intermediate update which was submitted on 2023-02-20. This contains most of what will be in the official release of Valgrind 3.21 which is due out shortly after this status report.

There is a nice improvement to the vgdb interface. It’s now much easier to see which bits of memory are initialized or not. There are a couple of fixes to the thread checks done by Helgrind.

For FreeBSD specifically, the address space limit has been raised to be the same as Linux and Solaris on amd64. It was 32Gbytes and now it is 128Gbytes. The kern.proc.pathname.PID sysctl(3) has been fixed so that it returns the path of the guest exe and not that of the Valgrind host. At the same time I fixed some _umtx_op false positives and corrected auxv AT_EXECPATH in a way similar to kern.proc.pathname.PID. Syscall wrappers have been added for sctp_generic_sendmsg(2) and sctp_generic_recvmsg(2).

Not yet available in the ports versions of Valgrind, there is a workaround for the use of rfork(2). Previously, since it is not supported, it would cause Valgrind to abort. Now it fails gracefully setting either EINVAL or ENOSYS. The main use of this system call is in posix_spawn(3), which will fall back to using vfork(2).

The mknodat(2) syscall wrapper was incorrectly implemented on i386 and has now been fixed.

There is a reworking of all of the aligned allocation functions so that they behave less like Linux glibc and more like the Valgrind build platform.


Last modified on: April 14, 2023 by Lorenzo Salvadore