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
(28) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Paul F. <pa...@so...> - 2024-11-11 08:25:35
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bc9daa9cd15aeee69a1180268e1a132d5574d8cd commit bc9daa9cd15aeee69a1180268e1a132d5574d8cd Author: Paul Floyd <pj...@wa...> Date: Mon Nov 11 09:23:34 2024 +0100 Illumos regtest: updates in none/tests/amd64-solaris Add a filter for an extra level in a callstack. Add an expected for changed mdb output. Diff: --- none/tests/amd64-solaris/Makefile.am | 1 + .../tests/amd64-solaris/coredump_single_thread_mdb | 3 ++- .../coredump_single_thread_sse.post.exp-illumos | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/none/tests/amd64-solaris/Makefile.am b/none/tests/amd64-solaris/Makefile.am index 5eb6905f58..f34d23f703 100644 --- a/none/tests/amd64-solaris/Makefile.am +++ b/none/tests/amd64-solaris/Makefile.am @@ -11,6 +11,7 @@ EXTRA_DIST = \ coredump_single_thread.post.exp coredump_single_thread.stderr.exp \ coredump_single_thread.stdout.exp coredump_single_thread.vgtest \ coredump_single_thread_sse.post.exp coredump_single_thread_sse.stderr.exp \ + coredump_single_thread_sse.post.exp-illumos \ coredump_single_thread_sse.stdout.exp coredump_single_thread_sse.vgtest \ syscall_return_args.stderr.exp syscall_return_args.vgtest diff --git a/none/tests/amd64-solaris/coredump_single_thread_mdb b/none/tests/amd64-solaris/coredump_single_thread_mdb index 082d78a665..8d0779addc 100755 --- a/none/tests/amd64-solaris/coredump_single_thread_mdb +++ b/none/tests/amd64-solaris/coredump_single_thread_mdb @@ -23,4 +23,5 @@ sed '/^%gsbase = / d' | \ sed '/^%fsbase = / d' \ echo "\n---Stack trace---" -echo "::stack ! perl -p -e 's/^(\S+)\+.*/\$1/g'" | /usr/bin/mdb vgcore.* +echo "::stack ! perl -p -e 's/^(\S+)\+.*/\$1/g'" | /usr/bin/mdb vgcore.* | \ +sed '/_start_crt/d' diff --git a/none/tests/amd64-solaris/coredump_single_thread_sse.post.exp-illumos b/none/tests/amd64-solaris/coredump_single_thread_sse.post.exp-illumos new file mode 100644 index 0000000000..d8eeef4726 --- /dev/null +++ b/none/tests/amd64-solaris/coredump_single_thread_sse.post.exp-illumos @@ -0,0 +1,22 @@ +---Status--- +debugging core file of coredump_single (64-bit) from ... +initial argv: ./coredump_single_thread_sse +status: process terminated by SIGSEGV (Segmentation Fault), addr=........ + +---SSE Registers--- +%xmm0 [127:0] 0x10325476 98cadbfe f0debc9a 78563412 +%xmm1 [127:0] 0xcafe6794 badcfe21 43658709 89674523 +%xmm2 [127:0] 0x54676550 bafabafa decedece cdabcdab +%xmm3 [127:0] 0x353d3a37 20212725 154b1b1d 08060503 +%xmm4 [127:0] 0x98cadbfe 78563412 10325476 f0debc9a +%xmm5 [127:0] 0x43658709 badcfe21 89674523 cafe6794 +%xmm6 [127:0] 0xbafabafa cdabcdab decedece 54676550 +%xmm7 [127:0] 0x20212725 08060503 154b1b1d 353d3a37 +%xmm8 [127:0] 0x8ab135bc 296692dc dd839600 5eb11524 +%xmm9 [127:0] 0x226834d5 30d3f7c6 959a8ebd 4b5072c6 +%xmm10 [127:0] 0xbdf31a8a b5c8db03 c7d15cf4 b6cad1c8 +%xmm11 [127:0] 0x9d5c4ba3 e5fa0835 2175d7a2 526d6010 +%xmm12 [127:0] 0x6e8063f5 6f00222c 7232bcb0 be2187ab +%xmm13 [127:0] 0x0a0755e9 a620c325 f03b9fef ab4a333d +%xmm14 [127:0] 0x04069c6a ba536a25 dfd2fda5 b8a12978 +%xmm15 [127:0] 0x2a67ef93 9534a7e1 242ddd04 9b9e3936 |
From: Paul F. <pa...@so...> - 2024-11-10 15:53:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7ca147c66021a1bf637179a62e26c797e7213cce commit 7ca147c66021a1bf637179a62e26c797e7213cce Author: Paul Floyd <pj...@wa...> Date: Sun Nov 10 16:52:32 2024 +0100 Add 494218 to NEWS This went in 3.24. Diff: --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index eb1370da03..eb853a0bd3 100644 --- a/NEWS +++ b/NEWS @@ -117,6 +117,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. FUSE_COMPATIBLE_MAY_BLOCK 493959 s390x: Fix regtest failure for none/tests/s390x/op00 493970 s390x: Store/restore FPC upon helper call causes slowdown +494218 Remove FREEBSD_VERS from configure and build 494252 s390x: incorrect disassembly for LOCHI and friends 494960 Fixes and tweaks for gsl19test 495278 PowerPC instruction dcbf should allow the L field values of 4, 6 on |
From: Paul F. <pa...@so...> - 2024-11-09 20:06:08
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3d5e5c12905dd3596efe7a6acd5eb13205ca6326 commit 3d5e5c12905dd3596efe7a6acd5eb13205ca6326 Author: Paul Floyd <pj...@wa...> Date: Sat Nov 9 21:05:15 2024 +0100 Illumos regtest: Add suppressions to none fdleak_cmsg_supp.supp Diff: --- none/tests/fdleak_cmsg_supp.supp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/none/tests/fdleak_cmsg_supp.supp b/none/tests/fdleak_cmsg_supp.supp index 92fbacabdb..f78d5a2d0a 100644 --- a/none/tests/fdleak_cmsg_supp.supp +++ b/none/tests/fdleak_cmsg_supp.supp @@ -42,3 +42,36 @@ fun:client fun:main } +{ + sup7 + CoreError:FdNotClosed + fun:_so_socket + fun:__xnet_socket + fun:client + fun:main +} +{ + sup8 + CoreError:FdNotClosed + fun:__so_recvmsg + fun:__xnet_recvmsg + fun:client + fun:main +} +{ + sup9 + CoreError:FdNotClosed + fun:_so_socket + fun:__xnet_socket + fun:server + fun:main +} +{ + sup10 + CoreError:FdNotClosed + fun:__so_accept + fun:accept + fun:server + fun:main +} + |
From: Paul F. <pa...@so...> - 2024-11-09 19:05:45
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=61bf8fc5861041002affc83fc9f4ae3f273255f1 commit 61bf8fc5861041002affc83fc9f4ae3f273255f1 Author: Paul Floyd <pj...@wa...> Date: Sat Nov 9 20:05:03 2024 +0100 Illumos regtest: filter more signal messages from bash Diff: --- tests/filter_stderr_basic.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index f32266c0b7..7d38a0d4fd 100755 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -57,7 +57,7 @@ perl -n -e 'print if !/^(Illegal instruction|Segmentation fault|Alarm clock|Abor # Similar as above, but for ksh on Solaris/illumos. perl -n -e 'print if !/^(Memory fault|Killed) $/' | # bash on Illumos -$SED '/sh: [1-9][0-9]*: Memory fault/d' | +$SED "/sh: [1-9][0-9]*: \(Memory fault\|Alarm call\|Terminated\|Killed\)/d" | # Translate intercepted glibc functions back to their canonical name perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(vg_replace_strmem.c:.*?\)/: memcpy \(vg_replace_strmem.c:...\)/" | |
From: Paul F. <pa...@so...> - 2024-11-09 17:44:10
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4efa3c92031ffa4a23628553df964856c28d6e8f commit 4efa3c92031ffa4a23628553df964856c28d6e8f Author: Paul Floyd <pj...@wa...> Date: Sat Nov 9 18:43:20 2024 +0100 Illumos regtest: a couple of fixes to none fd tests Diff: --- none/tests/fdleak_creat_sup.supp | 9 +++++++++ none/tests/filter_fdleak | 1 + 2 files changed, 10 insertions(+) diff --git a/none/tests/fdleak_creat_sup.supp b/none/tests/fdleak_creat_sup.supp index f0c4034224..216a5b3738 100644 --- a/none/tests/fdleak_creat_sup.supp +++ b/none/tests/fdleak_creat_sup.supp @@ -16,3 +16,12 @@ fun:*open* fun:main } +{ + sup4 + CoreError:FdNotClosed + ... + fun:*open* + fun:*creat* + fun:main +} + diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index a63c2c7e58..7de2f6eb18 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -27,6 +27,7 @@ sed '/by 0x........: creat (in \/...libc...)/d' | # Solaris specific fdleak filters perl -p -e 's/ __close / close /' | +perl -p -e 's/ __write / write /' | sed '/ _so_socket /d;' | awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | |
From: Paul F. <pa...@so...> - 2024-11-09 17:21:16
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=65a54641e4d4661a1f3a73a1e4a4a66665b84b1a commit 65a54641e4d4661a1f3a73a1e4a4a66665b84b1a Author: Paul Floyd <pj...@wa...> Date: Sat Nov 9 18:20:26 2024 +0100 Illumos regtest: add filters to gdbserver tests Diff: --- gdbserver_tests/filter_stderr.in | 5 ++++- gdbserver_tests/hginfo.stderrB.exp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdbserver_tests/filter_stderr.in b/gdbserver_tests/filter_stderr.in index 1615eb85b1..64f54eef4f 100755 --- a/gdbserver_tests/filter_stderr.in +++ b/gdbserver_tests/filter_stderr.in @@ -14,4 +14,7 @@ $SED -e '/^Copyright (C) /d' \ -e '/and then give GDB the following command/d' \ -e '/target remote |/d' \ -e '/pid is optional if only one valgrind process is running/d' \ - -e '/warning: remote target does not support file transfer, attempting to access files from local filesystem./d' + -e '/warning: remote target does not support file transfer, attempting to access files from local filesystem./d' \ + -e '/warning: could not convert/d' \ + -e '/This normally should not happen/d' \ + -e 's/block of size .* in arena/block of size XXXX in arena/' diff --git a/gdbserver_tests/hginfo.stderrB.exp b/gdbserver_tests/hginfo.stderrB.exp index 669ff922bb..55c39d4488 100644 --- a/gdbserver_tests/hginfo.stderrB.exp +++ b/gdbserver_tests/hginfo.stderrB.exp @@ -15,4 +15,4 @@ Lock ga 0x........ { kind mbRec { W1:thread #x tid #x } } - Address 0x........ is 0 bytes inside an unallocated block of size 1,008 in arena "client" + Address 0x........ is 0 bytes inside an unallocated block of size XXXX in arena "client" |
From: Paul F. <pa...@so...> - 2024-11-09 17:20:04
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ab632865cfeabf8457f0f899016ff5a74ed02216 commit ab632865cfeabf8457f0f899016ff5a74ed02216 Author: Paul Floyd <pj...@wa...> Date: Sat Nov 9 18:17:26 2024 +0100 Illumos: Don't call ML_(fd_allowed) from PRE(sys_fstat) This was causing many false positives with --track-fds=yes Diff: --- coregrind/m_syswrap/syswrap-solaris.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index f43c2f30a9..9d869d9b5f 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -2357,10 +2357,6 @@ PRE(sys_fstat) PRINT("sys_fstat ( %ld, %#lx )", SARG1, ARG2); PRE_REG_READ2(long, "fstat", int, fildes, struct stat *, buf); PRE_MEM_WRITE("fstat(buf)", ARG2, sizeof(struct vki_stat)); - - /* Be strict. */ - if (!ML_(fd_allowed)(ARG1, "fstat", tid, False)) - SET_STATUS_Failure(VKI_EBADF); } POST(sys_fstat) |
From: Andreas A. <ar...@so...> - 2024-11-08 15:50:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b8e517e9acfec7dd6ec3b9bd46ec2b2eaecd83cc commit b8e517e9acfec7dd6ec3b9bd46ec2b2eaecd83cc Author: Andreas Arnez <ar...@li...> Date: Fri Nov 8 14:52:11 2024 +0100 s390x regtest: Add missing memory clobbers in mvc.c The s390x test case `mvc' was seen to fail when using gcc -O3 with GCC 11.4.1 on Ubuntu: mvc: mvc.c:48: main: Assertion `full[i] == 'x'' failed. In this case the compiler optimized the assertion check away, because it doesn't consider `full' to be affected by the inline assembly. Add memory clobbers to fix this. Diff: --- none/tests/s390x/mvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/none/tests/s390x/mvc.c b/none/tests/s390x/mvc.c index 636234b579..2da8758fc3 100644 --- a/none/tests/s390x/mvc.c +++ b/none/tests/s390x/mvc.c @@ -34,7 +34,7 @@ int main(void) printf("before: target = |%s|\n", target); asm volatile( "mvi 0(%0),'x'\n\t" // target[1] = 'x' "mvc 1(2,%0),0(%0)\n\t" // target[2:3] = target[1] - :: "a" (target+1)); + :: "a" (target+1) : "memory"); printf("after: target = |%s|\n", target); /* Destructive overlap #3 */ @@ -42,7 +42,7 @@ int main(void) memset(full, '-', sizeof full); full[0] = 'x'; asm volatile( "mvc 1(256,%0),0(%0)\n\t" // full[1:256] = full[0] - :: "a" (full)); + :: "a" (full) : "memory"); /* Verify: the first 256+1 characters should be 'x' followed by '-' */ for (i = 0; i <= 256; ++i) assert(full[i] == 'x'); |
From: Andreas A. <ar...@so...> - 2024-11-08 15:50:23
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1cc58e418952fa75d902bf0bc02efd410aaf58a4 commit 1cc58e418952fa75d902bf0bc02efd410aaf58a4 Author: Andreas Arnez <ar...@li...> Date: Fri Nov 8 14:52:11 2024 +0100 s390x regtest: Add missing register clobber in misc3.c Depending on compiler options, the translation of test_mvcrl() in `misc3.c' can misbehave because the inline assembly writes to r0 and doesn't declare that. Add a register clobber to fix this. Also, tell the compiler the actual length of `from' and `to' instead of the decremented value. Diff: --- none/tests/s390x/misc3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/none/tests/s390x/misc3.c b/none/tests/s390x/misc3.c index eeeea1163c..c5df05ea50 100644 --- a/none/tests/s390x/misc3.c +++ b/none/tests/s390x/misc3.c @@ -144,13 +144,12 @@ static void test_all_select() static void test_mvcrl(char *to, char *from, size_t len) { - len -= 1; __asm__("lgr 0,%[len]\n\t" ".insn sse,0xe50a00000000,%[to],%[from]\n\t" : [to] "+Q" (*(char (*)[len]) to) : [from] "Q" (*(char (*)[len]) from), - [len] "d" (len) - : ); + [len] "d" (len - 1) + : "0"); } static void test_all_mvcrl() |
From: Florian K. <fl...@ei...> - 2024-11-07 11:02:48
|
Greetings, is there a way to access the svn repository before it was converted to git ? I'd be interested in a few branches I was working on at the time but did not finish the work. Those branches did not make it into git. Thanks Florian |
From: Paul F. <pa...@so...> - 2024-11-04 12:15:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9a439e5cca9c32964be90140261c5ed87196927e commit 9a439e5cca9c32964be90140261c5ed87196927e Author: Paul Floyd <pj...@wa...> Date: Mon Nov 4 13:13:21 2024 +0100 Compiler warning: unused label on non-FreeBSD platforms Used by a goto to jump over the POST mutex lock userreq, but only on FreeBSD. Diff: --- helgrind/hg_intercepts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 3c6b127ac9..43afd89f47 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -1003,7 +1003,9 @@ static int mutex_lock_WRK(pthread_mutex_t *mutex) DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, pthread_mutex_t *, mutex, long, (ret == 0) ? True : False); +#if defined(VGO_freebsd) HG_MUTEX_LOCK_OUT: +#endif if (ret != 0) { DO_PthAPIerror( "pthread_mutex_lock", ret ); |
From: Paul F. <pa...@so...> - 2024-11-04 07:07:10
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c3d1c683a9106cf30d4ae1052f97b0dce61d282e commit c3d1c683a9106cf30d4ae1052f97b0dce61d282e Author: Paul Floyd <pj...@wa...> Date: Mon Nov 4 08:06:17 2024 +0100 Helgrind regtest: fix wrong updates to tc04_free_lock expecteds Diff: --- helgrind/tests/tc04_free_lock.stderr.exp | 3 --- helgrind/tests/tc04_free_lock.stderr.exp-freebsd | 14 +++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/helgrind/tests/tc04_free_lock.stderr.exp b/helgrind/tests/tc04_free_lock.stderr.exp index 57cbc8eeca..772531160b 100644 --- a/helgrind/tests/tc04_free_lock.stderr.exp +++ b/helgrind/tests/tc04_free_lock.stderr.exp @@ -7,9 +7,6 @@ Thread #x is the program's root thread Thread #x: Exiting thread still holds 2 locks ... - by 0x........: exit_WRK (hg_intercepts.c:...) - by 0x........: exit (hg_intercepts.c:...) - ... ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc04_free_lock.stderr.exp-freebsd b/helgrind/tests/tc04_free_lock.stderr.exp-freebsd index d18786f806..57cbc8eeca 100644 --- a/helgrind/tests/tc04_free_lock.stderr.exp-freebsd +++ b/helgrind/tests/tc04_free_lock.stderr.exp-freebsd @@ -1,3 +1,15 @@ +---Thread-Announcement------------------------------------------ -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) +Thread #x is the program's root thread + +---------------------------------------------------------------- + +Thread #x: Exiting thread still holds 2 locks + ... + by 0x........: exit_WRK (hg_intercepts.c:...) + by 0x........: exit (hg_intercepts.c:...) + ... + + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) |
From: Paul F. <pa...@so...> - 2024-11-03 19:45:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a2ef9690458cf472cb8a4da3793657b2c5a8cda6 commit a2ef9690458cf472cb8a4da3793657b2c5a8cda6 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 20:42:43 2024 +0100 Bug 494327 - Crash when running Helgrind built with #define TRACE_PTH_FNS 1 Use write() rather than 'fprintf()' for the TRACE_PTH_FNS blocks for pthread_mutex_lock and pthread_mutex_lock. Mixing FILE and fd isn't great, but this is to stderr which gets flushed on every line, and it is only for developer builds that modify that TRACE_PTH_FNS macro. Diff: --- NEWS | 1 + helgrind/hg_intercepts.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index b0c0b80cfa..eb1370da03 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +494327 Crash when running Helgrind built with #define TRACE_PTH_FNS 1 494337 All threaded applications cause still holding lock errors 495488 Add FreeBSD getrlimitusage syscall wrapper diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index ba16e33f9b..3c6b127ac9 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -55,6 +55,8 @@ #include "pub_tool_clreq.h" #include "helgrind.h" #include "config.h" +#include <string.h> +#include <unistd.h> #if defined(VGO_solaris) @@ -974,7 +976,10 @@ static int mutex_lock_WRK(pthread_mutex_t *mutex) OrigFn fn; VALGRIND_GET_ORIG_FN(fn); if (TRACE_PTH_FNS) { - fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr); + char buf[30]; + snprintf(buf, 30, "<< pthread_mxlock %p", mutex); + write(STDERR_FILENO, buf, strlen(buf)); + fsync(STDERR_FILENO); } #if defined(VGO_freebsd) @@ -1005,7 +1010,9 @@ HG_MUTEX_LOCK_OUT: } if (TRACE_PTH_FNS) { - fprintf(stderr, " :: mxlock -> %d >>\n", ret); + char buf[30]; + snprintf(buf, 30, " :: mxlock -> %d >>\n", ret); + write(STDERR_FILENO, buf, strlen(buf)); } return ret; } @@ -1231,7 +1238,10 @@ static int mutex_unlock_WRK(pthread_mutex_t *mutex) VALGRIND_GET_ORIG_FN(fn); if (TRACE_PTH_FNS) { - fprintf(stderr, "<< pthread_mxunlk %p", mutex); fflush(stderr); + char buf[30]; + snprintf(buf, 30, "<< pthread_mxunlk %p", mutex); + write(STDERR_FILENO, buf, strlen(buf)); + fsync(STDERR_FILENO); } DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_MUTEX_UNLOCK_PRE, @@ -1247,7 +1257,9 @@ static int mutex_unlock_WRK(pthread_mutex_t *mutex) } if (TRACE_PTH_FNS) { - fprintf(stderr, " mxunlk -> %d >>\n", ret); + char buf[30]; + snprintf(buf, 30, " :: mxunlk -> %d >>\n", ret); + write(STDERR_FILENO, buf, strlen(buf)); } return ret; } |
From: Paul F. <pa...@so...> - 2024-11-03 19:02:13
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4fa368ebb129cd3fbb0406d16a4d4f3d6ffc1fca commit 4fa368ebb129cd3fbb0406d16a4d4f3d6ffc1fca Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 20:00:33 2024 +0100 Helgrind FreeBSD: make previous hack conditonal on version Don't want to ignore any pthread_mutex_lock calls on FreeBSD 14.1 and earlier. Diff: --- helgrind/hg_intercepts.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 2e63dad87a..ba16e33f9b 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -113,6 +113,8 @@ #define LIBC_FUNC(ret_ty, f, args...) \ ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBC_SONAME,f)(args); \ ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBC_SONAME,f)(args) + +#include <osreldate.h> #endif // Do a client request. These are macros rather than a functions so @@ -944,7 +946,9 @@ static int exit_WRK(int status) OrigFn fn; VALGRIND_GET_ORIG_FN(fn); +#if (__FreeBSD_version >= 1401500) hg_in_exit = 1; +#endif CALL_FN_W_W(ret, fn, status); |
From: Paul F. <pa...@so...> - 2024-11-03 18:49:40
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5c47ad94a0485cccd2a41506dd7e83f58b4569c3 commit 5c47ad94a0485cccd2a41506dd7e83f58b4569c3 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 19:47:12 2024 +0100 Bug 494337 - All threaded applications cause still holding lock errors Don't count the first call to pthread_mutex_lock() from exit(). Needed to update a couple of expecteds as exit() is now wrapped so it turns up in the callstacks. This is only for FreeBSD. Diff: --- NEWS | 1 + helgrind/hg_intercepts.c | 52 ++++++++ helgrind/hg_main.c | 13 +- helgrind/tests/Makefile.am | 3 +- helgrind/tests/tc04_free_lock.stderr.exp | 3 + ...freebsd15 => tc04_free_lock.stderr.exp-freebsd} | 0 helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd | 3 + .../tests/tc09_bad_unlock.stderr.exp-freebsd15 | 145 --------------------- 8 files changed, 61 insertions(+), 159 deletions(-) diff --git a/NEWS b/NEWS index 9724705090..b0c0b80cfa 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +494337 All threaded applications cause still holding lock errors 495488 Add FreeBSD getrlimitusage syscall wrapper To see details of a given bug, visit diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 0c27b0a662..2e63dad87a 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -915,6 +915,48 @@ static int mutex_destroy_WRK(pthread_mutex_t *mutex) # error "Unsupported OS" #endif +#if defined(VGO_freebsd) + +/* + * Bugzilla 494337 + * + * Hacks'R'Us + * FreeBSD 15 (backported to 14.2) add a mutex lock to + * exit to ensure that it is thread-safe. But this lock + * never gets unlocked. That meant this lock was causing + * all threaded apps to generate a Helgrind still holding + * lock errors. So in time honoured tradition, this can + * be fixed with a hack. This adds a wrapper to exit() + * that sets a global variable hg_in_exit. In the next + * call to pthread_mutex_lock, if that variable is 1 + * then the pthread_mutex_lock wrapper only calls the + * wrapped function. It does not call the PRE and POST + * userreq functions. It then resets hg_in_exit to 0 + * (because there will be more locks in the atexit + * processing). + */ + +int hg_in_exit = 0; + +static int exit_WRK(int status) +{ + int ret; + OrigFn fn; + VALGRIND_GET_ORIG_FN(fn); + + hg_in_exit = 1; + + CALL_FN_W_W(ret, fn, status); + + return ret; +} + +LIBC_FUNC(int, exit, int res) { + return exit_WRK(res); +} + +#endif + //----------------------------------------------------------- // glibc: pthread_mutex_lock @@ -931,6 +973,14 @@ static int mutex_lock_WRK(pthread_mutex_t *mutex) fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr); } +#if defined(VGO_freebsd) + if (hg_in_exit) { + CALL_FN_W_W(ret, fn, mutex); + hg_in_exit = 0; + goto HG_MUTEX_LOCK_OUT; + } +#endif + DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_PRE, pthread_mutex_t*,mutex, long,0/*!isTryLock*/); @@ -944,6 +994,8 @@ static int mutex_lock_WRK(pthread_mutex_t *mutex) DO_CREQ_v_WW(_VG_USERREQ__HG_PTHREAD_MUTEX_LOCK_POST, pthread_mutex_t *, mutex, long, (ret == 0) ? True : False); +HG_MUTEX_LOCK_OUT: + if (ret != 0) { DO_PthAPIerror( "pthread_mutex_lock", ret ); } diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 5cdabb1127..6a300b83bb 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -1716,18 +1716,7 @@ void evh__pre_thread_ll_exit ( ThreadId quit_tid ) /* Complain if this thread holds any locks. */ nHeld = HG_(cardinalityWS)( univ_lsets, thr_q->locksetA ); tl_assert(nHeld >= 0); - Bool lock_at_exit = False; -#if defined(VGO_freebsd) - /* Bugzilla 494337 - * temporary (?): turn off this check on FreeBSD 14.2+ - * there is a lock during exit() to make it thread safe - * but that lock gets leaked. - */ - if (VG_(getosreldate)() > 1401500) { - lock_at_exit = True; - } -#endif - if (nHeld > 0 && (lock_at_exit == False)) { + if (nHeld > 0) { HChar buf[80]; VG_(sprintf)(buf, "Exiting thread still holds %d lock%s", nHeld, nHeld > 1 ? "s" : ""); diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index d7101ed1aa..bffd5bf76a 100755 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -87,7 +87,7 @@ EXTRA_DIST = \ tc03_re_excl.stderr.exp \ tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ tc04_free_lock.stderr.exp \ - tc04_free_lock.stderr.exp-freebsd15 \ + tc04_free_lock.stderr.exp-freebsd \ tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ tc05_simple_race.stderr.exp \ tc06_two_races.vgtest tc06_two_races.stdout.exp \ @@ -100,7 +100,6 @@ EXTRA_DIST = \ tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ tc09_bad_unlock.stderr.exp tc09_bad_unlock.stderr.exp-solaris \ tc09_bad_unlock.stderr.exp-freebsd \ - tc09_bad_unlock.stderr.exp-freebsd15 \ tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ diff --git a/helgrind/tests/tc04_free_lock.stderr.exp b/helgrind/tests/tc04_free_lock.stderr.exp index 772531160b..57cbc8eeca 100644 --- a/helgrind/tests/tc04_free_lock.stderr.exp +++ b/helgrind/tests/tc04_free_lock.stderr.exp @@ -7,6 +7,9 @@ Thread #x is the program's root thread Thread #x: Exiting thread still holds 2 locks ... + by 0x........: exit_WRK (hg_intercepts.c:...) + by 0x........: exit (hg_intercepts.c:...) + ... ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc04_free_lock.stderr.exp-freebsd15 b/helgrind/tests/tc04_free_lock.stderr.exp-freebsd similarity index 100% rename from helgrind/tests/tc04_free_lock.stderr.exp-freebsd15 rename to helgrind/tests/tc04_free_lock.stderr.exp-freebsd diff --git a/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd b/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd index 1053cbebf2..41df4cdcc1 100644 --- a/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd +++ b/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd @@ -145,6 +145,9 @@ Thread #x's call to pthread_mutex_unlock failed Thread #x: Exiting thread still holds 1 lock ... + by 0x........: exit_WRK (hg_intercepts.c:...) + by 0x........: exit (hg_intercepts.c:...) + ... ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd15 b/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd15 deleted file mode 100644 index c9d6d3d459..0000000000 --- a/helgrind/tests/tc09_bad_unlock.stderr.exp-freebsd15 +++ /dev/null @@ -1,145 +0,0 @@ - ----Thread-Announcement------------------------------------------ - -Thread #x is the program's root thread - ----------------------------------------------------------------- - -Thread #x unlocked a not-locked lock at 0x........ - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:28) - by 0x........: main (tc09_bad_unlock.c:52) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:24) - by 0x........: main (tc09_bad_unlock.c:52) - Address 0x........ is on thread #x's stack - in frame #x, created by nearly_main (tc09_bad_unlock.c:17) - - ----------------------------------------------------------------- - -Thread #x's call to pthread_mutex_unlock failed - with error code 1 (EPERM: Operation not permitted) - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:28) - by 0x........: main (tc09_bad_unlock.c:52) - ----Thread-Announcement------------------------------------------ - -Thread #x was created - ... - by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:36) - by 0x........: main (tc09_bad_unlock.c:52) - ----------------------------------------------------------------- - -Thread #x unlocked lock at 0x........ currently held by thread #x - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: child_fn (tc09_bad_unlock.c:12) - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:32) - by 0x........: main (tc09_bad_unlock.c:52) - Address 0x........ is on thread #x's stack - in frame #x, created by nearly_main (tc09_bad_unlock.c:17) - - ----------------------------------------------------------------- - -Thread #x's call to pthread_mutex_unlock failed - with error code 1 (EPERM: Operation not permitted) - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: child_fn (tc09_bad_unlock.c:12) - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - ---------------------- ----------------------------------------------------------------- - -Thread #x unlocked a not-locked lock at 0x........ - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:28) - by 0x........: main (tc09_bad_unlock.c:53) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:24) - by 0x........: main (tc09_bad_unlock.c:52) - Address 0x........ is on thread #x's stack - in frame #x, created by nearly_main (tc09_bad_unlock.c:17) - - ----------------------------------------------------------------- - -Thread #x's call to pthread_mutex_unlock failed - with error code 1 (EPERM: Operation not permitted) - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:28) - by 0x........: main (tc09_bad_unlock.c:53) - ----------------------------------------------------------------- - -Thread #x: Attempt to re-lock a non-recursive lock I already hold - at 0x........: mutex_lock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_lock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:33) - by 0x........: main (tc09_bad_unlock.c:53) - Lock was previously acquired - at 0x........: mutex_lock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_lock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:33) - by 0x........: main (tc09_bad_unlock.c:52) - ----------------------------------------------------------------- - -Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion - at 0x........: mutex_lock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_lock (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:33) - by 0x........: main (tc09_bad_unlock.c:53) - ----Thread-Announcement------------------------------------------ - -Thread #x was created - ... - by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:36) - by 0x........: main (tc09_bad_unlock.c:53) - ----------------------------------------------------------------- - -Thread #x unlocked lock at 0x........ currently held by thread #x - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: child_fn (tc09_bad_unlock.c:12) - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: nearly_main (tc09_bad_unlock.c:32) - by 0x........: main (tc09_bad_unlock.c:52) - Address 0x........ is on thread #x's stack - in frame #x, created by nearly_main (tc09_bad_unlock.c:17) - - ----------------------------------------------------------------- - -Thread #x's call to pthread_mutex_unlock failed - with error code 1 (EPERM: Operation not permitted) - at 0x........: mutex_unlock_WRK (hg_intercepts.c:...) - by 0x........: pthread_mutex_unlock (hg_intercepts.c:...) - by 0x........: child_fn (tc09_bad_unlock.c:12) - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - - -ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0) |
From: Paul F. <pa...@so...> - 2024-11-03 12:18:42
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6178e2cc84116f3878a6af084b9084615541e227 commit 6178e2cc84116f3878a6af084b9084615541e227 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 14:18:12 2024 +0100 FreeBSD regtest: update x86 scalar expected Diff: --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index cce726e1d6..86599836de 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -5782,6 +5782,40 @@ Syscall param timerfd_settime(old_value) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +588: SYS_kcmp 5s 0m +--------------------------------------------------------- +Syscall param kcmp(pid1) contains uninitialised byte(s) + ... + +Syscall param kcmp(pid2) contains uninitialised byte(s) + ... + +Syscall param kcmp(type) contains uninitialised byte(s) + ... + +Syscall param kcmp(idx1) contains uninitialised byte(s) + ... + +Syscall param kcmp(idx2) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +589: SYS_getrlimitusage 3s, 1m +--------------------------------------------------------- +Syscall param getrlimitusage(which) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(flags) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(res) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(res) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2024-11-03 11:01:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=902663c2253d00f7066e0706256cb1f9498dff77 commit 902663c2253d00f7066e0706256cb1f9498dff77 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 12:00:52 2024 +0100 FreeBSD regtest: spaces not quite right in scalar fakes Diff: --- memcheck/tests/freebsd/scalar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index 7ad3099a04..65348c232a 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2427,7 +2427,7 @@ int main(void) FAKE_SY(" ...\n"); FAKE_SY("\n"); FAKE_SY("Syscall param kcmp(idx2) contains uninitialised byte(s)\n"); - FAKE_SY(" ...\n"); + FAKE_SY(" ...\n"); FAKE_SY("\n"); #endif @@ -2448,7 +2448,7 @@ int main(void) FAKE_SY("\n"); FAKE_SY("Syscall param getrlimitusage(res) points to unaddressable byte(s)\n"); FAKE_SY(" ...\n"); - FAKE_SY(" Address 0x........ is not stack'd, malloc'd or (recently) free'd\n"); + FAKE_SY(" Address 0x........ is not stack'd, malloc'd or (recently) free'd\n"); FAKE_SY("\n"); #endif |
From: Paul F. <pa...@so...> - 2024-11-03 10:27:37
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5d3e980dbf3b0df47a58a347e8a9a9bdc3add712 commit 5d3e980dbf3b0df47a58a347e8a9a9bdc3add712 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 11:25:47 2024 +0100 clangd fixes Mainly useless casts and consistent function prototype and definition arg names. Diff: --- VEX/priv/guest_amd64_defs.h | 10 +++++----- coregrind/m_syswrap/syswrap-amd64-freebsd.c | 2 +- coregrind/m_syswrap/syswrap-freebsd.c | 6 +----- include/pub_tool_oset.h | 6 +++--- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/VEX/priv/guest_amd64_defs.h b/VEX/priv/guest_amd64_defs.h index f9a9a90975..f7a4e06c05 100644 --- a/VEX/priv/guest_amd64_defs.h +++ b/VEX/priv/guest_amd64_defs.h @@ -48,15 +48,15 @@ /* Convert one amd64 insn to IR. See the type DisOneInstrFn in guest_generic_bb_to_IR.h. */ extern -DisResult disInstr_AMD64 ( IRSB* irbb, - const UChar* guest_code, +DisResult disInstr_AMD64 ( IRSB* irsb_IN, + const UChar* guest_code_IN, Long delta, Addr guest_IP, VexArch guest_arch, const VexArchInfo* archinfo, const VexAbiInfo* abiinfo, - VexEndness host_endness, - Bool sigill_diag ); + VexEndness host_endness_IN, + Bool sigill_diag_IN ); /* Used by the optimiser to specialise calls to helpers. */ extern @@ -108,7 +108,7 @@ extern ULong amd64g_calculate_RCL ( ULong arg, ULong rot_amt, ULong rflags_in, Long sz ); -extern ULong amd64g_calculate_pclmul(ULong s1, ULong s2, ULong which); +extern ULong amd64g_calculate_pclmul(ULong a, ULong b, ULong which); extern ULong amd64g_check_fldcw ( ULong fpucw ); diff --git a/coregrind/m_syswrap/syswrap-amd64-freebsd.c b/coregrind/m_syswrap/syswrap-amd64-freebsd.c index a586985322..e1316eac3e 100644 --- a/coregrind/m_syswrap/syswrap-amd64-freebsd.c +++ b/coregrind/m_syswrap/syswrap-amd64-freebsd.c @@ -643,7 +643,7 @@ PRE(sys_thr_new) goto fail; } tp.stack_base = (void *)ctst->os_state.valgrind_stack_base; - tp.stack_size = (Addr)stk - (Addr)tp.stack_base; + tp.stack_size = stk - (Addr)tp.stack_base; /* Create the new thread */ res = VG_(do_syscall2)(__NR_thr_new, (UWord)&tp, sizeof(tp)); diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6058bbe836..ea0ca2bfe5 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -384,7 +384,7 @@ void VG_(main_thread_wrapper_NORETURN)(ThreadId tid) vg_assert( VG_(count_living_threads)() == 1 ); ML_(call_on_new_stack_0_1)( - (Addr)sp, /* stack */ + sp, /* stack */ 0, /* bogus return address */ run_a_thread_NORETURN, /* fn to call */ (Word)tid /* arg to give it */ @@ -4616,13 +4616,9 @@ POST(sys__umtx_op) ML_(record_fd_open_nameless) (tid, RES); } break; - case VKI_UMTX_OP_ROBUST_LISTS: - break; case VKI_UMTX_OP_GET_MIN_TIMEOUT: POST_MEM_WRITE( ARG4, sizeof(long int) ); break; - case VKI_UMTX_OP_SET_MIN_TIMEOUT: - break; default: break; } diff --git a/include/pub_tool_oset.h b/include/pub_tool_oset.h index bbd3e08885..3465396127 100644 --- a/include/pub_tool_oset.h +++ b/include/pub_tool_oset.h @@ -98,7 +98,7 @@ typedef Word (*OSetCmp_t) ( const void* key, const void* elem ); extern OSet* VG_(OSetWord_Create) ( Alloc_Fn_t alloc_fn, const HChar* cc, Free_Fn_t free_fn ); -extern void VG_(OSetWord_Destroy) ( OSet* os ); +extern void VG_(OSetWord_Destroy) ( OSet* t ); /*--------------------------------------------------------------------*/ /*--- Operations on OSets (UWord) ---*/ @@ -140,12 +140,12 @@ extern void VG_(OSetWord_Destroy) ( OSet* os ); // they will return False if VG_(OSetWord_Next)() is called without an // intervening call to VG_(OSetWord_ResetIter)(). -extern Word VG_(OSetWord_Size) ( const OSet* os ); +extern Word VG_(OSetWord_Size) ( const OSet* t ); extern void VG_(OSetWord_Insert) ( OSet* os, UWord val ); extern Bool VG_(OSetWord_Contains) ( const OSet* os, UWord val ); extern Bool VG_(OSetWord_Remove) ( OSet* os, UWord val ); extern void VG_(OSetWord_ResetIter) ( OSet* os ); -extern Bool VG_(OSetWord_Next) ( OSet* os, /*OUT*/UWord* val ); +extern Bool VG_(OSetWord_Next) ( OSet* t, /*OUT*/UWord* val ); /*--------------------------------------------------------------------*/ |
From: Paul F. <pa...@so...> - 2024-11-03 09:56:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dc1276745ffaa413ee3d3780ea7a048a8c6d7079 commit dc1276745ffaa413ee3d3780ea7a048a8c6d7079 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 10:55:57 2024 +0100 Correct typos and spelling mistakes Diff: --- NEWS.old | 2 +- VEX/priv/guest_ppc_toIR.c | 10 +++--- VEX/priv/host_generic_reg_alloc2.c | 2 +- VEX/pub/libvex_ir.h | 2 +- coregrind/m_hashtable.c | 48 +++++++++++++-------------- coregrind/m_replacemalloc/vg_replace_malloc.c | 2 +- coregrind/m_syswrap/syswrap-freebsd.c | 2 +- coregrind/m_syswrap/syswrap-linux.c | 2 +- coregrind/vgdb.c | 2 +- docs/internals/Darwin-debug.txt | 2 +- docs/internals/threads-syscalls-signals.txt | 2 +- helgrind/hg_main.c | 2 +- include/pub_tool_libcproc.h | 2 +- memcheck/docs/mc-manual.xml | 2 +- memcheck/mc_main.c | 2 +- memcheck/tests/realloc_size_zero.supp | 2 +- none/tests/s390x/vector.h | 4 +-- none/tests/solaris/coredump_many_segments.c | 2 +- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/NEWS.old b/NEWS.old index 2b43c91fad..919b85c39a 100644 --- a/NEWS.old +++ b/NEWS.old @@ -14,7 +14,7 @@ AMD64/macOS 10.13 and nanoMIPS/Linux. Rust v0 name demangling. [Update: alas, due to a bug, this support isn't working in 3.18.0.] -* __libc_freeres isn't called anymore after the program recieves a +* __libc_freeres isn't called anymore after the program receives a fatal signal. Causing some internal glibc resources to hang around, but preventing any crashes after the program has ended. diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 94930aa1c9..18716dd04c 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -6149,13 +6149,13 @@ static IRExpr* dnorm_adj_Vector ( IRExpr* src ) *------------------------------------------------------------*/ static ULong generate_TMreason( UInt failure_code, - UInt persistant, + UInt persistent, UInt nest_overflow, UInt tm_exact ) { ULong tm_err_code = ( (ULong) 0) << (63-6) /* Failure code */ - | ( (ULong) persistant) << (63-7) /* Failure persistant */ + | ( (ULong) persistent) << (63-7) /* Failure persistent */ | ( (ULong) 0) << (63-8) /* Disallowed */ | ( (ULong) nest_overflow) << (63-9) /* Nesting Overflow */ | ( (ULong) 0) << (63-10) /* Footprint Overflow */ @@ -7691,7 +7691,7 @@ static Bool dis_int_misc ( UInt prefix, UInt theInstr ) * * 0b00 Resume instruction fetching and execution when an * exception or an event-based branch exception occurs, - * or a resume signal from the platform is recieved. + * or a resume signal from the platform is received. * * 0b01 Reserved. * @@ -33735,7 +33735,7 @@ static Bool dis_transactional_memory ( UInt prefix, UInt theInstr, UInt nextInst UInt failure_code = 0; /* Forcing failure, will not be due to tabort * or treclaim. */ - UInt persistant = 1; /* set persistant since we are always failing + UInt persistent = 1; /* set persistent since we are always failing * the tbegin. */ UInt nest_overflow = 1; /* Alowed nesting depth overflow, we use this @@ -33759,7 +33759,7 @@ static Bool dis_transactional_memory ( UInt prefix, UInt theInstr, UInt nextInst */ putCR321( 0, mkU8( 0x2 ) ); - tm_reason = generate_TMreason( failure_code, persistant, + tm_reason = generate_TMreason( failure_code, persistent, nest_overflow, tm_exact ); storeTMfailure( guest_CIA_curr_instr, tm_reason, diff --git a/VEX/priv/host_generic_reg_alloc2.c b/VEX/priv/host_generic_reg_alloc2.c index d94d2c92a7..b731720f22 100644 --- a/VEX/priv/host_generic_reg_alloc2.c +++ b/VEX/priv/host_generic_reg_alloc2.c @@ -494,7 +494,7 @@ HInstrArray* doRegisterAllocation_v2 ( rreg_lrs_la = LibVEX_Alloc_inline(rreg_lrs_size * sizeof(RRegLR)); rreg_lrs_db = NULL; /* we'll create this later */ - /* We'll need to track live range start/end points seperately for + /* We'll need to track live range start/end points separately for each rreg. Sigh. */ vassert(n_rregs > 0); rreg_live_after = LibVEX_Alloc_inline(n_rregs * sizeof(Int)); diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index f6f347a052..2d09e37cbc 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -2198,7 +2198,7 @@ struct _IRExpr { It is important to get the array size/type exactly correct since IR optimisation looks closely at such info in order to - establish aliasing/non-aliasing between seperate GetI and + establish aliasing/non-aliasing between separate GetI and PutI events, which is used to establish when they can be reordered, etc. Putting incorrect info in will lead to obscure IR optimisation bugs. diff --git a/coregrind/m_hashtable.c b/coregrind/m_hashtable.c index 586cfcc4f3..6fa07c29f1 100644 --- a/coregrind/m_hashtable.c +++ b/coregrind/m_hashtable.c @@ -234,21 +234,21 @@ void* VG_(HT_gen_remove) ( VgHashTable *table, const void* node, HT_Cmp_t cmp ) void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) { #define MAXOCCUR 20 - UInt elt_occurences[MAXOCCUR+1]; - UInt key_occurences[MAXOCCUR+1]; - UInt cno_occurences[MAXOCCUR+1]; - /* Key occurence : how many ht elements have the same key. - elt_occurences : how many elements are inserted multiple time. - cno_occurences : how many chains have that length. - The last entry in these arrays collects all occurences >= MAXOCCUR. */ + UInt elt_occurrences[MAXOCCUR+1]; + UInt key_occurrences[MAXOCCUR+1]; + UInt cno_occurrences[MAXOCCUR+1]; + /* Key occurrence : how many ht elements have the same key. + elt_occurrences : how many elements are inserted multiple time. + cno_occurrences : how many chains have that length. + The last entry in these arrays collects all occurrences >= MAXOCCUR. */ #define INCOCCUR(occur,n) (n >= MAXOCCUR ? occur[MAXOCCUR]++ : occur[n]++) UInt i; UInt nkey, nelt, ncno; VgHashNode *cnode, *node; - VG_(memset)(key_occurences, 0, sizeof(key_occurences)); - VG_(memset)(elt_occurences, 0, sizeof(elt_occurences)); - VG_(memset)(cno_occurences, 0, sizeof(cno_occurences)); + VG_(memset)(key_occurrences, 0, sizeof(key_occurrences)); + VG_(memset)(elt_occurrences, 0, sizeof(elt_occurrences)); + VG_(memset)(cno_occurrences, 0, sizeof(cno_occurrences)); // Note that the below algorithm is quadractic in nr of elements in a chain // but if that happens, the hash table/function is really bad and that @@ -264,13 +264,13 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) if (node->key == cnode->key) nkey++; } - // If cnode->key not in a previous node, count occurences of key. + // If cnode->key not in a previous node, count occurrences of key. if (nkey == 0) { for (node = cnode; node != NULL; node = node->next) { if (node->key == cnode->key) nkey++; } - INCOCCUR(key_occurences, nkey); + INCOCCUR(key_occurrences, nkey); } nelt = 0; @@ -281,7 +281,7 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) nelt++; } } - // If cnode element not in a previous node, count occurences of elt. + // If cnode element not in a previous node, count occurrences of elt. if (nelt == 0) { for (node = cnode; node != NULL; node = node->next) { if (node->key == cnode->key @@ -289,10 +289,10 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) nelt++; } } - INCOCCUR(elt_occurences, nelt); + INCOCCUR(elt_occurrences, nelt); } } - INCOCCUR(cno_occurences, ncno); + INCOCCUR(cno_occurrences, ncno); } VG_(message)(Vg_DebugMsg, @@ -302,23 +302,23 @@ void VG_(HT_print_stats) ( const VgHashTable *table, HT_Cmp_t cmp ) " N-plicated elts\n"); nkey = nelt = ncno = 0; for (i = 0; i <= MAXOCCUR; i++) { - if (elt_occurences[i] > 0 - || key_occurences[i] > 0 - || cno_occurences[i] > 0) + if (elt_occurrences[i] > 0 + || key_occurrences[i] > 0 + || cno_occurrences[i] > 0) VG_(message)(Vg_DebugMsg, "%s=%2u : nr chain %6u, nr keys %6u, nr elts %6u\n", i == MAXOCCUR ? ">" : "N", i, - cno_occurences[i], key_occurences[i], elt_occurences[i]); - nkey += key_occurences[i]; - nelt += elt_occurences[i]; - ncno += cno_occurences[i]; + cno_occurrences[i], key_occurrences[i], elt_occurrences[i]); + nkey += key_occurrences[i]; + nelt += elt_occurrences[i]; + ncno += cno_occurrences[i]; } VG_(message)(Vg_DebugMsg, "total nr of unique slots: %6u, keys %6u, elts %6u." " Avg chain len %3.1f\n", ncno, nkey, nelt, - (Double)nelt/(Double)(ncno == cno_occurences[0] ? - 1 : ncno - cno_occurences[0])); + (Double)nelt/(Double)(ncno == cno_occurrences[0] ? + 1 : ncno - cno_occurrences[0])); } diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 4125479b82..aff2d27b3c 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -138,7 +138,7 @@ Anything "user-defined" or "class-specific" we can't know about and the user needs to use memory pool annotation. - "non-alocating placement" as the name implies does not + "non-allocating placement" as the name implies does not allocate. Placement deletes are no-ops. */ diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index f5516420fb..6058bbe836 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -2007,7 +2007,7 @@ PRE(sys___sysctl) * downwards). Without any special handling this would return the * address of the host userstack. We have created a stack for the * guest (in aspacemgr) and that is the one that we want the guest - * to see. Aspacemgr is setup in m_main.c with the adresses and sizes + * to see. Aspacemgr is setup in m_main.c with the addresses and sizes * saved to file static variables in that file, so we call * VG_(get_usrstack)() to retrieve them from there. */ diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index eec8388224..177712117c 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -560,7 +560,7 @@ static SysRes setup_child_tls (ThreadId ctid, Addr tlsaddr) { static const Bool debug = False; ThreadState* ctst = VG_(get_ThreadState)(ctid); - // res is succesful by default, overriden if a real syscall is needed/done. + // res is successful by default, overriden if a real syscall is needed/done. SysRes res = VG_(mk_SysRes_Success)(0); if (debug) diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c index 786ead160d..d6740aecd4 100644 --- a/coregrind/vgdb.c +++ b/coregrind/vgdb.c @@ -1167,7 +1167,7 @@ static void count_len(char delim, char *buf, size_t *len) If speaking with GDB, early_exit will ensure the GDB user sees the error messages produced by vgdb: early_exit should be used when vgdb exits due to an early error i.e. - error during arg processing, before it could succesfully process the + error during arg processing, before it could successfully process the first packet from GDB. early_exit will then read the first packet send by GDB (i.e. the qSupported packet) and will reply to it with an error and then exit. diff --git a/docs/internals/Darwin-debug.txt b/docs/internals/Darwin-debug.txt index 5bc9b56633..705d6d57de 100644 --- a/docs/internals/Darwin-debug.txt +++ b/docs/internals/Darwin-debug.txt @@ -58,5 +58,5 @@ gets set for core and tool preloads (the equivalent of LD_PRELOAD). DYLD_SHARED_REGION gets set to "avoid" (but note that for macOS 11 Big Sur and later "avoid" is no longer an option). -The Darwin calstack is a bit simpler to synthesise than the ones on +The Darwin callstack is a bit simpler to synthesise than the ones on ELF platforms. There is no auxiliary vector (auxv) to construct. diff --git a/docs/internals/threads-syscalls-signals.txt b/docs/internals/threads-syscalls-signals.txt index 5a083c1222..9b49135448 100644 --- a/docs/internals/threads-syscalls-signals.txt +++ b/docs/internals/threads-syscalls-signals.txt @@ -122,7 +122,7 @@ set of signals while the signal is being delivered. Valgrind's handlers block all signals, so there's no risk of a new signal being delivered to the same thread until the old handler has finished. -The other is that if the thread which recieves the signal is not running +The other is that if the thread which receives the signal is not running (ie, doesn't hold the run_sema, which implies it must be waiting for a syscall to complete), then the signal handler will grab the run_sema before making any global state changes. Since the only time we can get diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index bbf95c0ba0..5cdabb1127 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -5328,7 +5328,7 @@ Bool hg_handle_client_request ( ThreadId tid, UWord* args, UWord* ret) gnat_dmmls_INIT(); /* Similar loop as for master completed hook below, but stops at - the first matching occurence, only comparing master and + the first matching occurrence, only comparing master and dependent. */ for (n = VG_(sizeXA) (gnat_dmmls) - 1; n >= 0; n--) { GNAT_dmml *dmml = (GNAT_dmml*) VG_(indexXA)(gnat_dmmls, n); diff --git a/include/pub_tool_libcproc.h b/include/pub_tool_libcproc.h index 24f037cce5..49c10dae2e 100644 --- a/include/pub_tool_libcproc.h +++ b/include/pub_tool_libcproc.h @@ -104,7 +104,7 @@ extern UInt VG_(read_millisecond_timer) ( void ); extern Int VG_(gettimeofday)(struct vki_timeval *tv, struct vki_timezone *tz); # if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) -/* Get the clock value as specified by clk_id. Asserts if unsuccesful. */ +/* Get the clock value as specified by clk_id. Asserts if unsuccessful. */ extern void VG_(clock_gettime)(struct vki_timespec *ts, vki_clockid_t clk_id); # elif defined(VGO_darwin) /* It seems clock_gettime is only available on recent Darwin versions. diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 981ce710fc..4eee0bd333 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -467,7 +467,7 @@ as "silly arguments" and no back-trace was included. </sect2> -<sect2 id="mc-manual.realocsizezero" +<sect2 id="mc-manual.reallocsizezero" xreflabel="Realloc size zero"> <title>Realloc size zero</title> diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index abd5d68888..626d481d25 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -6329,7 +6329,7 @@ static void mc_print_usage(void) " --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none\n" " stack trace(s) to keep for malloc'd/free'd areas [alloc-and-free]\n" " --show-mismatched-frees=no|yes show frees that don't match the allocator? [yes]\n" -" --show-realloc-size-zero=no|yes show realocs with a size of zero? [yes]\n" +" --show-realloc-size-zero=no|yes show reallocs with a size of zero? [yes]\n" ); } diff --git a/memcheck/tests/realloc_size_zero.supp b/memcheck/tests/realloc_size_zero.supp index 42e5f8d811..229e9abd9b 100644 --- a/memcheck/tests/realloc_size_zero.supp +++ b/memcheck/tests/realloc_size_zero.supp @@ -1,5 +1,5 @@ { - Test for realoc zero suppression + Test for realloc zero suppression Memcheck:ReallocZero fun:realloc fun:main diff --git a/none/tests/s390x/vector.h b/none/tests/s390x/vector.h index b19c3465f5..23ae1e9384 100644 --- a/none/tests/s390x/vector.h +++ b/none/tests/s390x/vector.h @@ -174,7 +174,7 @@ void randomize_memory_pool() [{r,m}_arg2] -- integer arg2 [{r,m}_arg3] -- integer arg3 [{r,m}_result] -- integer result - [{r,m}_memory_pool] -- address of random memory pool. Usefull for some instructions + [{r,m}_memory_pool] -- address of random memory pool. Useful for some instructions */ @@ -291,7 +291,7 @@ __attribute__((unused)) static void test_##insn() \ } /* Stores CC to %[r_result]. - Usefull when testing instructions which modify condition code. + Useful when testing instructions which modify condition code. */ #define S390_TEST_PUT_CC_TO_RESULT "ipm %[r_result] \n srl %[r_result], 28 \n" diff --git a/none/tests/solaris/coredump_many_segments.c b/none/tests/solaris/coredump_many_segments.c index da3f4ae05a..6fbe8b028c 100644 --- a/none/tests/solaris/coredump_many_segments.c +++ b/none/tests/solaris/coredump_many_segments.c @@ -191,7 +191,7 @@ int main(int argc, const char *argv[]) size_t sum = sum_ranges(ranges); if (sum < SEGMENTS * page_size) { - fprintf(stderr, "Free (virtual) address space cannot accomodate " + fprintf(stderr, "Free (virtual) address space cannot accommodate " "%u pages.\n", SEGMENTS); return 1; } |
From: Paul F. <pa...@so...> - 2024-11-03 09:18:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=0b6c1515d158745e97ad206bf1cd3caceb8ed4dd commit 0b6c1515d158745e97ad206bf1cd3caceb8ed4dd Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 10:17:17 2024 +0100 Bug 495488 - Add FreeBSD getrlimitusage syscall wrapper Diff: --- .gitignore | 1 + NEWS | 1 + configure.ac | 5 +- coregrind/m_debuginfo/debuginfo.c | 16 ++++ coregrind/m_main.c | 4 + coregrind/m_syswrap/priv_syswrap-freebsd.h | 1 + coregrind/m_syswrap/priv_syswrap-generic.h | 1 + coregrind/m_syswrap/syswrap-freebsd.c | 49 +++++++++++ coregrind/m_syswrap/syswrap-generic.c | 6 ++ coregrind/pub_core_clientstate.h | 3 + coregrind/pub_core_debuginfo.h | 2 + include/vki/vki-freebsd.h | 2 + include/vki/vki-scnums-freebsd.h | 2 + memcheck/tests/freebsd/Makefile.am | 5 ++ memcheck/tests/freebsd/getrlimitusage.c | 106 +++++++++++++++++++++++ memcheck/tests/freebsd/getrlimitusage.stderr.exp | 16 ++++ memcheck/tests/freebsd/getrlimitusage.vgtest | 3 + memcheck/tests/freebsd/scalar.c | 44 ++++++++++ memcheck/tests/freebsd/scalar.stderr.exp | 34 ++++++++ 19 files changed, 300 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e38537a9a6..cfd943bfc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1421,6 +1421,7 @@ /memcheck/tests/freebsd/get_set_login /memcheck/tests/freebsd/getfh /memcheck/tests/freebsd/getfsstat +/memcheck/tests/freebsd/getrlimitusage /memcheck/tests/freebsd/inlinfo /memcheck/tests/freebsd/inlinfo_nested.so /memcheck/tests/freebsd/kqueue diff --git a/NEWS b/NEWS index 70fa86bc06..9724705090 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +495488 Add FreeBSD getrlimitusage syscall wrapper To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/configure.ac b/configure.ac index 96b19d2aa1..ee18cc83a1 100755 --- a/configure.ac +++ b/configure.ac @@ -4955,7 +4955,8 @@ AC_CHECK_FUNCS([ \ sem_timedwait \ sem_clockwait_np \ fdatasync \ - getrandom + getrandom \ + getrlimitusage ]) # AC_CHECK_LIB adds any library found to the variable LIBS, and links these @@ -5009,6 +5010,8 @@ AM_CONDITIONAL([HAVE_FDATASYNC], [test x$ac_cv_func_fdatasync = xyes]) AM_CONDITIONAL([HAVE_GETRANDOM], [test x$ac_cv_func_getrandom = xyes]) +AM_CONDITIONAL([HAVE_GETRLIMITUSAGE], + [test x$ac_cv_func_getrlimitusage = xyes]) if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \ diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index ad05b9928d..11ab473542 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -65,6 +65,9 @@ # include "priv_readmacho.h" # include "priv_readpdb.h" #endif +#if defined(VGO_freebsd) +#include "pub_core_clientstate.h" +#endif /* Set this to 1 to enable somewhat minimal debug printing for the @@ -5145,6 +5148,19 @@ void VG_(load_all_debuginfo) (void) VG_(di_load_di)(di); } } + +SizeT VG_(data_size)(void) +{ + HChar resolved[1000]; + VG_(realpath)( VG_(args_the_exename), resolved); + + for (DebugInfo* di = debugInfo_list; di; di = di->next) { + if (di->data_size && VG_(strcmp)(di->soname, "NONE") == 0 && VG_(strcmp)(resolved, di->fsm.filename) == 0) { + return VG_PGROUNDUP(di->data_size); + } + } + return 0U; +} #endif /*--------------------------------------------------------------------*/ diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 22b4fea0f3..85e744d157 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -3543,6 +3543,10 @@ void _start_in_C_freebsd ( UWord* pArgc, UWord *initial_sp ) # error "Unknown OS" #endif +SizeT VG_(get_client_stack_max_size)(void) +{ + return the_iifii.clstack_max_size; +} Addr VG_(get_initial_client_SP)( void ) { diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index 5b71866400..8b78c5d742 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -538,6 +538,7 @@ DECL_TEMPLATE(freebsd, sys_timerfd_settime) // 587 // __FreeBSD_version 1400507 and 1500012 DECL_TEMPLATE(freebsd, sys_kcmp) // 588 +DECL_TEMPLATE(freebsd, sys_getrlimitusage) // 589 DECL_TEMPLATE(freebsd, sys_fake_sigreturn) diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h index ec174a1520..b888a167cc 100644 --- a/coregrind/m_syswrap/priv_syswrap-generic.h +++ b/coregrind/m_syswrap/priv_syswrap-generic.h @@ -60,6 +60,7 @@ Bool ML_(fd_allowed)(Int fd, const HChar *syscallname, ThreadId tid, Bool isNewFD); extern void ML_(record_fd_close) (ThreadId tid, Int fd); +extern Int ML_(get_fd_count) (void); extern void ML_(record_fd_close_range) (ThreadId tid, Int fd); extern void ML_(record_fd_open_named) (ThreadId tid, Int fd); extern void ML_(record_fd_open_nameless) (ThreadId tid, Int fd); diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 85b60c8f35..f5516420fb 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -6915,6 +6915,54 @@ PRE(sys_kcmp) } } +// SYS_getrlimitusage 589 +// from syscalls.master +// int getrlimitusage(u_int which, int flags, _Out_ rlim_t *res); +PRE(sys_getrlimitusage) +{ + PRINT("sys_getrlimitusage(%lu, %ld, %#" FMT_REGWORD "x )", ARG1, SARG2, ARG3); + PRE_REG_READ3(int, "getrlimitusage", u_int, which, int, flags, vki_rlim_t*, res); + + PRE_MEM_WRITE("getrlimitusage(res)", ARG3, sizeof(vki_rlim_t)); +} + +POST(sys_getrlimitusage) +{ + POST_MEM_WRITE(ARG3, sizeof(vki_rlim_t)); + + // flags can be GETRLIMITUSAGE_EUID or not + // not sure what that means? + + // we need to set the values for NOFILE DATA and STACK + vki_rlim_t* res = (vki_rlim_t*)ARG3; + switch (ARG1) { + case VKI_RLIMIT_NOFILE: + *res = ML_(get_fd_count)() + 3; + break; + case VKI_RLIMIT_DATA: + /* + * The OS initializes this the the size of the .data for the exe. + * We read this in readelf.c. + */ + *res = VG_(data_size)() + VG_(brk_limit) - VG_(brk_base); + break; + case VKI_RLIMIT_STACK: + /* + * The main client stack is quite different when running under Valgrind. + * See aspacemg-linux.c for details, but in short on 64bit systems + * the main stack starts with 128k reserved and a 512M limit. + * Valgrind just has one value, 16M by default (can be changed with + * --main-stacksize). Maybe we should use something more like the OS + * but it doesn't seem that important. + */ + *res = VG_(get_client_stack_max_size)(); + break; + default: + // do nothing + break; + } +} + #undef PRE #undef POST @@ -7606,6 +7654,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { BSDXY(__NR_timerfd_settime, sys_timerfd_settime), // 586 BSDXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 587 BSDX_(__NR_kcmp, sys_kcmp), // 588 + BSDXY(__NR_getrlimitusage, sys_getrlimitusage), // 589 BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 1d80d09288..d6b10780dc 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -553,6 +553,12 @@ static OpenFd *allocated_fds = NULL; /* Count of open file descriptors. */ static Int fd_count = 0; + +Int ML_(get_fd_count)(void) +{ + return fd_count; +} + /* Close_range caller might want to close very wide range of file descriptors, up to 0U. We want to avoid iterating through such a range in a normall close_range, just up to any open file descriptor. Also, unlike diff --git a/coregrind/pub_core_clientstate.h b/coregrind/pub_core_clientstate.h index dceece9b90..06d0fe343b 100644 --- a/coregrind/pub_core_clientstate.h +++ b/coregrind/pub_core_clientstate.h @@ -98,6 +98,9 @@ extern Addr VG_(client_freeres_wrapper); VG_(get_StackTrace) in m_stacktrace.c for further info. */ extern Addr VG_(client__dl_sysinfo_int80); +/* Get the maximum client stacksize. */ +extern SizeT VG_(get_client_stack_max_size)(void); + /* Obtains the initial client stack pointer from the finalised image info. */ extern Addr VG_(get_initial_client_SP)(void); diff --git a/coregrind/pub_core_debuginfo.h b/coregrind/pub_core_debuginfo.h index 4d6ebda816..64fcd3428a 100644 --- a/coregrind/pub_core_debuginfo.h +++ b/coregrind/pub_core_debuginfo.h @@ -158,6 +158,8 @@ extern UInt VG_(debuginfo_generation) (void); we can't open executable files to get the debuginfo after entering capability mode. */ extern void VG_(load_all_debuginfo) (void); +/* Get the size of .data for the client exe */ +extern SizeT VG_(data_size)(void); #endif diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h index 7b35428a3c..a49650b2bc 100644 --- a/include/vki/vki-freebsd.h +++ b/include/vki/vki-freebsd.h @@ -1230,6 +1230,8 @@ struct vki_rlimit { #define VKI_RLIMIT_CORE 4 /* max core file size */ #define VKI_RLIMIT_NOFILE 8 /* max number of open files */ +#define VKI_GETRLIMITUSAGE_EUID 0x0001 + struct vki___wrusage { struct vki_rusage wru_self; struct vki_rusage wru_children; diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h index 852f9833ab..098b722f48 100644 --- a/include/vki/vki-scnums-freebsd.h +++ b/include/vki/vki-scnums-freebsd.h @@ -626,6 +626,8 @@ // __FreeBSD_version 1400507 and 1500012 #define __NR_kcmp 588 +#define __NR_getrlimitusage 589 + #define __NR_fake_sigreturn 1000 #endif /* VKI_UNISTD_FREEBSD_H */ diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index b2e84fc03e..4b6b36c6ce 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -67,6 +67,7 @@ EXTRA_DIST = \ getfsstat.stderr.exp \ getfsstat.supp \ getfsstat.stderr.exp-x86 \ + getrlimitusage.vgtest getrlimitusage.stderr.exp \ kqueue.vgtest \ kqueue.stderr.exp \ kqueue.stdout.exp \ @@ -172,6 +173,10 @@ if HAVE_AIO_READV check_PROGRAMS += aiov endif +if HAVE_GETRLIMITUSAGE +check_PROGRAMS += getrlimitusage +endif + inlinfo_SOURCES = inlinfo.c inlinfo_DEPENDENCIES = inlinfo_nested.so inlinfo_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd diff --git a/memcheck/tests/freebsd/getrlimitusage.c b/memcheck/tests/freebsd/getrlimitusage.c new file mode 100644 index 0000000000..123ab18ad8 --- /dev/null +++ b/memcheck/tests/freebsd/getrlimitusage.c @@ -0,0 +1,106 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov <ki...@Fr...> + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/param.h> +#define _RLIMIT_IDENT +#include <err.h> +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/resource.h> +#include <unistd.h> + +static void usage(void) +{ + fprintf(stderr, "usage: getrlimitusage [-e] [-p pid]\n"); + exit(2); +} + +int main(int argc, char *argv[]) +{ + rlim_t res; + int c, flags; + + flags = 0; + while ((c = getopt(argc, argv, "e")) != -1) + { + switch (c) + { + case 'e': + flags |= GETRLIMITUSAGE_EUID; + break; + case '?': + default: + usage(); + } + } + argc -= optind; + argv += optind; + if (argc != 0) + usage(); + + for (unsigned i = 0;; i++) + { + if (getrlimitusage(i, flags, &res) == -1) + { + if (errno == ENXIO) + { + res = -1; + } + else + { + if (errno != EINVAL) + err(1, "getrlimitusage(%d)", errno); + break; + } + } + // add some rounding to try to make regtest stable + switch (i) + { + case 7: + case 9: + case 12: + case 15: + res = 0U; + break; + case 5: + res = res/100000 * 100000; + break; + case 10: + res = res/1000 * 1000; + break; + default: + break; + } + fprintf(stderr, "%s (%d):\t%jd\n", i < nitems(rlimit_ident) ? rlimit_ident[i] : "unknown", i, (uintmax_t)res +); + } + exit(0); +} diff --git a/memcheck/tests/freebsd/getrlimitusage.stderr.exp b/memcheck/tests/freebsd/getrlimitusage.stderr.exp new file mode 100644 index 0000000000..2a1ecb3eaa --- /dev/null +++ b/memcheck/tests/freebsd/getrlimitusage.stderr.exp @@ -0,0 +1,16 @@ +cpu (0): 0 +fsize (1): -1 +data (2): 4096 +stack (3): 16777216 +core (4): -1 +rss (5): 41800000 +memlock (6): 0 +nproc (7): 0 +nofile (8): 3 +sbsize (9): 0 +vmem (10): 106414000 +npts (11): 0 +swap (12): 0 +kqueues (13): 0 +umtx (14): 0 +pipebuf (15): 0 diff --git a/memcheck/tests/freebsd/getrlimitusage.vgtest b/memcheck/tests/freebsd/getrlimitusage.vgtest new file mode 100644 index 0000000000..dbcd3334dd --- /dev/null +++ b/memcheck/tests/freebsd/getrlimitusage.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./getrlimitusage +prog: getrlimitusage +vgopts: -q diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index 5aecfebacf..7ad3099a04 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2408,6 +2408,50 @@ int main(void) FAKE_SY("\n"); #endif + /* SYS_kcmp 588 */ +#if defined(SYS_kcmp) + GO(SYS_kcmp, "5s 0m"); + SY(SYS_kcmp, x0+1, x0+2, x0+3, x0+4, x0+5); +#else + FAKE_GO("588: SYS_kcmp 5s 0m"); + FAKE_SY("Syscall param kcmp(pid1) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param kcmp(pid2) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param kcmp(type) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param kcmp(idx1) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param kcmp(idx2) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); +#endif + + /* SYS_getrlimitusage 589 */ +#if defined(SYS_getrlimitusage) + GO(SYS_getrlimitusage, "3s, 1m"); + SY(SYS_getrlimitusage, x0+3, x0, x0+2); +#else + FAKE_GO("589: SYS_getrlimitusage 3s, 1m"); + FAKE_SY("Syscall param getrlimitusage(which) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param getrlimitusage(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param getrlimitusage(res) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param getrlimitusage(res) points to unaddressable byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY(" Address 0x........ is not stack'd, malloc'd or (recently) free'd\n"); + FAKE_SY("\n"); +#endif + /* SYS_exit 1 */ GO(SYS_exit, "1s 0m"); SY(SYS_exit, x0); FAIL; diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index ed5f0a9b15..4a57e002aa 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5710,6 +5710,40 @@ Syscall param timerfd_settime(old_value) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +588: SYS_kcmp 5s 0m +--------------------------------------------------------- +Syscall param kcmp(pid1) contains uninitialised byte(s) + ... + +Syscall param kcmp(pid2) contains uninitialised byte(s) + ... + +Syscall param kcmp(type) contains uninitialised byte(s) + ... + +Syscall param kcmp(idx1) contains uninitialised byte(s) + ... + +Syscall param kcmp(idx2) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +589: SYS_getrlimitusage 3s, 1m +--------------------------------------------------------- +Syscall param getrlimitusage(which) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(flags) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(res) contains uninitialised byte(s) + ... + +Syscall param getrlimitusage(res) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2024-11-03 08:51:25
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6fbd3d4aa17e9fc9f36bb310739cdc16bad6a774 commit 6fbd3d4aa17e9fc9f36bb310739cdc16bad6a774 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 09:50:37 2024 +0100 Fix compiler warnings produced by clang 19. Diff: --- VEX/priv/host_x86_defs.c | 2 +- coregrind/m_cache.c | 2 +- coregrind/m_debuginfo/d3basics.c | 2 +- coregrind/m_debuginfo/readdwarf.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VEX/priv/host_x86_defs.c b/VEX/priv/host_x86_defs.c index b1c349afbc..5497efdf7a 100644 --- a/VEX/priv/host_x86_defs.c +++ b/VEX/priv/host_x86_defs.c @@ -1141,7 +1141,7 @@ void ppX86Instr ( const X86Instr* i, Bool mode64 ) { ppHRegX86(i->Xin.FpCmp.dst); break; case Xin_SseConst: - vex_printf("const $0x%04x,", (Int)i->Xin.SseConst.con); + vex_printf("const $0x%04x,", (UInt)i->Xin.SseConst.con); ppHRegX86(i->Xin.SseConst.dst); break; case Xin_SseLdSt: diff --git a/coregrind/m_cache.c b/coregrind/m_cache.c index 565aa41767..d12941cd68 100644 --- a/coregrind/m_cache.c +++ b/coregrind/m_cache.c @@ -336,7 +336,7 @@ Intel_cache_info(Int level, VexCacheInfo *ci) } break; default: - VG_(debugLog)(1, "cache", "warning: L%u cache ignored\n", + VG_(debugLog)(1, "cache", "warning: L%d cache ignored\n", (info[0] & 0xe0) >> 5); break; } diff --git a/coregrind/m_debuginfo/d3basics.c b/coregrind/m_debuginfo/d3basics.c index 97ecbdaf4c..564b832e63 100644 --- a/coregrind/m_debuginfo/d3basics.c +++ b/coregrind/m_debuginfo/d3basics.c @@ -1059,7 +1059,7 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( const UChar* expr, UWord exprszB, if (!VG_(clo_xml)) VG_(message)(Vg_DebugMsg, "warning: evaluate_Dwarf3_Expr: unhandled " - "DW_OP_ 0x%x\n", (Int)opcode); + "DW_OP_ 0x%x\n", (UInt)opcode); FAIL("evaluate_Dwarf3_Expr: unhandled DW_OP_"); /*NOTREACHED*/ } diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c index 48df2e73ec..0686e8d078 100644 --- a/coregrind/m_debuginfo/readdwarf.c +++ b/coregrind/m_debuginfo/readdwarf.c @@ -3339,7 +3339,7 @@ static Int dwarfexpr_to_dag ( const UnwindContext* ctx, if (!VG_(clo_xml)) VG_(message)(Vg_DebugMsg, "Warning: DWARF2 CFI reader: unhandled DW_OP_ " - "opcode 0x%x\n", (Int)opcode); + "opcode 0x%x\n", (UInt)opcode); return -1; } |
From: Paul F. <pa...@so...> - 2024-11-03 08:12:47
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=836b7481729649ad95220db3dd7be86ed8e08382 commit 836b7481729649ad95220db3dd7be86ed8e08382 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 3 09:12:13 2024 +0100 Add /none/tests/use_after_close to .gitignore Diff: --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1b6e2d002b..e38537a9a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1647,6 +1647,7 @@ /none/tests/tls /none/tests/track-fds-exec-children /none/tests/unit_debuglog +/none/tests/use_after_close /none/tests/valgrind_cpp_test /none/tests/vgcore.* /none/tests/vgprintf |
From: Paul F. <pa...@so...> - 2024-11-02 21:23:41
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a5c14fd3452549bd61c24aa4db6ed4ab45411e11 commit a5c14fd3452549bd61c24aa4db6ed4ab45411e11 Author: Paul Floyd <pj...@wa...> Date: Sat Nov 2 22:22:10 2024 +0100 FreeBSD syscall: fix syscall name used in kcmp traces. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 685eb6be07..85b60c8f35 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -6895,7 +6895,7 @@ POST(sys_timerfd_settime) // int kcmp(pid_t pid1, pid_t pid2, int type, uintptr_t idx1, uintptr_t idx2); PRE(sys_kcmp) { - PRINT("kcmp(%ld, %ld, %ld, %" FMT_REGWORD "u, %" FMT_REGWORD "u)", + PRINT("sys_kcmp(%ld, %ld, %ld, %" FMT_REGWORD "u, %" FMT_REGWORD "u)", SARG1, SARG2, SARG3, ARG4, ARG5); switch (ARG3) { case VKI_KCMP_FILES: |
From: Paul F. <pa...@so...> - 2024-11-01 08:00:21
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7424c61b16316c2080d02ec0605a4177557ad9be commit 7424c61b16316c2080d02ec0605a4177557ad9be Author: Paul Floyd <pj...@wa...> Date: Fri Nov 1 08:59:19 2024 +0100 FreeBSD regtest: add _write to none filter_fdleak Also bump up news and configure to 3.25 git. Diff: --- NEWS | 31 +++++++++++++++++++++++++++++++ configure.ac | 6 +++--- none/tests/filter_fdleak | 2 +- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 49b4647d42..70fa86bc06 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,34 @@ +Release 3.25.0 (?? Apr 2025) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, +PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, +MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, +X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD, AMD64/FreeBSD +and ARM64/FreeBSD There is also preliminary support for X86/macOS 10.13, +AMD64/macOS 10.13 and nanoMIPS/Linux. + +* ==================== CORE CHANGES =================== + +* ================== PLATFORM CHANGES ================= + +* ==================== TOOL CHANGES =================== + +* ==================== FIXED BUGS ==================== + +The following bugs have been fixed or resolved. Note that "n-i-bz" +stands for "not in bugzilla" -- that is, a bug that was reported to us +but never got a bugzilla entry. We encourage you to file bugs in +bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather +than mailing the developers (or mailing lists) directly -- bugs that +are not entered into bugzilla tend to get forgotten about or ignored. + + +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. + + Release 3.24.0 (31 Oct 2024) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/configure.ac b/configure.ac index 095659ac25..96b19d2aa1 100755 --- a/configure.ac +++ b/configure.ac @@ -15,10 +15,10 @@ # Also set the (expected/last) release date here. # Do not forget to rerun ./autogen.sh m4_define([v_major_ver], [3]) -m4_define([v_minor_ver], [24]) +m4_define([v_minor_ver], [25]) m4_define([v_micro_ver], [0]) -m4_define([v_suffix_ver], []) -m4_define([v_rel_date], ["31 Oct 2024"]) +m4_define([v_suffix_ver], [GIT]) +m4_define([v_rel_date], ["?? Apr 2025"]) m4_define([v_version], m4_if(v_suffix_ver, [], [v_major_ver.v_minor_ver.v_micro_ver], diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index d26937bccd..a63c2c7e58 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -21,7 +21,7 @@ perl -p -e 's/open \(open64\.c:[1-9][0-9]*\)/creat (in \/...libc...)/' | perl -p -e "s/: open \(/: creat (/" | # FreeBSD specific fdleak filters -perl -p -e 's/ _close / close /;s/ _openat / creat /;s/internet/AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:.../' | +perl -p -e 's/ _close / close /;s/ _openat / creat /;s/ _write/ write/;s/internet/AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:.../' | sed '/by 0x........: close (in \/...libc...)/d' | sed '/by 0x........: creat (in \/...libc...)/d' | |
From: Mark W. <ma...@kl...> - 2024-11-01 05:30:00
|
We are pleased to announce a new release of Valgrind, version 3.24.0, available from https://valgrind.org/downloads/current.html. See the release notes below for details of changes. Our thanks to all those who contribute to Valgrind's development. This release represents a great deal of time, energy and effort on the part of many people. Happy and productive debugging and profiling, -- The Valgrind Developers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Release 3.24.0 (31 Oct 2024) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD There is also preliminary support for X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux. * ==================== CORE CHANGES =================== * Bad file descriptor usage now generates a real error with --track-fds=yes that is suppressible and shows up in the xml output with full execution backtrace. The warnings shown without using the option are deprecated and will be removed in a future valgrind version. * Ada name demangling is now supported in error messages. * ================== PLATFORM CHANGES ================= * S390X added support for the DFLTCC instruction provided by the deflate-conversion facility (z15/arch13). * S390X added support for the instructions provided by the MSA facility and MSA extensions 1-9. * ==================== TOOL CHANGES =================== * ==================== FIXED BUGS ==================== The following bugs have been fixed or resolved. Note that "n-i-bz" stands for "not in bugzilla" -- that is, a bug that was reported to us but never got a bugzilla entry. We encourage you to file bugs in bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. 202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes 276780 An instruction in fftw (Fast Fourier Transform) is unhandled by valgrind: vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0x2 311655 --log-file=FILE leads to apparent fd leak 317127 Fedora18/x86_64 --sanity-level=3 : aspacem segment mismatch 337388 fcntl works on Valgrind's own file descriptors 377966 arm64 unhandled instruction dc zva392146 aarch64: unhandled instruction 0xD5380001 (MRS rT, midr_el1) 391148 Unhandled AVX instruction vmovq %xmm9,%xmm1 392146 aarch64: unhandled instruction 0xD5380001 (MRS rT, midr_el1) 412377 SIGILL on cache flushes on arm64 417572 vex amd64->IR: unhandled instruction bytes: 0xC5 0x79 0xD6 0xED 0xC5 440180 s390x: Failed assertion in disassembler 444781 MIPS: wrong syscall numbers used 447989 Support Armv8.2 SHA-512 instructions 445235 Java/Ada/D demangling is probably broken 453044 gbserver_tests failures in aarch64 479661 Valgrind leaks file descriptors 486180 [Valgrind][MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL' 486293 memccpy false positives 486569 linux inotify_init syscall wrapper missing POST entry in syscall_table 487439 SIGILL in JDK11, JDK17 487993 Alignment error when using Eigen with Valgrind and -m32 488026 Use of `sizeof` instead of `strlen 488379 --track-fds=yes errors that cannot be suppressed with --xml-file= 488441 Add tests for --track-fds=yes --xml=yes and fd suppression tests 489040 massif trace change to show the location increasing the stack 489088 Valgrind throws unhandled instruction bytes: 0xC5 0x79 0xD6 0xE0 0xC5 489338 arm64: Instruction fcvtas should round 322.5 to 323, but result is 322. 489676 vgdb handle EINTR and EAGAIN more consistently 490651 Stop using -flto-partition=one 491394 (vgModuleLocal_addDiCfSI): Assertion 'di->fsm.have_rx_map && di->fsm.rw_map_count' failed 492210 False positive on x86/amd64 with ZF taken directly from addition 492214 statx(fd, NULL, AT_EMPTY_PATH) is supported since Linux 6.11 but not supported in valgrind 492422 Please support DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD 492663 Valgrind ignores debug info for some binaries 493418 Add bad fd usage errors for --track-fds in ML_(fd_allowed) 493454 Missing FUSE_COMPATIBLE_MAY_BLOCK markers 493507 direct readlink syscall from PRE handler is incompatible with FUSE_COMPATIBLE_MAY_BLOCK 493959 s390x: Fix regtest failure for none/tests/s390x/op00 493970 s390x: Store/restore FPC upon helper call causes slowdown 494252 s390x: incorrect disassembly for LOCHI and friends 494960 Fixes and tweaks for gsl19test 495278 PowerPC instruction dcbf should allow the L field values of 4, 6 on ISA 3.0 and earlier, just ignore the value 495469 aligned_alloc and posix_memalign missing MALLOC_TRACE with returned pointer 495470 s390x: 3.24.0.RC1 missing file and regtest failure n-i-bz Improve messages for sigaltstack errors, use specific stack_t member names 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.24.0.RC1: 27 Oct 2024) |