From: Paul F. <pa...@so...> - 2025-03-11 19:38:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dd169be0e65fecd1e4b7593dc3da7b87dc7ecf03 commit dd169be0e65fecd1e4b7593dc3da7b87dc7ecf03 Author: Paul Floyd <pj...@wa...> Date: Tue Mar 11 20:36:30 2025 +0100 Illumos fdleak: dup2 spurious errors We should also put back checks that calls like dup2 aren't using reserved file descriptors. Diff: --- coregrind/m_syswrap/syswrap-solaris.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 3da0d216cd..dc0068d90c 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -3989,11 +3989,13 @@ PRE(sys_fcntl) PRE_REG_READ3(long, "fcntl", int, fildes, int, cmd, int, arg); /* Check if a client program isn't going to poison any of V's output fds. */ + /* if (ARG2 == VKI_F_DUP2FD && !ML_(fd_allowed)(ARG3, "fcntl(F_DUP2FD)", tid, False)) { SET_STATUS_Failure(VKI_EBADF); return; } + */ break; /* These ones use ARG3 as "native lock" (input only). */ |