Fun Valgrind bugfixes of the week, number 1.

When you run 'valgrind' it's just a small wrapper binary that will exec the required tool (e.g., memcheck-amd64-netbsd). The wrapper needs to work out which CPU is required (since quite often 64bit arches also support 32bit binaries). It does that by looking at the ELF OSABI tag.

This was checking for UNIX System V or UNIX NetBSD.

However, if the executable uses GNU ifuncs the OSABI will be UNIX GNU. Since that wasn't handled it defaulted to Linux amd64. It then tried to exec memcheck-amd64-linux which resulted in a file not found error.

#valgrind #netbsd