* ==================== TOOL CHANGES ===================
+* The --track-fds=yes and --track-fds=all options now treat all
+ inherited file descriptors the same as 0, 1, 2 (stdin/out/err).
+ And when the stdin/out/err descriptors are reassigned they are
+ now treated as normal (non-inherited) file descriptors.
+
* ==================== FIXED BUGS ====================
The following bugs have been fixed or resolved. Note that "n-i-bz"
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.
+487296 --track-fds=yes and --track-fds=all report erroneous information
+ when fds 0, 1, or 2 are used as non-std
489913 WARNING: unhandled amd64-linux syscall: 444 (landlock_create_ruleset)
494246 syscall fsopen not wrapped
494327 Crash when running Helgrind built with #define TRACE_PTH_FNS 1
" where event is one of:\n"
" startup exit abexit valgrindabexit all none\n"
" --track-fds=no|yes|all track open file descriptors? [no]\n"
-" all includes reporting stdin, stdout and stderr\n"
+" all includes reporting inherited file descriptors\n"
" --time-stamp=no|yes add timestamps to log messages? [no]\n"
" --log-fd=<number> log messages to file descriptor [2=stderr]\n"
" --log-file=<file> log messages to <file>\n"
void VG_(show_open_fds) (const HChar* when)
{
OpenFd *i;
- int non_std = 0;
+ int inherited = 0;
for (i = allocated_fds; i; i = i->next) {
- if (i->fd > 2 && i->fd_closed != True)
- non_std++;
+ if (i->where == NULL)
+ inherited++;
}
/* If we are running quiet and there are either no open file descriptors
or not tracking all fds, then don't report anything. */
if ((fd_count == 0
- || ((non_std == 0) && (VG_(clo_track_fds) < 2)))
+ || ((fd_count - inherited == 0) && (VG_(clo_track_fds) < 2)))
&& (VG_(clo_verbosity) == 0))
return;
if (!VG_(clo_xml)) {
- VG_(umsg)("FILE DESCRIPTORS: %d open (%d std) %s.\n",
- fd_count, fd_count - non_std, when);
+ VG_(umsg)("FILE DESCRIPTORS: %d open (%d inherited) %s.\n",
+ fd_count, inherited, when);
}
for (i = allocated_fds; i; i = i->next) {
if (i->fd_closed)
continue;
- if (i->fd <= 2 && VG_(clo_track_fds) < 2)
+ if (i->where == NULL && VG_(clo_track_fds) < 2)
continue;
struct NotClosedExtra nce;
...
by 0x........: main (pdfork_pdkill.c:96)
-FILE DESCRIPTORS: 3 open (3 std) at exit.
+FILE DESCRIPTORS: 3 open (3 inherited) at exit.
Open file descriptor ...
<inherited from parent>
at 0x........: timerfd_settime (in /...libc...)
by 0x........: main (timerfd.c:141)
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open file descriptor 3:
at 0x........: timerfd_create (in /...libc...)
by 0x........: main (timerfd.c:115)
where event is one of:
startup exit abexit valgrindabexit all none
--track-fds=no|yes|all track open file descriptors? [no]
- all includes reporting stdin, stdout and stderr
+ all includes reporting inherited file descriptors
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
where event is one of:
startup exit abexit valgrindabexit all none
--track-fds=no|yes|all track open file descriptors? [no]
- all includes reporting stdin, stdout and stderr
+ all includes reporting inherited file descriptors
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
where event is one of:
startup exit abexit valgrindabexit all none
--track-fds=no|yes|all track open file descriptors? [no]
- all includes reporting stdin, stdout and stderr
+ all includes reporting inherited file descriptors
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
where event is one of:
startup exit abexit valgrindabexit all none
--track-fds=no|yes|all track open file descriptors? [no]
- all includes reporting stdin, stdout and stderr
+ all includes reporting inherited file descriptors
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
-FILE DESCRIPTORS: 7 open (3 std) at exit.
+FILE DESCRIPTORS: 7 open (3 inherited) at exit.
Open AF_UNIX socket ...: /tmp/sock
...
-FILE DESCRIPTORS: 6 open (3 std) at exit.
+FILE DESCRIPTORS: 6 open (3 inherited) at exit.
Open file descriptor ...: /tmp/data2
...
-FILE DESCRIPTORS: 7 open (3 std) at exit.
+FILE DESCRIPTORS: 7 open (3 inherited) at exit.
Open file descriptor ...: ...
<inherited from parent>
-FILE DESCRIPTORS: 6 open (3 std) at exit.
+FILE DESCRIPTORS: 6 open (3 inherited) at exit.
Open file descriptor ...: ...
<inherited from parent>
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open file descriptor ...: /tmp/file
...
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open file descriptor ...: ...
<inherited from parent>
-FILE DESCRIPTORS: 5 open (3 std) at exit.
+FILE DESCRIPTORS: 5 open (3 inherited) at exit.
Open file descriptor ...: /dev/null
...
-FILE DESCRIPTORS: 6 open (3 std) at exit.
+FILE DESCRIPTORS: 6 open (3 inherited) at exit.
Open file descriptor ...: /dev/null
...
-FILE DESCRIPTORS: 5 open (3 std) at exit.
+FILE DESCRIPTORS: 5 open (3 inherited) at exit.
Open file descriptor ...: /dev/null
...
by 0x........: client (fdleak_ipv4.c:68)
by 0x........: main
-FILE DESCRIPTORS: 5 open (3 std) at exit.
+FILE DESCRIPTORS: 5 open (3 inherited) at exit.
Open AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:...
...
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open AF_INET socket 3: 127.0.0.1:... <-> 127.0.0.1:...
...
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open file descriptor ...: /dev/null
...
-FILE DESCRIPTORS: 5 open (3 std) at exit.
+FILE DESCRIPTORS: 5 open (3 inherited) at exit.
Open file descriptor ...:
...
-FILE DESCRIPTORS: 5 open (3 std) at exit.
+FILE DESCRIPTORS: 5 open (3 inherited) at exit.
Open AF_UNIX socket ...: <unknown>
...
-FILE DESCRIPTORS: 3 open (3 std) at exit.
+FILE DESCRIPTORS: 3 open (3 inherited) at exit.
Open file descriptor ...: ...
<inherited from parent>
-FILE DESCRIPTORS: 4 open (3 std) at exit.
+FILE DESCRIPTORS: 4 open (3 inherited) at exit.
Open file descriptor ...:
...