]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add --modify-fds=[no|high] option
authorAlexandra Hájková <ahajkova@redhat.com>
Wed, 20 Nov 2024 17:00:47 +0000 (12:00 -0500)
committerAlexandra Hájková <ahajkova@redhat.com>
Tue, 15 Apr 2025 13:01:30 +0000 (15:01 +0200)
commit8d6de5b07e7687cb84691789ccdaed76f33df62b
tree8d28c4849d80300d30588b4f57ba382647321152
parent87816a9327dcb13b51ac01b74b09aabea4a719d0
Add --modify-fds=[no|high] option

Normally a newly recreated file descriptor gets the lowest number
available. This might cause old file descriptor numbers to be reused
and hides bad file descriptor accesses (because the old number is
new again).

When enabled, when the program opens a new file descriptor,
the highest available file descriptor is returned instead of the
lowest one.

Add the none/tests/track_new.stderr.exp test to test this
new option.
use_after_close
Adjust none/tests/filter_fdleak to filter the track_new.vgtest,
because of the fdleak changes, the output of the use_after_close
test also had to be adjusted. ALso adjust the none/tests/cmdline1
and none/tests/cmdline2 output as the new --modify-fds=no|high is
displayed.

https://bugs.kde.org/show_bug.cgi?id=493433
16 files changed:
coregrind/m_main.c
coregrind/m_options.c
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c
docs/xml/manual-core.xml
include/pub_tool_options.h
none/tests/Makefile.am
none/tests/cmdline1.stdout.exp
none/tests/cmdline2.stdout.exp
none/tests/filter_fdleak
none/tests/track_new.c [new file with mode: 0644]
none/tests/track_new.stderr.exp [new file with mode: 0644]
none/tests/track_new.stdout.exp [new file with mode: 0644]
none/tests/track_new.vgtest [new file with mode: 0644]
none/tests/use_after_close.stderr.exp