SUMMARY valgrind doesn't support MAP_FIXED_NOREPLACE mmap flag, causing the programs that use it, to misbehave.
This is also why the LTP testcase mmap17 fails. mmap17.c:59: TFAIL: mmap failed, with unexpected error code, expected EEXIST:EACCES (13) Uses MAP_FIXED_NOREPLACE. Tries to check that mmap at an exisiting mapping fails with EEXIST, not EACCES.
commit cad20f3e7d42e6371896e2492f0fc3a081314238 Author: Mark Wielaard <mark@klomp.org> Date: Tue Jul 15 23:49:36 2025 +0200 Support mmap MAP_FIXED_NOREPLACE if defined Define VKI_MAP_FIXED_NOREPLACE for amd64-linux, arm-linux, arm64-linux, mips32-linux, mips64-linux, riscv64-linux and x86-linux. If it is defined then ML_(generic_PRE_sys_mmap) will also interpret VKI_MAP_FIXED_NOREPLACE as an MFixed hint. If the aspace manager doesn't find a MAP_FIXED_NOREPLACE ok, then fail with EEXIST. If the actual kernel mmap request fails and MAP_FIXED_NOREPLACE is set also immediately fail with EEXIST without retrying. This fixes the LTP mmap17 testcase. https://bugs.kde.org/show_bug.cgi?id=418756