Re: Help

"Floyd, Paul" <[email protected]> Thu, 7 Sep 2023 18:39:47 +0200
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
On 07/09/2023 16:52, John Reiser wrote:
>> ==17348== Warning: invalid file descriptor 1024 in syscall close()
>>
>> Your exe is probably trying to ensure all file descriptors are 
>> closed. You should probably use getrlimit() to query the upper limit 
>> rather than assume anything. Exes under Valgrind have a slighly lower 
>> limit because Valgrind uses some file descriptors itself (e.g., its 
>> log file).
>
> See also the manual page for 'close_range', which is a system call in 
> Linux >= 5.9 and FreeBSD.
> You may have to think about what the parameters should be, but 
> 'close_range' is very efficient.


Ahem. Someone needs to implement close_range for FreeBSD in Valgrind.

Something else for 3.22.

A+

Paul