]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Illumos fdleak: dup2 spurious errors
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 11 Mar 2025 19:36:30 +0000 (20:36 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 11 Mar 2025 19:36:30 +0000 (20:36 +0100)
We should also put back checks that calls like dup2 aren't
using reserved file descriptors.

coregrind/m_syswrap/syswrap-solaris.c

index 3da0d216cd7fc8093d0654dcd05441ba90d4a09c..dc0068d90c9bbcdcdbaac41e1d06bb46c0684803 100644 (file)
@@ -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). */