]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add --modify-fds=[no|high] option users/ahajkova/try-fds
authorAlexandra Hájková <ahajkova@redhat.com>
Wed, 20 Nov 2024 17:00:47 +0000 (12:00 -0500)
committerAlexandra Hájková <ahajkova@redhat.com>
Thu, 13 Mar 2025 13:03:20 +0000 (14:03 +0100)
commit969737f04c68b1c105be88572810ff3c477d81ad
tree9ec3f10e3184cddf6025f7dc23390cde2548f37a
parentb65a739f2a63047565ac2d654931c95ae9d44b62
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