From: Alexandra H. <aha...@so...> - 2025-07-04 12:46:37
|
https://sourceware.org/cgit/valgrind/commit/?id=7615845dcd2166d98cb246e1ca7d4496cfcdfc4f commit 7615845dcd2166d98cb246e1ca7d4496cfcdfc4f Author: Alexandra Hájková <aha...@re...> Date: Fri Jul 4 07:35:13 2025 -0400 Implement fcntl F_CREATED_QUERY Define VKI_F_CREATED_QUERY in vki-linux.h. Recognize it in PRE(sys_fcntl). This fixes ltp tests failures. When running: make ltpchecks TESTS="fcntl40 fcntl40_64 the tests would fail with: fcntl40: unempty log2.filtered: ==1809471== Warning: unimplemented fcntl command: 1028 https://bugs.kde.org/show_bug.cgi?id=506076 Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-linux.c | 1 + include/vki/vki-linux.h | 1 + 3 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index c1940b56ce..40fec35cd2 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +506076 unimplemented fcntl command: 1028 (F_CREATED_QUERY) 338803 Handling of dwz debug alt files or cross-CU is broken 493434 Add --track-fds=bad mode (no "leak" tracking) 503098 Incorrect NAN-boxing for float registers in RISC-V diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 97d3862902..d2d0c70588 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -7100,6 +7100,7 @@ PRE(sys_fcntl) case VKI_F_GETSIG: case VKI_F_GETLEASE: case VKI_F_GETPIPE_SZ: + case VKI_F_CREATED_QUERY: case VKI_F_GET_SEALS: PRINT("sys_fcntl ( %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1, ARG2); PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd); diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 65406fffe9..8c919845bc 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -1514,6 +1514,7 @@ struct vki_dirent64 { #define VKI_F_SETLEASE (VKI_F_LINUX_SPECIFIC_BASE + 0) #define VKI_F_GETLEASE (VKI_F_LINUX_SPECIFIC_BASE + 1) +#define VKI_F_CREATED_QUERY (VKI_F_LINUX_SPECIFIC_BASE + 4) #define VKI_F_CANCELLK (VKI_F_LINUX_SPECIFIC_BASE + 5) #define VKI_F_DUPFD_CLOEXEC (VKI_F_LINUX_SPECIFIC_BASE + 6) |