Bug 510436

Summary: Don't warn about fcntl F_GETFD with --track-fds
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Mark Wielaard 2025-10-09 19:46:35 UTC
fcntl F_GETFD is used to look if a file descriptor number is valid, so --track-fds shouldn't produce an error when a "bad file descriptor" is used with F_GETFD.

See also https://sourceforge.net/p/valgrind/mailman/message/59229815/
Comment 1 Mark Wielaard 2025-10-24 16:41:30 UTC
commit 8b230a64f0603723fab048b7b8bdaed7d26fd4ba
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Oct 24 18:31:31 2025 +0200

    Don't warn about fcntl F_GETFD with --track-fds
    
    fcntl F_GETFD is used to check if a file descriptor is valid, so only
    make sure it isn't a valgrind fd, otherwise we might warn, with
    --track-fds=bad for any bad fd.
    
    https://bugs.kde.org/show_bug.cgi?id=510436