From: Paul Floyd Date: Sat, 9 Nov 2024 17:17:26 +0000 (+0100) Subject: Illumos: Don't call ML_(fd_allowed) from PRE(sys_fstat) X-Git-Tag: VALGRIND_3_25_0~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab632865cfeabf8457f0f899016ff5a74ed02216;p=thirdparty%2Fvalgrind.git Illumos: Don't call ML_(fd_allowed) from PRE(sys_fstat) This was causing many false positives with --track-fds=yes --- diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index f43c2f30a..9d869d9b5 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -2357,10 +2357,6 @@ PRE(sys_fstat) PRINT("sys_fstat ( %ld, %#lx )", SARG1, ARG2); PRE_REG_READ2(long, "fstat", int, fildes, struct stat *, buf); PRE_MEM_WRITE("fstat(buf)", ARG2, sizeof(struct vki_stat)); - - /* Be strict. */ - if (!ML_(fd_allowed)(ARG1, "fstat", tid, False)) - SET_STATUS_Failure(VKI_EBADF); } POST(sys_fstat)