You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(83) |
Oct
(89) |
Nov
(97) |
Dec
(30) |
2024 |
Jan
(25) |
Feb
(73) |
Mar
(76) |
Apr
(122) |
May
(46) |
Jun
(44) |
Jul
(27) |
Aug
(30) |
Sep
(33) |
Oct
(67) |
Nov
(91) |
Dec
(70) |
2025 |
Jan
(44) |
Feb
(36) |
Mar
(85) |
Apr
(100) |
May
(138) |
Jun
(55) |
Jul
(107) |
Aug
(26) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark W. <ma...@kl...> - 2025-04-22 16:38:10
|
Hi Florian, On Tue, 2025-04-22 at 00:29 +0200, Florian Krohm wrote: > On 18.04.25 15:53, Mark Wielaard wrote: > > Slightly later than originally planned, but the RC1 is finally out! > > > > An RC1 tarball for 3.25.0 is now available at > > https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2 > > (md5sum = 2f02fe951278ebde62bba65c3a311a40) > > (sha1sum = 3679ddc3237455f07de0ae30f21e947868c2218e) > > https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2.asc > > > > Please give it a try in configurations that are important for you and > > report any problems you have > > none/tests/bug290061.c > bug290061.c:1:13: warning: ‘meh’ defined but not used [-Wunused-variable] > > I guess we want a clean build.. Making 'meh' volatile removes the warning. I am not seeing that locally. meh is used, although maybe the compiler is smart enough to notice only meh[0] is actually used. What compiler (version) and flags are you using? > These files are missing: > - auxprogs/ltp-tester.sh > - auxprogs/ltp-excludes.txt > - auxprogs/ltp-error-patterns.txt Oops. Added them to EXTRA_DIST so they are in the tar ball for RC2. > After adding them make ltpchecks took some 45 minutes on my z15 with about 46 > failing tests. Not too bad.. I assume most of the failures are missing syscall wrappers? On my x86_64 setup I got 66 FAILs, full log here: https://bugsfiles.kde.org/attachment.cgi?id=180366 Cheers, Mark |
From: Mark W. <ma...@so...> - 2025-04-22 16:34:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=f1a9c084d59bacac51535922f1f3c77b6fea08d0 commit f1a9c084d59bacac51535922f1f3c77b6fea08d0 Author: Mark Wielaard <ma...@kl...> Date: Tue Apr 22 18:24:31 2025 +0200 auxprogs/Makefile.am (EXTRA_DIST): Add ltpchecks helper files ltp-tester.sh, ltp-excludes.txt and ltp-error-patterns.txt, breaking make ltpchecks. Diff: --- auxprogs/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index 00c743bc11..9cec4f222b 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -16,6 +16,9 @@ EXTRA_DIST = \ gsl-1.6.patch \ gsl-1.6.supp \ gsl-1.6.out.x86.exp \ + ltp-tester.sh \ + ltp-excludes.txt \ + ltp-error-patterns.txt \ posixtestsuite-1.5.1-diff.txt \ ppcfround.c \ ppc64shifts.c \ |
From: Paul F. <pj...@wa...> - 2025-04-22 05:36:44
|
On 4/22/25 00:29, Florian Krohm wrote: > On 18.04.25 15:53, Mark Wielaard wrote: >> Slightly later than originally planned, but the RC1 is finally out! >> >> An RC1 tarball for 3.25.0 is now available at >> https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2 >> (md5sum = 2f02fe951278ebde62bba65c3a311a40) >> (sha1sum = 3679ddc3237455f07de0ae30f21e947868c2218e) >> https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2.asc >> >> Please give it a try in configurations that are important for you and >> report any problems you have > > > none/tests/bug290061.c > bug290061.c:1:13: warning: ‘meh’ defined but not used [-Wunused-variable] > > I guess we want a clean build.. Making 'meh' volatile removes the > warning. > There was another problem as well with clang. Both should now be fixed. Thanks Paul |
From: Paul F. <pa...@so...> - 2025-04-22 05:29:53
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=866f58b3b5edd4731f210b4f5f48f459f2c600a5 commit 866f58b3b5edd4731f210b4f5f48f459f2c600a5 Author: Paul Floyd <pj...@wa...> Date: Tue Apr 22 07:22:42 2025 +0200 Regtest: clean up warning and compilation of bug290061.c On some platforms there was a 'defined but not used' warning. When I fixed that I got a link error from clang. Using a _LDFLAGS option causes automake to split building the test into separate compile and link commands and clang was optimizing away the unused static 'meh' symbol. Diff: --- none/tests/Makefile.am | 1 + none/tests/bug290061.c | 1 + 2 files changed, 2 insertions(+) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 8f9018f46a..043454828a 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -378,6 +378,7 @@ AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) # Extra stuff for C tests ansi_CFLAGS = $(AM_CFLAGS) -ansi +bug290061_CFLAGS = -fPIC bug290061_LDFLAGS = @FLAG_PIE@ bug491394_LDADD = -lc bug491394_LDFLAGS = -nostdlib -static diff --git a/none/tests/bug290061.c b/none/tests/bug290061.c index 40d847e8e1..8a77037adf 100644 --- a/none/tests/bug290061.c +++ b/none/tests/bug290061.c @@ -1,5 +1,6 @@ static char meh[3000000]; // ~3mb int main(void) { + return meh[0]; } |
From: Florian K. <fl...@ei...> - 2025-04-21 22:30:20
|
On 18.04.25 15:53, Mark Wielaard wrote: > Slightly later than originally planned, but the RC1 is finally out! > > An RC1 tarball for 3.25.0 is now available at > https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2 > (md5sum = 2f02fe951278ebde62bba65c3a311a40) > (sha1sum = 3679ddc3237455f07de0ae30f21e947868c2218e) > https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2.asc > > Please give it a try in configurations that are important for you and > report any problems you have none/tests/bug290061.c bug290061.c:1:13: warning: ‘meh’ defined but not used [-Wunused-variable] I guess we want a clean build.. Making 'meh' volatile removes the warning. These files are missing: - auxprogs/ltp-tester.sh - auxprogs/ltp-excludes.txt - auxprogs/ltp-error-patterns.txt After adding them make ltpchecks took some 45 minutes on my z15 with about 46 failing tests. Not too bad.. make auxchecks and gsl19test (both with -O2 and -O3) ran without errors. I'll do some more testing on Tuesday. Florian |
From: Paul F. <pa...@so...> - 2025-04-21 19:05:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=078ba93d0d00c2a3cb62b99af2ba77a34c5212ac commit 078ba93d0d00c2a3cb62b99af2ba77a34c5212ac Author: Paul Floyd <pj...@wa...> Date: Mon Apr 21 20:44:31 2025 +0200 Illumos regtest: add an expected for none/tests/fdleak_socketpair_xml.stderr illumos socketpair doesn't get the next two fds (3 and 4), instead it gets 4 and 5. That looks like it's because this is done in two steps in libc. so_socket gets called twice returnning fds 3 and 4 the so_socketpair takes those and does some rebinding(?) resulting in fds 4 and 5. Diff: --- none/tests/Makefile.am | 1 + .../tests/fdleak_socketpair_xml.stderr.exp-illumos | 83 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 37c94515d6..8f9018f46a 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -165,6 +165,7 @@ EXTRA_DIST = \ fdleak_pipe_xml.stderr.exp fdleak_pipe_xml.vgtest \ fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \ fdleak_socketpair_xml.stderr.exp fdleak_socketpair_xml.vgtest \ + fdleak_socketpair_xml.stderr.exp-illumos \ floored.stderr.exp floored.stdout.exp floored.vgtest \ fork.stderr.exp fork.stdout.exp fork.vgtest \ fucomip.stderr.exp fucomip.vgtest \ diff --git a/none/tests/fdleak_socketpair_xml.stderr.exp-illumos b/none/tests/fdleak_socketpair_xml.stderr.exp-illumos new file mode 100644 index 0000000000..f01a80440a --- /dev/null +++ b/none/tests/fdleak_socketpair_xml.stderr.exp-illumos @@ -0,0 +1,83 @@ +<?xml version="1.0"?> + +<valgrindoutput> + +<protocolversion>5</protocolversion> +<protocoltool>none</protocoltool> + +<preamble> + <line>Nulgrind, the minimal Valgrind tool</line> + <line>Copyright...</line> + <line>Using Valgrind...</line> + <line>Command: ./fdleak_socketpair</line> +</preamble> + +<pid>...</pid> +<ppid>...</ppid> +<tool>none</tool> + +<args> + <vargv> + <exe>...</exe> + <arg>--command-line-only=yes</arg> + <arg>--memcheck:leak-check=no</arg> + <arg>--tool=none</arg> + <arg>--track-fds=yes</arg> + <arg>--xml=yes</arg> + <arg>--xml-fd=2</arg> + </vargv> + <argv> + <exe>...</exe> + </argv> +</args> + +<status> + <state>RUNNING</state> + <time>...</time> +</status> + + +<status> + <state>FINISHED</state> + <time>...</time> +</status> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>FdNotClosed</kind> + <fd>5</fd> + <what>...</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>fdleak_socketpair.c</file> + <line>13</line> + </frame> + </stack> +</error> + +<error> + <unique>0x........</unique> + <tid>...</tid> + <kind>FdNotClosed</kind> + <fd>4</fd> + <what>...</what> + <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>main</fn> + <dir>...</dir> + <file>fdleak_socketpair.c</file> + <line>13</line> + </frame> + </stack> +</error> + + +</valgrindoutput> + |
From: Paul F. <pa...@so...> - 2025-04-20 20:16:16
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8464c3cf8fb4dd8138c60fd2f013fd376142153c commit 8464c3cf8fb4dd8138c60fd2f013fd376142153c Author: Paul Floyd <pj...@wa...> Date: Sun Apr 20 22:14:44 2025 +0200 Illumos suppression and regtest Broaden the printf suppression Add an expected for helgrind/tests/bar_bad Diff: --- helgrind/tests/Makefile.am | 1 + helgrind/tests/bar_bad.stderr.exp-illumos | 84 +++++++++++++++++++++++++++++++ solaris11.supp | 1 + 3 files changed, 86 insertions(+) diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index bffd5bf76a..7adc5c6021 100755 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST = \ bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ bar_bad.stderr.exp-destroy-hang \ bar_bad.stderr.exp-freebsd \ + bar_bad.stderr.exp-illumos \ bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ free_is_write.vgtest free_is_write.stdout.exp \ free_is_write.stderr.exp \ diff --git a/helgrind/tests/bar_bad.stderr.exp-illumos b/helgrind/tests/bar_bad.stderr.exp-illumos new file mode 100644 index 0000000000..86bd8fab77 --- /dev/null +++ b/helgrind/tests/bar_bad.stderr.exp-illumos @@ -0,0 +1,84 @@ + +initialise a barrier with zero count +---Thread-Announcement------------------------------------------ + +Thread #x is the program's root thread + +---------------------------------------------------------------- + +Thread #x: pthread_barrier_init: 'count' argument is zero + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:49) + +---------------------------------------------------------------- + +Thread #x's call to pthread_barrier_init failed + with error code 22 (EINVAL: Invalid argument) + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:49) + + +initialise a barrier twice +---------------------------------------------------------------- + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:55) + + +initialise a barrier which has threads waiting on it +---------------------------------------------------------------- + +Thread #x: pthread_barrier_init: barrier is already initialised + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:72) + +---------------------------------------------------------------- + +Thread #x: pthread_barrier_init: threads are waiting at barrier + at 0x........: pthread_barrier_init (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:72) + + +destroy a barrier that has waiting threads +---------------------------------------------------------------- + +Thread #x: pthread_barrier_destroy: threads are waiting at barrier + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:90) + +---------------------------------------------------------------- + +Thread #x: pthread_cond_destroy: destruction of condition variable being waited upon + at 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...) + ... + by 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:90) + + +destroy a barrier that was never initialised +---------------------------------------------------------------- + +Thread #x: pthread_barrier_destroy: barrier was never initialised + at 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:107) + +---------------------------------------------------------------- + +Thread #x: pthread_mutex_destroy with invalid argument + at 0x........: mutex_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_mutex_destroy (hg_intercepts.c:...) + ... + by 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:107) + +---------------------------------------------------------------- + +Thread #x: pthread_cond_destroy: destruction of unknown cond var + at 0x........: pthread_cond_destroy_WRK (hg_intercepts.c:...) + by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...) + ... + by 0x........: pthread_barrier_destroy (hg_intercepts.c:...) + by 0x........: main (bar_bad.c:107) + diff --git a/solaris11.supp b/solaris11.supp index c772df3955..5d51a6a3f7 100644 --- a/solaris11.supp +++ b/solaris11.supp @@ -66,6 +66,7 @@ { Illumos:printf Helgrind:Race + ... fun:printf } # conflict between pthread_barrier_init and pthread_barrier_wait |
From: Paul F. <pa...@so...> - 2025-04-19 10:03:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5d8271e5773da3ea1756a06085271b58e0384106 commit 5d8271e5773da3ea1756a06085271b58e0384106 Author: Paul Floyd <pj...@wa...> Date: Sat Apr 19 12:01:26 2025 +0200 FreeBSD regtest: add auxv_script to dist_noinst_SCRIPTS Diff: --- none/tests/freebsd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 15ea01cc9e..5d209c6d27 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr test.sh filter_452274 filter_auxv filter_fdleak +dist_noinst_SCRIPTS = filter_stderr test.sh filter_452274 filter_auxv filter_fdleak auxv_script EXTRA_DIST = \ auxv.vgtest \ |
From: Paul F. <pa...@so...> - 2025-04-18 20:16:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=860e1b488446b7b4c16bece1159321c796f4e40c commit 860e1b488446b7b4c16bece1159321c796f4e40c Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 22:14:54 2025 +0200 Helgrind regtest: use --check-cond-signal-mutex=yes in tc20_verifywrap Diff: --- helgrind/tests/tc20_verifywrap.vgtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helgrind/tests/tc20_verifywrap.vgtest b/helgrind/tests/tc20_verifywrap.vgtest index cde1b21751..5e41d76d5f 100644 --- a/helgrind/tests/tc20_verifywrap.vgtest +++ b/helgrind/tests/tc20_verifywrap.vgtest @@ -1,3 +1,3 @@ prereq: test -e tc20_verifywrap && ! ../../tests/os_test freebsd prog: tc20_verifywrap -vgopts: --read-var-info=yes --sigill-diagnostics=no +vgopts: --read-var-info=yes --sigill-diagnostics=no --check-cond-signal-mutex=yes |
From: Paul F. <pa...@so...> - 2025-04-18 18:38:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d497c30fc6398a4b3aee92231749ac4072c7de3b commit d497c30fc6398a4b3aee92231749ac4072c7de3b Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 20:37:12 2025 +0200 Doc: add description of cond signal without mutex lock. Diff: --- helgrind/docs/hg-manual.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helgrind/docs/hg-manual.xml b/helgrind/docs/hg-manual.xml index 6ec8caa3f4..398fd73a70 100644 --- a/helgrind/docs/hg-manual.xml +++ b/helgrind/docs/hg-manual.xml @@ -141,6 +141,15 @@ are:</para> <para>Checks pertaining to the validity of mutexes are generally also performed for reader-writer locks.</para> +<para>Signalling or broadcasting a condition variable when the +associated mutex is unlocked is not strictly an error. The resulting +thread scheduling may be unpredictable if the mutex is not held. +The option <computeroutput>--check-cond-signal-mutex=yes|no</computeroutput> +turns on checking for this situation. This kind of error is +categorised as 'dubious'. The check is not turned on by default +because some standard C and C++ libraries use condition +signals/broadcasts with the associated mutex unlocked.</para> + <para>Various kinds of this-can't-possibly-happen events are also reported. These usually indicate bugs in the system threading library.</para> |
From: Paul F. <pa...@so...> - 2025-04-18 17:32:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e2aa12c84e662cbe1966c61408323f1a4d589f6e commit e2aa12c84e662cbe1966c61408323f1a4d589f6e Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 19:32:05 2025 +0200 Add 3.25 highlights to NEWS for FreeBSD. Diff: --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index b6b822202d..e5be7f53a9 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,12 @@ AMD64/macOS 10.13 and nanoMIPS/Linux. * Numerous bug fixes for Illumos, in particular fixed a Valgrind crash whenever a signal handler was called. +* On FreeBSD, a change to the libc code that runs atexit handlers was + causing Helgrind to produce an extra error about exiting threads + still holding locks for. This applied to every multithreaded application. + The extra error is now filtered out. A syscall wrapper had been added + for getrlimitusage. + * ==================== TOOL CHANGES =================== * The --track-fds=yes and --track-fds=all options now treat all |
From: Paul F. <pa...@so...> - 2025-04-18 17:17:54
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=954eadb149d5165700fc3ed6d47e435d3c381531 commit 954eadb149d5165700fc3ed6d47e435d3c381531 Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 13:35:45 2025 +0200 Bug 502871 - Make Helgrind "pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread" optional Diff: --- NEWS | 11 +++++++++++ helgrind/hg_main.c | 17 ++++++++++++----- helgrind/tests/bug392331.vgtest | 2 +- helgrind/tests/tc23_bogus_condwait.stderr.exp | 3 --- helgrind/tests/tc23_bogus_condwait.stderr.exp-freebsd | 3 --- helgrind/tests/tc23_bogus_condwait.stderr.exp-mips32 | 3 --- helgrind/tests/tc23_bogus_condwait.vgtest | 2 ++ 7 files changed, 26 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index afdbacd331..b6b822202d 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,15 @@ AMD64/macOS 10.13 and nanoMIPS/Linux. And when the stdin/out/err descriptors are reassigned they are now treated as normal (non-inherited) file descriptors. +* Helgrind: + There is a change to warnings about calls to pthread_cond_signal and + pthread_cond_broadcast when the associated mutex is unlocked. Previously + Helgrind would always warn about this. Now this error is controlled by + a command line option, --check-cond-signal-mutex=yes|no. The default is + no. This change has been made because some C and C++ standard libraries + use pthread_cond_signal/pthread_cond_broadcast in this way. Users are + obliged to use suppressions if they wish to avoid this noise. + * ==================== FIXED BUGS ==================== The following bugs have been fixed or resolved. Note that "n-i-bz" @@ -80,6 +89,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 502288 s390x: Memcheck false positives with NNPA last tensor dimension 502324 s390x: Memcheck false positives with TMxx and TM/TMY 502679 Use LTP for testing valgrind +502871 Make Helgrind "pthread_cond_{signal,broadcast}: dubious: associated + lock is not held by any thread" optional To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 6a300b83bb..135c4d3b98 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -165,6 +165,7 @@ Bool HG_(clo_ignore_thread_creation) = True; #else Bool HG_(clo_ignore_thread_creation) = False; #endif /* VGO_solaris */ +Bool HG_(clo_check_cond_signal_mutex) = False; static ThreadId map_threads_maybe_reverse_lookup_SLOW ( Thread* thr ); /*fwds*/ @@ -2454,7 +2455,7 @@ static void evh__HG_PTHREAD_COND_SIGNAL_PRE ( ThreadId tid, void* cond ) HG_(record_error_Misc)(thr, "pthread_cond_{signal,broadcast}: associated lock is a rwlock"); } - if (lk->heldBy == NULL) { + if (HG_(clo_check_cond_signal_mutex) && lk->heldBy == NULL) { HG_(record_error_Dubious)(thr, "pthread_cond_{signal,broadcast}: dubious: " "associated lock is not held by any thread"); @@ -5840,7 +5841,8 @@ static Bool hg_process_cmd_line_option ( const HChar* arg ) HG_(clo_check_stack_refs)) {} else if VG_BOOL_CLO(arg, "--ignore-thread-creation", HG_(clo_ignore_thread_creation)) {} - + else if VG_BOOL_CLO(arg, "--check-cond-signal-mutex", + HG_(clo_check_cond_signal_mutex)) {} else return VG_(replacement_malloc_process_cmd_line_option)(arg); @@ -5859,14 +5861,19 @@ static void hg_print_usage ( void ) " --history-backtrace-size=<number> record <number> callers for full\n" " history level [8]\n" " --delta-stacktrace=no|yes [yes on linux amd64/x86]\n" -" no : always compute a full history stacktrace from unwind info\n" -" yes : derive a stacktrace from the previous stacktrace\n" +" no: always compute a full history stacktrace from unwind info\n" +" yes: derive a stacktrace from the previous stacktrace\n" " if there was no call/return or similar instruction\n" " --conflict-cache-size=N size of 'full' history cache [2000000]\n" " --check-stack-refs=no|yes race-check reads and writes on the\n" " main stack and thread stacks? [yes]\n" " --ignore-thread-creation=yes|no Ignore activities during thread\n" -" creation [%s]\n", +" creation [%s]\n""" +" --check-cond-signal-mutex=yes|no [no]\n" +" no: do not check that the associated mutex is locked for calls\n" +" to pthread_cond_{signal,broadcast}\n" +" yes: generate 'dubious' error messages if the associated mutex\n" +" is unlocked\n", HG_(clo_ignore_thread_creation) ? "yes" : "no" ); } diff --git a/helgrind/tests/bug392331.vgtest b/helgrind/tests/bug392331.vgtest index 3889b15f77..f300c5cc13 100644 --- a/helgrind/tests/bug392331.vgtest +++ b/helgrind/tests/bug392331.vgtest @@ -1,4 +1,4 @@ prereq: test -e bug392331 -vgopts: -q +vgopts: -q --check-cond-signal-mutex=yes prog: bug392331 stderr_filter: filter_bug392331 diff --git a/helgrind/tests/tc23_bogus_condwait.stderr.exp b/helgrind/tests/tc23_bogus_condwait.stderr.exp index e1611a5d8f..84289f1684 100644 --- a/helgrind/tests/tc23_bogus_condwait.stderr.exp +++ b/helgrind/tests/tc23_bogus_condwait.stderr.exp @@ -1,4 +1,3 @@ - ---Thread-Announcement------------------------------------------ Thread #x is the program's root thread @@ -52,5 +51,3 @@ Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex by 0x........: pthread_cond_wait@* (hg_intercepts.c:...) by 0x........: main (tc23_bogus_condwait.c:85) - -ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc23_bogus_condwait.stderr.exp-freebsd b/helgrind/tests/tc23_bogus_condwait.stderr.exp-freebsd index 1eee38a90e..562bf71ebe 100644 --- a/helgrind/tests/tc23_bogus_condwait.stderr.exp-freebsd +++ b/helgrind/tests/tc23_bogus_condwait.stderr.exp-freebsd @@ -1,4 +1,3 @@ - ---Thread-Announcement------------------------------------------ Thread #x is the program's root thread @@ -96,5 +95,3 @@ Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by 0x........: mythread_wrapper (hg_intercepts.c:...) ... - -ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc23_bogus_condwait.stderr.exp-mips32 b/helgrind/tests/tc23_bogus_condwait.stderr.exp-mips32 index 6ed9ef8239..8ce9de66c2 100644 --- a/helgrind/tests/tc23_bogus_condwait.stderr.exp-mips32 +++ b/helgrind/tests/tc23_bogus_condwait.stderr.exp-mips32 @@ -1,4 +1,3 @@ - ---Thread-Announcement------------------------------------------ Thread #x is the program's root thread @@ -60,5 +59,3 @@ Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex by 0x........: pthread_cond_wait@* (hg_intercepts.c:...) by 0x........: main (tc23_bogus_condwait.c:78) - -ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc23_bogus_condwait.vgtest b/helgrind/tests/tc23_bogus_condwait.vgtest index 31c3ed8b9a..918cd86e4c 100644 --- a/helgrind/tests/tc23_bogus_condwait.vgtest +++ b/helgrind/tests/tc23_bogus_condwait.vgtest @@ -1 +1,3 @@ prog: tc23_bogus_condwait +vgopts: -q --check-cond-signal-mutex=yes + |
From: Mark W. <ma...@kl...> - 2025-04-18 15:47:23
|
Hi all, On Mon, 2025-04-14 at 14:06 +0200, Mark Wielaard wrote: > On Sun, Apr 06, 2025 at 03:23:54PM +0200, Mark Wielaard wrote: > > On Mon, Mar 31, 2025 at 11:29:41AM +0200, Mark Wielaard wrote: > > > On Fri, Mar 28, 2025 at 07:02:28PM +0100, Mark Wielaard wrote: > > > > On Fri, 2025-03-21 at 14:01 +0100, Florian Weimer wrote: > > > > > Without this change, the system call wrapper function is not visible > > > > > on the stack at the time of the system call, which causes problems > > > > > for interception tools such as valgrind. > > > > > > > > > > Enhances commit 89b53077d2a58f00e7debdfe58afabe953dac60d ("nptl: Fix > > > > > Race conditions in pthread cancellation [BZ#12683]"). > > > > > > > > > > Tested on i686-linux-gnu, powerpc64le-linux-gnu, x86_64-linux-gnu. > > > > > (We're still discussing if valgrind needs this, but if it does, here's a > > > > > patch.) > > > > > > > > I implemented the valgrind part of skipping the syscall_cancel frames > > > > here: https://bugs.kde.org/show_bug.cgi?id=502126#c2 > > > > And there is a valgrind package build for fedora rawhide: > > > > https://koji.fedoraproject.org/koji/buildinfo?buildID=2687393 > > > > > > > > For ppc64le, s390x and x86_64 that patch seems enough. > > > > > > > > For i686 and aarch64 there does seem to be an issue with missing the > > > > glibc calling function because of a tail call. > > > > > > > > Also on i686 there is another extra frame on top __libc_do_syscall. > > > > > > I extended the patch to cover some extra sycall wrapper function > > > symbols on i386 and armhf and pushed it to valgrind trunk and > > > VALGRIND_3_24_BRANCH. There are builds for fedora rawhide and > > > f42. This does seem to show that only on arm64 the tail calls > > > obscure observing the full call stack. > > > > This has now landed in fedora rawhide and f42. Test results look good, > > except for some if the arm64 tests where the tail calls obscure > > observing the full call stack. Please let me know if you need any more > > input from us to get this fix in glibc. > > Please let me know. Valgrind test results for syscall backtraces on > anything except arm64 look good. We are working on valgrind 3.25.0 > now, to be released around April 24. valgrind 3.25.0-RC1 has been released and test results look good on most arches. arm64 does show the issue described above where the tail calls obscure observing the full call stack when doing system calls. Let me know what would be needed to get the above patch reviewed. Thanks, Mark |
From: Mark W. <ma...@kl...> - 2025-04-18 13:54:28
|
Slightly later than originally planned, but the RC1 is finally out! An RC1 tarball for 3.25.0 is now available at https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2 (md5sum = 2f02fe951278ebde62bba65c3a311a40) (sha1sum = 3679ddc3237455f07de0ae30f21e947868c2218e) https://sourceware.org/pub/valgrind/valgrind-3.25.0.RC1.tar.bz2.asc Please give it a try in configurations that are important for you and report any problems you have, either on this mailing list, or (preferably) via our bug tracker at https://bugs.kde.org/enter_bug.cgi?product=valgrind The NEWS file isn't complete up to date yet, but some highlights: - Initial RISCV64/Linux support. - Valgrind gdbserver supports 'x' packets. - Numerous bug fixes for Illumos. - --track-fds=yes now treats all inherited file descriptors like stdin/out/err (0,1,2) and there is a --modify-fds=high option. - s390x support for various new instructions (BPP, BPRP and NIAI) - Various new linux syscalls are supported (landlock*, open_tree, move_mount, fsopen, fsconfig, fsmount, fspick, userfaultfd) - The Linux Test Project (ltp) is integrated in the testsuite try 'make ltpchecks' (this will take a while and will point out various missing syscalls and valgrind crashes!) Since this RC1 is slightly later than planned and it is a long Easter weekend for those that celebrate, lets do the RC2 on Wed Apr 25, with the 3.25.0 final on Fri Apr 27. |
From: Mark W. <ma...@so...> - 2025-04-18 13:05:06
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7279362391e1b53f7b7ac1a92544e92ada0247e9 commit 7279362391e1b53f7b7ac1a92544e92ada0247e9 Author: Mark Wielaard <ma...@kl...> Date: Fri Apr 18 14:22:31 2025 +0200 Set version to 3.25.0-RC1 Also update vg-lifespan which is used for documentation copyright years. Diff: --- NEWS | 3 ++- configure.ac | 4 ++-- docs/xml/vg-entities.xml.in | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 89d450a8b4..afdbacd331 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Release 3.25.0 (?? Apr 2025) +Release 3.25.0.RC1 (18 Apr 2025) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, @@ -85,6 +85,7 @@ To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX where XXXXXX is the bug number as listed above. +(3.25.0.RC1: 18 Apr 2025) Release 3.24.0 (31 Oct 2024) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/configure.ac b/configure.ac index 862e6feed2..873d065dc4 100755 --- a/configure.ac +++ b/configure.ac @@ -18,8 +18,8 @@ AC_PREREQ(2.69) m4_define([v_major_ver], [3]) m4_define([v_minor_ver], [25]) m4_define([v_micro_ver], [0]) -m4_define([v_suffix_ver], [GIT]) -m4_define([v_rel_date], ["?? Apr 2025"]) +m4_define([v_suffix_ver], [RC1]) +m4_define([v_rel_date], ["18 Apr 2025"]) m4_define([v_version], m4_if(v_suffix_ver, [], [v_major_ver.v_minor_ver.v_micro_ver], diff --git a/docs/xml/vg-entities.xml.in b/docs/xml/vg-entities.xml.in index 2feaeec2f2..9cf75536db 100644 --- a/docs/xml/vg-entities.xml.in +++ b/docs/xml/vg-entities.xml.in @@ -2,7 +2,7 @@ <!ENTITY vg-jemail "ju...@va..."> <!ENTITY vg-vemail "val...@va..."> <!ENTITY cl-email "Jos...@gm..."> -<!ENTITY vg-lifespan "2000-2024"> +<!ENTITY vg-lifespan "2000-2025"> <!-- valgrind release + version stuff --> <!ENTITY rel-type "Release"> |
From: Mark W. <ma...@so...> - 2025-04-18 13:05:01
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ab770bba01d5585748de8d790e7da36ed9475301 commit ab770bba01d5585748de8d790e7da36ed9475301 Author: Mark Wielaard <ma...@kl...> Date: Fri Apr 18 14:53:44 2025 +0200 Update libiberty demangler Update the libiberty demangler using the auxprogs/update-demangler script to gcc git commit 94bea5dd6c9a06ddb6244be1e5196ff5fbe2b186. This update includes: * libiberty: Restore build with CP_DEMANGLE_DEBUG defined * non-gcc: Remove trailing whitespace * libiberty: Fix comment typos Diff: --- auxprogs/update-demangler | 4 ++-- coregrind/m_demangle/cp-demangle.c | 4 ++-- coregrind/m_demangle/demangle.h | 6 +++--- coregrind/m_demangle/dyn-string.h | 2 +- coregrind/m_demangle/safe-ctype.h | 1 - 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/auxprogs/update-demangler b/auxprogs/update-demangler index 9b62fffca5..3968239759 100755 --- a/auxprogs/update-demangler +++ b/auxprogs/update-demangler @@ -17,8 +17,8 @@ set -e #--------------------------------------------------------------------- # You need to modify these revision numbers for your update. -old_gcc_revision=1719fa40c4ee4def60a2ce2f27e17f8168cf28ba # the revision of the previous update -new_gcc_revision=ca2f7c84927f85b95f0f48f82b93f1460c372db4 # the revision for this update +old_gcc_revision=ca2f7c84927f85b95f0f48f82b93f1460c372db4 # the revision of the previous update +new_gcc_revision=94bea5dd6c9a06ddb6244be1e5196ff5fbe2b186 # the revision for this update # Unless the organization of demangler related files has changed, no # changes below this line should be necessary. diff --git a/coregrind/m_demangle/cp-demangle.c b/coregrind/m_demangle/cp-demangle.c index b1a8d87e59..a3d1b8810b 100644 --- a/coregrind/m_demangle/cp-demangle.c +++ b/coregrind/m_demangle/cp-demangle.c @@ -672,9 +672,9 @@ d_dump (struct demangle_component *dc, int indent) return; case DEMANGLE_COMPONENT_EXTENDED_BUILTIN_TYPE: { - char suffix[2] = { dc->u.s_extended_builtin.type->suffix, 0 }; + char suffix[2] = { dc->u.s_extended_builtin.suffix, 0 }; printf ("builtin type %s%d%s\n", dc->u.s_extended_builtin.type->name, - dc->u.s_extended_builtin.type->arg, suffix); + dc->u.s_extended_builtin.arg, suffix); } return; case DEMANGLE_COMPONENT_OPERATOR: diff --git a/coregrind/m_demangle/demangle.h b/coregrind/m_demangle/demangle.h index a518153472..8b7dd705ac 100644 --- a/coregrind/m_demangle/demangle.h +++ b/coregrind/m_demangle/demangle.h @@ -66,14 +66,14 @@ extern "C" { /* Disable a limit on the depth of recursion in mangled strings. Note if this limit is disabled then stack exhaustion is possible when demangling pathologically complicated strings. Bug reports about stack - exhaustion when the option is enabled will be rejected. */ -#define DMGL_NO_RECURSE_LIMIT (1 << 18) + exhaustion when the option is enabled will be rejected. */ +#define DMGL_NO_RECURSE_LIMIT (1 << 18) /* If DMGL_NO_RECURSE_LIMIT is not enabled, then this is the value used as the maximum depth of recursion allowed. It should be enough for any real-world mangled name. */ #define DEMANGLE_RECURSION_LIMIT 2048 - + /* Enumeration of possible demangling styles. Lucid and ARM styles are still kept logically distinct, even though diff --git a/coregrind/m_demangle/dyn-string.h b/coregrind/m_demangle/dyn-string.h index 9052780c96..b0a108d9fa 100644 --- a/coregrind/m_demangle/dyn-string.h +++ b/coregrind/m_demangle/dyn-string.h @@ -3,7 +3,7 @@ Contributed by Mark Mitchell (ma...@ma...). This file is part of GCC. - + GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) diff --git a/coregrind/m_demangle/safe-ctype.h b/coregrind/m_demangle/safe-ctype.h index fa9c85af4b..d3e5214d58 100644 --- a/coregrind/m_demangle/safe-ctype.h +++ b/coregrind/m_demangle/safe-ctype.h @@ -122,7 +122,6 @@ extern const unsigned char _sch_tolower[256]; #if 0 /* in valgrind */ #include <ctype.h> #endif /* ! in valgrind */ - #undef isalpha #define isalpha(c) do_not_use_isalpha_with_safe_ctype #undef isalnum |
From: Paul F. <pa...@so...> - 2025-04-18 11:25:32
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=15198bde3544cd01edfe17580b136d72aa2595cc commit 15198bde3544cd01edfe17580b136d72aa2595cc Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 13:24:44 2025 +0200 Add a platform note for Illumos to NEWS. Diff: --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index e77c62456b..89d450a8b4 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ AMD64/macOS 10.13 and nanoMIPS/Linux. * ================== PLATFORM CHANGES ================= +* Numerous bug fixes for Illumos, in particular fixed a Valgrind crash + whenever a signal handler was called. + * ==================== TOOL CHANGES =================== * The --track-fds=yes and --track-fds=all options now treat all |
From: Paul F. <pa...@so...> - 2025-04-18 10:45:08
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=13f422b816ec4f6cf3ede836f782e21a67f01124 commit 13f422b816ec4f6cf3ede836f782e21a67f01124 Author: Paul Floyd <pj...@wa...> Date: Fri Apr 18 12:42:55 2025 +0200 Regtest: gdbserver filter another auto-load warning Seen on arm64 with GDB 16 Diff: --- gdbserver_tests/filter_vgdb.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in index b32be68973..50d7a9ff6d 100755 --- a/gdbserver_tests/filter_vgdb.in +++ b/gdbserver_tests/filter_vgdb.in @@ -42,6 +42,7 @@ $SED -e '/warning: File .*valgrind-monitor.py.*declined.*/d' | # and remove loading error messages when python scripts haven't # been installed yet (running against vg-in-place) $SED -e '/warning: Missing auto-load script.*/d' | +$SED -e '/warning: Unsupported auto-load script.*/d' | $SED -e '/of file .*vgpreload.*so.*/d' | $SED -e '/Use.*info auto-load python-scripts.*/d' | $SED -e '/warning: Invalid entry in .debug_gdb_scripts section/d' | |
From: Mark W. <ma...@so...> - 2025-04-18 10:36:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ca5a8e303b8bef7baccfc28ff8b46b65ceb50708 commit ca5a8e303b8bef7baccfc28ff8b46b65ceb50708 Author: Mark Wielaard <ma...@kl...> Date: Fri Apr 18 12:22:29 2025 +0200 Add auxprogs/ltp-excludes.txt There are a couple of ltp testcases that take a very long time to run (under valgrind). Add a file auxprogs/ltp-excludes.txt that is used to exclude them from a make ltpchecks run, containing 10 tests: bind06 epoll-ltp inotify09 msgstress01 sendmsg03 setsockopt06 setsockopt07 signal05 signal06 timerfd_settime02 Excluding these 10 tests brings the execution time of make ltpchecks down to ~45 minutes. Diff: --- auxprogs/ltp-excludes.txt | 10 ++++++++++ auxprogs/ltp-tester.sh | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/auxprogs/ltp-excludes.txt b/auxprogs/ltp-excludes.txt new file mode 100644 index 0000000000..5b1d898c80 --- /dev/null +++ b/auxprogs/ltp-excludes.txt @@ -0,0 +1,10 @@ +bind06 +epoll-ltp +inotify09 +msgstress01 +sendmsg03 +setsockopt06 +setsockopt07 +signal05 +signal06 +timerfd_settime02 diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh index a3c2157c56..000cfaa7f3 100755 --- a/auxprogs/ltp-tester.sh +++ b/auxprogs/ltp-tester.sh @@ -26,7 +26,8 @@ myLog () cd $LTP_SRC_DIR -mapfile -t files < <(find testcases/kernel/syscalls -executable -and -type f | sort) +mapfile -t files < <(find testcases/kernel/syscalls -executable -and -type f \ + | sort | grep -v -f $ORIG_PWD/ltp-excludes.txt) c=${#files[@]}; i=0 for test in "${files[@]}"; do |
From: Mark W. <ma...@so...> - 2025-04-17 20:42:43
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=944a8c864c5e1df6388bf4b47900eb9c001ceb73 commit 944a8c864c5e1df6388bf4b47900eb9c001ceb73 Author: Martin Cermak <mc...@re...> Date: Thu Apr 17 16:14:19 2025 +0200 Use LTP for testing valgrind Add a new top level make target ltpchecks which will fetch the latest linux test project (ltp) release as defined by the LTP_VERSION and LTP_SHA256 variables in auxprogs/Makefile.am (update those when a new version of ltp is released). If the ltp tar.xz has already been downloaded, or it has already been unpacked and build, the (cached) file and build will be reused. The actual testing is done through the auxprogs/ltp-tester.sh script. It takes all executable tests from the ltp testcases under kernel/syscalls and runs them 3 times. Once directly, not under valgrind, once with -q --tool=none and once with -q --tool=memcheck. It then checks that valgrind didn't produce any messages with the none tool, that there were no fatal errors produced (as defined in auxprogs/ltp-error-patterns.txt) and that the ltp results are the same with and without valgrind. Currently there are 1472 test binaries and running them all (serially) takes more than three hours and detects various missing or incomplete syscall handlers in valgrind, plus various crashers. https://bugs.kde.org/show_bug.cgi?id=502679 Diff: --- Makefile.am | 3 ++ NEWS | 1 + auxprogs/Makefile.am | 35 +++++++++++++++++- auxprogs/ltp-error-patterns.txt | 6 ++++ auxprogs/ltp-tester.sh | 78 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 14309dacfa..e67356b5a0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -103,6 +103,9 @@ perf: check auxchecks: all $(MAKE) -C auxprogs auxchecks +ltpchecks: all + $(MAKE) -C auxprogs ltpchecks + # Nb: no need to include any Makefile.am files here, or files included from # them, as automake includes them automatically. Also not COPYING, README # or NEWS. diff --git a/NEWS b/NEWS index fac28e7984..e77c62456b 100644 --- a/NEWS +++ b/NEWS @@ -76,6 +76,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 502126 glibc 2.41 extra syscall_cancel frames 502288 s390x: Memcheck false positives with NNPA last tensor dimension 502324 s390x: Memcheck false positives with TMxx and TM/TMY +502679 Use LTP for testing valgrind To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index 3a9709da6f..00c743bc11 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -124,6 +124,9 @@ endif auxchecks: gsl-check auxclean: gsl-clean +ltpchecks: ltp-check +ltpclean: ltp-clean + # You can override AUX_CHECK_DIR to use a previous download/build. # Must be an absolute path. # e.g. make auxchecks AUX_CHECK_DIR=$HOME/valgrind-auxtests @@ -148,6 +151,14 @@ GSL_CFLAGS+=-mfpmath=sse -msse2 endif endif +# Linux Test Project +LTP_VERSION=20250130 +LTP_SHA256_SUM=02e4ec326be54c3fd92968229a468c02c665d168a8a673edc38a891f7395ae10 +LTP_TAR_NAME=ltp-full-$(LTP_VERSION).tar.xz +LTP_URL=https://github.com/linux-test-project/ltp/releases/download/$(LTP_VERSION)/$(LTP_TAR_NAME) +LTP_TAR=$(AUX_CHECK_DIR)/$(LTP_TAR_NAME) +LTP_SRC_DIR=$(AUX_CHECK_DIR)/ltp-full-$(LTP_VERSION) + # Trick to get a literal space to use in substitutions sp := $(subst ,, ) @@ -166,6 +177,10 @@ $(GSL_TAR): mkdir -p $(AUX_CHECK_DIR) wget -q -O $(GSL_TAR) $(GSL_URL) +$(LTP_TAR): + mkdir -p $(AUX_CHECK_DIR) + wget -q -O $(LTP_TAR) $(LTP_URL) + # We need to autoreconf to make sure to get config.guess, config.sub # and libtool for newer architectures. $(GSL_SRC_DIR)/gsl-patched: $(GSL_TAR) @@ -177,6 +192,15 @@ $(GSL_SRC_DIR)/gsl-patched: $(GSL_TAR) autoreconf -f -i -Wnone) touch $@ +$(LTP_SRC_DIR): $(LTP_TAR) + echo "$(LTP_SHA256_SUM) $(LTP_TAR)" | @SHA256SUM@ --check - + (cd $(AUX_CHECK_DIR) && \ + tar Jxf $(LTP_TAR_NAME) && \ + cd $(LTP_SRC_DIR) && \ + ./configure CC="${CC}" CXX="${CXX}" CFLAGS="$(LTP_CFLAGS)" && \ + ${MAKE} -j $(nproc) -C testcases/kernel/syscalls) + touch $@ + # We need make check -k because # some tests might fail even native (only on i386 though). # make check doesn't work reliably with -j. @@ -204,17 +228,26 @@ gsl-check: $(GSL_BUILD_DIR)/gsl-build diff -u $(abs_top_srcdir)/auxprogs/gsl-1.6.out.x86.exp \ $(GSL_BUILD_DIR)/valgrind-gsl.out +ltp-check: $(LTP_SRC_DIR) + LTP_SRC_DIR=$(LTP_SRC_DIR) \ + VALGRIND=$(abs_top_builddir)/vg-in-place \ + $(abs_top_srcdir)/auxprogs/ltp-tester.sh + + # We keep the tarball but remove the unpacked sources and build gsl-clean: rm -rf $(GSL_SRC_NAME) $(GSL_BUILD_DIR) +ltp-clean: + rm -rf $(LTP_SRC_DIR) + #---------------------------------------------------------------------------- # General stuff #---------------------------------------------------------------------------- all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS -clean-local: clean-noinst_DSYMS auxclean +clean-local: clean-noinst_DSYMS auxclean ltpclean install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS diff --git a/auxprogs/ltp-error-patterns.txt b/auxprogs/ltp-error-patterns.txt new file mode 100644 index 0000000000..ee5048bf42 --- /dev/null +++ b/auxprogs/ltp-error-patterns.txt @@ -0,0 +1,6 @@ +VALGRIND INTERNAL ERROR +^valgrind: +WARNING: unhandled +unhandled +Valgrind does not support +Valgrind abort diff --git a/auxprogs/ltp-tester.sh b/auxprogs/ltp-tester.sh new file mode 100755 index 0000000000..a3c2157c56 --- /dev/null +++ b/auxprogs/ltp-tester.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +set -e + +if [ -z "${LTP_SRC_DIR:-}" ]; then + echo "ERROR: LTP_SRC_DIR needs to be set. Dying, bye bye ..." + exit 1 +fi + +ORIG_PATH=$PATH +ORIG_PWD=$PWD +LOGDIR=${LOGDIR:-$LTP_SRC_DIR/valgrind-ltp-logs} +SUMMARY_LOG="$LOGDIR/summary.log" +DIFFCMD="diff -u" +VALGRIND="${VALGRIND:-$LTP_SRC_DIR/../../../vg-in-place}" + +# Initialize LOGDIR +mkdir -p $LOGDIR; rm -rf $LOGDIR/* + +myLog () +{ + msg="$1" + echo "$msg" + echo -e "FAIL: $msg" >> $SUMMARY_LOG +} + +cd $LTP_SRC_DIR + +mapfile -t files < <(find testcases/kernel/syscalls -executable -and -type f | sort) +c=${#files[@]}; i=0 + +for test in "${files[@]}"; do + dir=$(dirname $test) + exe=$(basename $test) + l="$LOGDIR/$exe" + mkdir -p $l + i=$((++i)) + pushd $dir >/dev/null + echo "[$i/$c] Testing $exe ..." | tee -a $SUMMARY_LOG + PATH="$ORIG_PATH:$PWD" + ./$exe >$l/log1std 2>$l/log1err ||: + $VALGRIND -q --tool=none --log-file=$l/log2 ./$exe >$l/log2std 2>$l/log2err ||: + $VALGRIND -q --tool=memcheck --log-file=$l/log3 ./$exe >$l/log3std 2>$l/log3err ||: + + # We want to make sure that LTP syscall tests give identical + # results with and without valgrind. The test logs go to the + # stderr. They aren't identical across individual runs. The + # differences include port numbers, temporary files, test + # output ordering changes and more. They aren't trivially + # comparable. We resort to comparing at least the final + # summary of individual test results + tail -10 $l/log1err | grep -E "^(passed|failed|broken|skipped|warnings):" > $l/log1summary ||: + tail -10 $l/log2err | grep -E "^(passed|failed|broken|skipped|warnings):" > $l/log2summary ||: + tail -10 $l/log3err | grep -E "^(passed|failed|broken|skipped|warnings):" > $l/log3summary ||: + + # Check logs, report errors + pushd $l >/dev/null + if test -s log2; then + myLog "${exe}: unempty log2:\n$(cat log2)" + fi + + if grep -f $ORIG_PWD/ltp-error-patterns.txt * > error-patterns-found.txt; then + myLog "${exe}: error string found:\n$(cat error-patterns-found.txt)" + fi + + if ! ${DIFFCMD} log1summary log2summary >/dev/null; then + myLog "${exe}: ${DIFFCMD} log1summary log2summary:\n$(${DIFFCMD} log1summary log2summary)" + fi + + if ! ${DIFFCMD} log2summary log3summary >/dev/null; then + myLog "${exe}: ${DIFFCMD} log2summary log3summary:\n$(${DIFFCMD} log2summary log3summary)" + fi + popd >/dev/null + popd >/dev/null +done + +echo "TESTING FINISHED, logs in $LOGDIR" + |
From: Paul F. <pa...@so...> - 2025-04-17 19:56:56
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b921a5fb8706d21efe9723b27ada290f1bba946e commit b921a5fb8706d21efe9723b27ada290f1bba946e Author: Paul Floyd <pj...@wa...> Date: Thu Apr 17 21:54:43 2025 +0200 FreeBSD: increase coverage of --modify-mds syscalls As illumos, still missing a couple. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 12b18f4e6e..7ea04fdbc6 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -1410,6 +1410,7 @@ POST(sys_fcntl) { vg_assert(SUCCESS); if (ARG2 == VKI_F_DUPFD) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fcntl(DUPFD)", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -1419,6 +1420,7 @@ POST(sys_fcntl) } } } else if (ARG2 == VKI_F_DUPFD_CLOEXEC) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fcntl(DUPFD_CLOEXEC)", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -2728,6 +2730,7 @@ PRE(sys_fhopen) POST(sys_fhopen) { vg_assert(SUCCESS); + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fhopen", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -3537,6 +3540,7 @@ PRE(sys_kqueue) POST(sys_kqueue) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "kqueue", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -4701,6 +4705,7 @@ PRE(sys_kmq_open) POST(sys_kmq_open) { vg_assert(SUCCESS); + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "mq_open", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -5052,6 +5057,7 @@ PRE(sys_shm_open) POST(sys_shm_open) { vg_assert(SUCCESS); + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "shm_open", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -6564,6 +6570,7 @@ PRE(sys_shm_open2) POST(sys_shm_open2) { vg_assert(SUCCESS); + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "shm_open2", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); @@ -6825,6 +6832,7 @@ PRE(sys_kqueuex) POST(sys_kqueuex) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "kqueuex", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); @@ -6857,6 +6865,7 @@ PRE(sys_timerfd_create) POST(sys_timerfd_create) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "timerfd_create", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); |
From: Paul F. <pa...@so...> - 2025-04-17 19:30:18
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b13ec72918a1e9d11827bdde5d92c97222d79ea0 commit b13ec72918a1e9d11827bdde5d92c97222d79ea0 Author: Paul Floyd <pj...@wa...> Date: Thu Apr 17 21:26:24 2025 +0200 Illumos: increase coverage of --modify-fds syscalls It looks like Solaris/Illumos is missing some F_DUP* coverage and we aren't handling syscalls that reaturn 2 fds (pipe, socketpair). Otherwise this should cover most Illumos cases at least. Diff: --- coregrind/m_syswrap/syswrap-generic.c | 1 + coregrind/m_syswrap/syswrap-solaris.c | 15 ++++++++++++++- coregrind/m_syswrap/syswrap-x86-solaris.c | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 1ab494c840..82a682a5ce 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -1814,6 +1814,7 @@ ML_(generic_POST_sys_socketpair) ( ThreadId tid, Int fd1 = ((Int*)arg3)[0]; Int fd2 = ((Int*)arg3)[1]; vg_assert(!sr_isError(res)); /* guaranteed by caller */ + // @todo PJF this needs something like POST_newFd_RES for the two fds? POST_MEM_WRITE( arg3, 2*sizeof(int) ); if (!ML_(fd_allowed)(fd1, "socketcall.socketpair", tid, True) || !ML_(fd_allowed)(fd2, "socketcall.socketpair", tid, True)) { diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 6b61a0e0dc..a5d34bc5d5 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -2492,6 +2492,7 @@ PRE(sys_pipe) POST(sys_pipe) { Int p0, p1; + // @todo PJF this needs something like POST_newFd_RES for the two fds? #if defined(SOLARIS_NEW_PIPE_SYSCALL) int *fds = (int*)ARG1; @@ -4074,8 +4075,11 @@ PRE(sys_fcntl) POST(sys_fcntl) { + // @todo PJF we're missing + // F_DUP2FD_CLOEXEC F_DUP2FD_CLOFORK F_DUPFD_CLOFORK F_DUP3FD switch (ARG2 /*cmd*/) { case VKI_F_DUPFD: + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fcntl(F_DUPFD)", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); @@ -4084,6 +4088,7 @@ POST(sys_fcntl) break; case VKI_F_DUPFD_CLOEXEC: + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fcntl(F_DUPFD_CLOEXEC)", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); @@ -4092,6 +4097,7 @@ POST(sys_fcntl) break; case VKI_F_DUP2FD: + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "fcntl(F_DUP2FD)", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); @@ -4258,6 +4264,7 @@ PRE(sys_openat) POST(sys_openat) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "openat", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); @@ -9555,7 +9562,13 @@ POST(sys_door) switch (ARG6 /*subcode*/) { case VKI_DOOR_CREATE: - door_record_server(tid, ARG1, RES); + POST_newFd_RES; + if (!ML_(fd_allowed)(RES, "door_create", tid, True)) { + VG_(close)(RES); + SET_STATUS_Failure( VKI_EMFILE ); + } else { + door_record_server(tid, ARG1, RES); + } break; case VKI_DOOR_REVOKE: door_record_revoke(tid, ARG1); diff --git a/coregrind/m_syswrap/syswrap-x86-solaris.c b/coregrind/m_syswrap/syswrap-x86-solaris.c index be36625112..59c36c1852 100644 --- a/coregrind/m_syswrap/syswrap-x86-solaris.c +++ b/coregrind/m_syswrap/syswrap-x86-solaris.c @@ -971,6 +971,7 @@ PRE(sys_open64) POST(sys_open64) { + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "open64", tid, True)) { VG_(close)(RES); SET_STATUS_Failure(VKI_EMFILE); |
From: Paul F. <pa...@so...> - 2025-04-17 12:02:33
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=992fefc9d1629da7f9eceaf514ac85a2929873da commit 992fefc9d1629da7f9eceaf514ac85a2929873da Author: Paul Floyd <pj...@wa...> Date: Thu Apr 17 13:00:49 2025 +0100 Linux regtest 32bit: remove track_new.stderr.exp.debian32 Not needed after switching from dprintf to write to trigger the error. Diff: --- none/tests/Makefile.am | 2 +- none/tests/track_new.stderr.exp.debian32 | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 2275407738..37c94515d6 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -269,7 +269,7 @@ EXTRA_DIST = \ fdbaduse.stderr.exp fdbaduse.vgtest \ use_after_close.stderr.exp use_after_close.vgtest \ track_new.stderr.exp track_new.stdout.exp \ - track_new.stderr.exp.debian32 track_new.vgtest track_new.stderr.exp-illumos + track_new.vgtest track_new.stderr.exp-illumos check_PROGRAMS = \ diff --git a/none/tests/track_new.stderr.exp.debian32 b/none/tests/track_new.stderr.exp.debian32 deleted file mode 100644 index eb86871743..0000000000 --- a/none/tests/track_new.stderr.exp.debian32 +++ /dev/null @@ -1,10 +0,0 @@ -File descriptor was closed already - at 0x........: llseek (in /...libc...) - by 0x........: dprintf (in /...libc...) - by 0x........: main - Previously closed - at 0x........: close (in /...libc...) - by 0x........: main - Originally opened - at 0x........: creat (in /...libc...) - by 0x........: main |
From: Paul F. <pa...@so...> - 2025-04-17 11:25:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b6346abc4896b3d50882e6c45dfccbf2872ce3b7 commit b6346abc4896b3d50882e6c45dfccbf2872ce3b7 Author: Paul Floyd <pj...@wa...> Date: Thu Apr 17 13:22:34 2025 +0200 Illumos regtest: update none/tests/track_new Not sure why I get file/line with Illumos but not Linux or FreeBSD. Diff: --- none/tests/track_new.stderr.exp-illumos | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/none/tests/track_new.stderr.exp-illumos b/none/tests/track_new.stderr.exp-illumos index 670530b603..ff036ca011 100644 --- a/none/tests/track_new.stderr.exp-illumos +++ b/none/tests/track_new.stderr.exp-illumos @@ -1,10 +1,8 @@ File descriptor was closed already - at 0x........: fdopen (in /...libc...) - by 0x........: vdprintf (in /...libc...) - by 0x........: dprintf (in /...libc...) + at 0x........: write (in /...libc...) by 0x........: main Previously closed at 0x........: close (in /...libc...) by 0x........: main Originally opened - at 0x........: main (track_new.c:11) + at 0x........: main (track_new.c:8) |
From: Paul F. <pa...@so...> - 2025-04-17 11:01:38
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=972e1878bfa03fba4d29f8f05f1c65fbb91b8b2a commit 972e1878bfa03fba4d29f8f05f1c65fbb91b8b2a Author: Paul Floyd <pj...@wa...> Date: Thu Apr 17 13:00:04 2025 +0200 FreeBSD: changes for --modify-fds Again this is just the minumum to get the track_new test to pass. Other syscalls later. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 1 + none/tests/track_new.c | 5 +---- none/tests/track_new.stderr.exp | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6fd4367a83..12b18f4e6e 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -5317,6 +5317,7 @@ PRE(sys_openat) POST(sys_openat) { vg_assert(SUCCESS); + POST_newFd_RES; if (!ML_(fd_allowed)(RES, "openat", tid, True)) { VG_(close)(RES); SET_STATUS_Failure( VKI_EMFILE ); diff --git a/none/tests/track_new.c b/none/tests/track_new.c index e4bb546fb4..718fa3a374 100644 --- a/none/tests/track_new.c +++ b/none/tests/track_new.c @@ -1,7 +1,4 @@ -#define _XOPEN_SOURCE 700 - #include <fcntl.h> -#include <stdio.h> #include <unistd.h> #include <sys/stat.h> @@ -15,7 +12,7 @@ main (void) /* Lets open another file... */ int newfd = open ("foobad.txt", O_RDWR|O_CREAT, S_IRUSR | S_IWUSR); /* ... oops we are using the wrong fd (but same number...) */ - dprintf (oldfd, "some new text\n"); + write(oldfd, "some new text\n", 14); close (newfd); return 0; diff --git a/none/tests/track_new.stderr.exp b/none/tests/track_new.stderr.exp index 23dec73bbc..cd443c51a9 100644 --- a/none/tests/track_new.stderr.exp +++ b/none/tests/track_new.stderr.exp @@ -1,6 +1,5 @@ File descriptor was closed already at 0x........: write (in /...libc...) - by 0x........: dprintf (in /...libc...) by 0x........: main Previously closed at 0x........: close (in /...libc...) |