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
(96) |
Sep
(151) |
Oct
(111) |
Nov
|
Dec
|
|
From: Mark W. <ma...@kl...> - 2025-10-12 23:03:50
|
Hi, We discussed this on this list, with the core valgrind developers and the FSF Licensing and Compliance Lab what the correct way was to do this. The patch itself is a little too big to post to the list, but you can see it here: https://code.wildebeest.org/git/user/mjw/valgrind/log/?h=gplv3 There are two patches, one cleanup: Update where to get a copy of the GNU General Public License Several files still said to write to the Free Software Foundation at a particular address. Add a reference to <http://www.gnu.org/licenses/> instead. Some files that were imported into valgrind from other places still mention the old address. They should be updated when new versions get imported. And the actual update: Upgrade to GNU General Public License version 3 - Update COPYING and VEX/LICENSE.GPL to version 3. - Update README, NEWS, docs/manual license and contributing text. - Update file headers to say either version 3 of the License, or (at your option) any later version. - Leave tests and perf file headers as is, unless the code is derived from Valgrind/VEX. - Leave valgrind.h, cachegrind.h, callgrind.h, drd.h, helgrind.h, memcheck.h and dhat.h Hybrid-BSD licensed. I like to merge these on Friday (Oct 17) before releasing 3.26.0-RC1. Please let me know if you have any questions or concerns about this update. Thanks, Mark |
|
From: Paul F. <pj...@wa...> - 2025-10-12 17:09:23
|
On 2025-10-12 18:28, Florian Krohm wrote: > Hi Mark, > > On 09.10.25 22:03, Mark Wielaard wrote: >> Please let me know what you believe are blockers for the release or >> fixes you really would like to see in. >> > > I looked at building valgrind on mips (cfarm230 machine) because there > are no nightly runs.. > If mips is a supported platform (?), then there is a bit of work there: It would be good to get a few more architectures covered by the nightly tests: RISCV, MIPS, PPC with a more recent GCC. As an indication of where things are going, FreeBSD 15 is making quite a few changes to its platform support. Getting dropped will be x86 MIPS (already dropped in FreeBSD 14) 32bit PPC 32bit arm6 Petar Jovanovic does occasionally push MIPS changes. The last one was a bit less than a year ago. > configury: > Need to detect presence of -lcrypto and -laio otherwise > memcheck/tests/linux/bug480706.c > memcheck/tests/linux/bug420682_1.c > memcheck/tests/linux/bug420682_2.c > will not build. I'll have a look at those since I added all those testcases. > The GCC on that machine is rather old: 8.3.0. It does not recognise > -Wno-missing-exception-spec > -Wno-implicit-exception-spec-mismatch > -Wno-alloc-size-larger-than > -Walloc-size-larger-than= > They should be in FLAG_FNO_XXX variables in configure.ac and the relevant Makefile.am. > Building: > There are 126 warnings about: > cast increases required alignment of target type > I do not know whether that is a problem (other than performance > degradation) or not. If it is not then those warnings should be > suppressed. Back in the days we were striving to have a clean > build/check/regtest which I personally find to be a laudable goal. > Yes that is still the goal. Most platforms that run the nightly test have either 0 or 1 failure. illumos has a bit more with 7 failing testcases. > Regtest: > > == 768 tests, 288 stderr failures, 60 stdout failures, 10 stderrB > failures, 11 stdoutB failures, 3 post failures == > > Essentially all memcheck tests are failing this way: > > valgrind: Fatal error at startup: a function redirection > valgrind: which is mandatory for this platform-tool combination > valgrind: cannot be set up. Details of the redirection are: Hmm. Not for the upcoming release, but I'd like to add a configure option for mandatory index and strlen redirection. > > which renders memcheck unusable. libc6-dbg appears to be installed, > though. > I guess a MAINTAINERS file would be good to find out whom to pester > with this :) > > For PPC there is https://bugs.kde.org/show_bug.cgi?id=508661 which > would be good to get fixed. Perhaps Carl Love will take a look? A+ Paul |
|
From: Florian K. <fl...@ei...> - 2025-10-12 16:29:18
|
Hi Mark, On 09.10.25 22:03, Mark Wielaard wrote: > > There are a couple of things I like to add before RC1: > > - Update to GPLv3+. > We discussed this on the list and then with some core developers > asking for advice from the FSF Legal and Compliance team. > I'll post a patch tomorrow with the full rational, so we can > discuss it before applying for RC1. Oh yes! Can't wait :) > Please let me know what you believe are blockers for the release or > fixes you really would like to see in. > I looked at building valgrind on mips (cfarm230 machine) because there are no nightly runs.. If mips is a supported platform (?), then there is a bit of work there: configury: Need to detect presence of -lcrypto and -laio otherwise memcheck/tests/linux/bug480706.c memcheck/tests/linux/bug420682_1.c memcheck/tests/linux/bug420682_2.c will not build. The GCC on that machine is rather old: 8.3.0. It does not recognise -Wno-missing-exception-spec -Wno-implicit-exception-spec-mismatch -Wno-alloc-size-larger-than -Walloc-size-larger-than= Building: There are 126 warnings about: cast increases required alignment of target type I do not know whether that is a problem (other than performance degradation) or not. If it is not then those warnings should be suppressed. Back in the days we were striving to have a clean build/check/regtest which I personally find to be a laudable goal. Regtest: == 768 tests, 288 stderr failures, 60 stdout failures, 10 stderrB failures, 11 stdoutB failures, 3 post failures == Essentially all memcheck tests are failing this way: valgrind: Fatal error at startup: a function redirection valgrind: which is mandatory for this platform-tool combination valgrind: cannot be set up. Details of the redirection are: .... which renders memcheck unusable. libc6-dbg appears to be installed, though. I guess a MAINTAINERS file would be good to find out whom to pester with this :) For PPC there is https://bugs.kde.org/show_bug.cgi?id=508661 which would be good to get fixed. Cheers, Florian |
|
From: Paul F. <pa...@so...> - 2025-10-12 14:14:29
|
https://sourceware.org/cgit/valgrind/commit/?id=ea458dade2cb8f42586ef5a3f271b4cdddbf647a commit ea458dade2cb8f42586ef5a3f271b4cdddbf647a Author: Paul Floyd <pj...@wa...> Date: Sat Oct 4 18:46:58 2025 +0000 Bug 509406 - FreeBSD 15 issues This is the last of a series of fixes and bodges. I now get the following results. On arm64 == 793 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/thread_alloca (stderr) (which is not a new failure) and == 947 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures == gdbserver_tests/nlvgdbsigqueue (stderr) gdbserver_tests/nlvgdbsigqueue (stdoutB) (again a test that fails regularly) Diff: --- NEWS | 3 ++- memcheck/tests/freebsd/pdfork_pdkill.supp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index eebbf4fabd..b1b27e815b 100644 --- a/NEWS +++ b/NEWS @@ -70,7 +70,7 @@ There is a workaround. Run the following command (as root). "UnsafeZeroSize". Checks for C23 free_sized and free_aligned_sized have been added to - Linux. Almost no libraries support these functions yes, with + Linux. Almost no libraries support these functions yet, with the exception being Google tcmalloc. * ==================== FIXED BUGS ==================== @@ -156,6 +156,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509107 memcheck/tests/duplicate_align_size_errors.cpp fails 509139 Update BadSize error messages 509258 FreeBSD: add jail_attach_jd and jail_remove_jd syscall wrappers +509406 FreeBSD 15 issues 509517 s390x: Even/odd lane confusion in various vector insns 509566 Wrap amd64-linux syscall: 442 (mount_setattr) 509572 s390x: Overhaul BFP testsuite diff --git a/memcheck/tests/freebsd/pdfork_pdkill.supp b/memcheck/tests/freebsd/pdfork_pdkill.supp index cd3ad74798..47a836de92 100644 --- a/memcheck/tests/freebsd/pdfork_pdkill.supp +++ b/memcheck/tests/freebsd/pdfork_pdkill.supp @@ -7,7 +7,7 @@ { arm64 suppression 2 Memcheck:Cond - fun:__sys_pdfork + fun:_*pdfork } |
|
From: Paul F. <pa...@so...> - 2025-10-12 09:33:42
|
https://sourceware.org/cgit/valgrind/commit/?id=0a5028313b6ff0462b77318b250ed31a2b069510 commit 0a5028313b6ff0462b77318b250ed31a2b069510 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 12 13:29:45 2025 +0200 FreeBSD regtest: add a prereq for bug452274 This test tends to hang when running in a VM. The problem is that the test spams both syscalls (write) and signals (SIGVTALRM from setitimer). The test halts after 100 signals have been handled. Under VirtualBox the timer signals get starved by the syscalls and the limit of 100 doesn't get reached (at least not in any reasonable amount of time). Diff: --- none/tests/freebsd/bug452274.vgtest | 1 + 1 file changed, 1 insertion(+) diff --git a/none/tests/freebsd/bug452274.vgtest b/none/tests/freebsd/bug452274.vgtest index 30b1179a61..23092b1381 100644 --- a/none/tests/freebsd/bug452274.vgtest +++ b/none/tests/freebsd/bug452274.vgtest @@ -1,3 +1,4 @@ +prereq: [ `sysctl -n kern.vm_guest` = "none" ] prog: bug452274 vgopts: -q stderr_filter: filter_452274 |
|
From: Paul F. <pa...@so...> - 2025-10-11 13:12:06
|
https://sourceware.org/cgit/valgrind/commit/?id=5addc084570ee5fbb2876093415ffefdb8b9645c commit 5addc084570ee5fbb2876093415ffefdb8b9645c Author: Paul Floyd <pj...@wa...> Date: Sat Oct 11 15:11:10 2025 +0200 FreeBSD cleanup: remove an orphaned comment Removed the function, forgot to remove the reminder comment. Diff: --- coregrind/m_initimg/initimg-freebsd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 2f8ac82ebb..f187c0e3de 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -334,10 +334,6 @@ static const struct auxv *find_auxv(const UWord* sp) return (const struct auxv *)sp; } -/* - * @todo PJF Make this multi-platform - */ - /* ---------------------------------------------------------------- This sets up the client's initial stack, containing the args, |
|
From: Paul F. <pa...@so...> - 2025-10-11 13:10:19
|
https://sourceware.org/cgit/valgrind/commit/?id=01db0b93a8b9145d26e2e15da1759f1377f7ee91 commit 01db0b93a8b9145d26e2e15da1759f1377f7ee91 Author: Paul Floyd <pj...@wa...> Date: Sat Oct 11 15:09:46 2025 +0200 NEWS: Add FreeBSD platform section Diff: --- NEWS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NEWS b/NEWS index b097e3789f..eebbf4fabd 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,21 @@ X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux. * ================== PLATFORM CHANGES ================= +FreeBSD 15 (which is expected to ship in December 2025, after +Valgrind 3.26 is released) contains a change to ptrace that affects +use of Valgrind with vgdb. This impacts the mechanism that vgdb +uses to interrupt Valgrind if all threads are blocked and you want +to get back to the gdb prompt by hitting ctrl-c. This mechanism +is no longer reliable. On arm64 Valgrind will crash with an assert. +On amd64 syscalls may give spurious and incorrect return codes. + +There is a workaround. Run the following command (as root). + + sysctl debug.ptrace_attach_transparent=0 + + See also + https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290008 + * ==================== TOOL CHANGES =================== * There is a new utility script, "vgstack". It has two |
|
From: Paul F. <pa...@so...> - 2025-10-11 11:01:43
|
https://sourceware.org/cgit/valgrind/commit/?id=7068b807905af87729a66d192f7c10247c42212f commit 7068b807905af87729a66d192f7c10247c42212f Author: Paul Floyd <pj...@wa...> Date: Sat Oct 11 13:01:03 2025 +0200 gdbserver doc: add some comments about the invoker implementations. Diff: --- gdbserver_tests/README_DEVELOPERS | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gdbserver_tests/README_DEVELOPERS b/gdbserver_tests/README_DEVELOPERS index 250c14326b..0a9f2846f6 100644 --- a/gdbserver_tests/README_DEVELOPERS +++ b/gdbserver_tests/README_DEVELOPERS @@ -30,11 +30,27 @@ if testing with a lower version). Test behaviour with gdb < 7.0 is unknown: some might fail, some might block or loop for a very long time. -Some tests implies to have a vgdb "ptrace invoker" capable. +Some tests imply having the vgdb "ptrace invoker" capability. The prerequisite are established during make regtest (using marker files). Each test verifies the prerequisite using the prereq: line. +The invoker is implemented as follows on the currently supported OSes. + +------------------------------------------------------------ +| Linux | ptrace | vgdb-invoker-ptrace.c | +| FreeBSD | ptrace | vgdb-invoker-freebsd.c | +| Solaris | process control files | vgdb-invoker-solaris.c | +| Darwin | not implemented | vgdb-invoker-none.c | +------------------------------------------------------------ + +The source files are all in coregrind/. ptrace is not part of any +standardised interface like POSIX. That means that the Linux and +FreeBSD implementations are very similar but there are some +differences. Darwin not having an invoker means that it is not possible +to interrupt Valgrind attached to GDB if it hangs. You will need to +kill Valgrind and start again if that happens. + In case of failing tests ------------------------ When executed with a new gdb version and/or depending on the OS version, |
|
From: Paul F. <pa...@so...> - 2025-10-10 20:33:48
|
https://sourceware.org/cgit/valgrind/commit/?id=5a3aa8c8d13720636df4415ca6bb0aa43b67ef1c commit 5a3aa8c8d13720636df4415ca6bb0aa43b67ef1c Author: Paul Floyd <pj...@wa...> Date: Sat Oct 11 00:32:23 2025 +0200 FreeBSD regtest: improve filter_arg_check This was looking for PIDs with 5 digits so the test failed when the PIDs being used have fewer digits. Diff: --- memcheck/tests/amd64-freebsd/filter_arg_check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/amd64-freebsd/filter_arg_check b/memcheck/tests/amd64-freebsd/filter_arg_check index 334a326694..c1152cf836 100755 --- a/memcheck/tests/amd64-freebsd/filter_arg_check +++ b/memcheck/tests/amd64-freebsd/filter_arg_check @@ -18,5 +18,5 @@ grep "SYSCALL.*sendfile" | sed 's/==.*//' | awk '{l=length($9);$9="0x"substr($9, l-2, l);print}' | -sed -E 's/\[[0-9]{5}/[xxxxx/' +sed -E 's/\[[0-9]+/[xxxxx/' |
|
From: Paul F. <pa...@so...> - 2025-10-10 18:59:35
|
https://sourceware.org/cgit/valgrind/commit/?id=9640ff697cd9c9be485ea8bffc6381395b3ad1d4 commit 9640ff697cd9c9be485ea8bffc6381395b3ad1d4 Author: Paul Floyd <pj...@wa...> Date: Fri Oct 10 20:57:26 2025 +0200 FreeBSD regtest: tweak setcred test Should now work on both arm64 and amd64 (and with a diff on the size of struct setcred for x86). Still don't see what caused the Conditional jump error. Diff: --- memcheck/tests/freebsd/setcred.cpp | 33 +++++++++++++++++++++---------- memcheck/tests/freebsd/setcred.stderr.exp | 26 ++++++++++++------------ 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/memcheck/tests/freebsd/setcred.cpp b/memcheck/tests/freebsd/setcred.cpp index 619d1959f1..1ae28f7f04 100644 --- a/memcheck/tests/freebsd/setcred.cpp +++ b/memcheck/tests/freebsd/setcred.cpp @@ -19,30 +19,23 @@ int main() std::memset(&cred1, 250, sizeof(cred1)); - // needs to be root to work correctly - ret = setcred(flags1, &cred1, size1); - assert(ret == -1); - assert(errno == EPERM); - - // not accessible - ret = setcred(flags1, nullptr, size1); - assert(ret == -1); - assert(errno == EFAULT); - // uninit ret = setcred(flags2+x0, (struct setcred*)x0, size1+x0); assert(ret == -1); assert(errno == EFAULT); + errno = 0; // invalid flags ret = setcred(9999+x0, &cred1, sizeof(cred1)); assert(ret == -1); assert(errno == EINVAL); + errno = 0; // invalid size ret = setcred(flags1, &cred1, 3+x0); assert(ret == -1); assert(errno == EINVAL); + errno = 0; cred2 = new struct setcred; @@ -50,6 +43,26 @@ int main() ret = setcred(flags1, cred2, size1); assert(ret == -1); assert(errno == EPERM); + errno = 0; + + // PJF these two calls to setcred were before the + // uninit one that is now first + // that was fine on arm64 but on amd64 the uninit + // call generated an extre Conditional jump ... error + + // fairly mysterious, and usually that means that there + // is something wrong with the syscall wrapper + + // needs to be root to work correctly + ret = setcred(flags1, &cred1, size1); + assert(ret == -1); + assert(errno == EPERM); + errno = 0; + + // not accessible + ret = setcred(flags1, nullptr, size1); + assert(ret == -1); + assert(errno == EFAULT); delete cred2; free(px); diff --git a/memcheck/tests/freebsd/setcred.stderr.exp b/memcheck/tests/freebsd/setcred.stderr.exp index 8766361c09..5f84b4f288 100644 --- a/memcheck/tests/freebsd/setcred.stderr.exp +++ b/memcheck/tests/freebsd/setcred.stderr.exp @@ -1,37 +1,37 @@ -Syscall param setcred(wcred) points to unaddressable byte(s) - at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:28) - Address 0x........ is not stack'd, malloc'd or (recently) free'd - Syscall param setcred(flags) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:33) + by 0x........: main (setcred.cpp:23) Syscall param setcred(wcred) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:33) + by 0x........: main (setcred.cpp:23) Syscall param setcred(size) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:33) + by 0x........: main (setcred.cpp:23) Syscall param setcred(wcred) points to unaddressable byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:33) + by 0x........: main (setcred.cpp:23) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param setcred(flags) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:38) + by 0x........: main (setcred.cpp:29) Syscall param setcred(size) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:43) + by 0x........: main (setcred.cpp:35) Syscall param setcred(wcred) points to uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:50) + by 0x........: main (setcred.cpp:43) Address 0x........ is 0 bytes inside a block of size 48 alloc'd at 0x........: ...operator new... (vg_replace_malloc.c:...) - by 0x........: main (setcred.cpp:47) + by 0x........: main (setcred.cpp:40) + +Syscall param setcred(wcred) points to unaddressable byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:63) + Address 0x........ is not stack'd, malloc'd or (recently) free'd |
|
From: Martin C. <mc...@so...> - 2025-10-10 16:12:50
|
https://sourceware.org/cgit/valgrind/commit/?id=001f7439d6e20f3b117b5032070111fd701195bc commit 001f7439d6e20f3b117b5032070111fd701195bc Author: Martin Cermak <mc...@re...> Date: Fri Oct 10 18:12:02 2025 +0200 Define __NR_swapon and __NR_swapoff on riscv64 Update commit c3f8f3ceb4ba6942993762f82911a670fa128789 adding a missing define. https://bugs.kde.org/show_bug.cgi?id=368791 Diff: --- include/vki/vki-scnums-riscv64-linux.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/vki/vki-scnums-riscv64-linux.h b/include/vki/vki-scnums-riscv64-linux.h index 6130ce37f1..d630a19161 100644 --- a/include/vki/vki-scnums-riscv64-linux.h +++ b/include/vki/vki-scnums-riscv64-linux.h @@ -254,6 +254,8 @@ #define __NR_execve 221 #define __NR3264_mmap 222 #define __NR3264_fadvise64 223 +#define __NR_swapon 224 +#define __NR_swapoff 225 #define __NR_mprotect 226 #define __NR_msync 227 #define __NR_mlock 228 |
|
From: Martin C. <mc...@so...> - 2025-10-10 07:32:14
|
https://sourceware.org/cgit/valgrind/commit/?id=c3f8f3ceb4ba6942993762f82911a670fa128789 commit c3f8f3ceb4ba6942993762f82911a670fa128789 Author: Martin Cermak <mc...@re...> Date: Wed Oct 8 10:07:30 2025 +0200 Wrap swapon and swapoff syscalls on non-mips arches. Drop the mips-specific syswraps for swapon and swapoff syscalls. Instead, wrap these syscalls on all the arches. https://bugs.kde.org/show_bug.cgi?id=368791 Diff: --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 3 +++ coregrind/m_syswrap/syswrap-amd64-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-arm-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-arm64-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-linux.c | 13 +++++++++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-mips64-linux.c | 18 ++---------------- coregrind/m_syswrap/syswrap-nanomips-linux.c | 18 ++---------------- coregrind/m_syswrap/syswrap-ppc32-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-ppc64-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-riscv64-linux.c | 2 ++ coregrind/m_syswrap/syswrap-s390x-linux.c | 4 ++-- coregrind/m_syswrap/syswrap-x86-linux.c | 4 ++-- 14 files changed, 39 insertions(+), 48 deletions(-) diff --git a/NEWS b/NEWS index ca3f9fca4a..b097e3789f 100644 --- a/NEWS +++ b/NEWS @@ -72,6 +72,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 309554 Wrap syscall remap_file_pages (216) 331311 Valgrind shows open files in /proc/self/fd that don't work for the process 338803 Handling of dwz debug alt files or cross-CU is broken +368791 Handle swapon and swapoff syscalls as linux generic 369030 Wrap linux syscall: 171 (setdomainname) 388526 Inconsistent severity in message text: "WARNING: Serious error" 418756 MAP_FIXED_NOREPLACE mmap flag unsupported diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 53aa1b582d..ca462e896f 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -288,6 +288,9 @@ DECL_TEMPLATE(linux, sys_init_module); DECL_TEMPLATE(linux, sys_finit_module); DECL_TEMPLATE(linux, sys_delete_module); +DECL_TEMPLATE(linux, sys_swapon); +DECL_TEMPLATE(linux, sys_swapoff); + // Linux-specific (oprofile-related) DECL_TEMPLATE(linux, sys_lookup_dcookie); // (*/32/64) L diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 4a3bad55f4..838bf5e848 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -670,8 +670,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_mount, sys_mount), // 165 LINX_(__NR_umount2, sys_umount), // 166 - // (__NR_swapon, sys_swapon), // 167 - // (__NR_swapoff, sys_swapoff), // 168 + LINX_(__NR_swapon, sys_swapon), // 167 + LINX_(__NR_swapoff, sys_swapoff), // 168 // (__NR_reboot, sys_reboot), // 169 GENX_(__NR_sethostname, sys_sethostname), // 170 diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index f55ed05e61..1fda7ba8a0 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -653,7 +653,7 @@ static SyscallTableEntry syscall_main_table[] = { //zz GENXY(__NR_readlink, sys_readlink), // 85 //zz // (__NR_uselib, sys_uselib), // 86 */Linux -//zz // (__NR_swapon, sys_swapon), // 87 */Linux + LINX_(__NR_swapon, sys_swapon), // 87 */Linux //zz // (__NR_reboot, sys_reboot), // 88 */Linux //zz // (__NR_readdir, old_readdir), // 89 -- superseded //zz @@ -687,7 +687,7 @@ static SyscallTableEntry syscall_main_table[] = { // PLAXY(__NR_vm86old, sys_vm86old), // 113 __NR_syscall... weird GENXY(__NR_wait4, sys_wait4), // 114 //zz -//zz // (__NR_swapoff, sys_swapoff), // 115 */Linux + LINX_(__NR_swapoff, sys_swapoff), // 115 */Linux LINXY(__NR_sysinfo, sys_sysinfo), // 116 // _____(__NR_ipc, sys_ipc), // 117 GENX_(__NR_fsync, sys_fsync), // 118 diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index b28b4598c0..175002e6ba 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -772,8 +772,8 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_execve, sys_execve), // 221 PLAX_(__NR_mmap, sys_mmap), // 222 PLAX_(__NR_fadvise64, sys_fadvise64), // 223 - // (__NR_swapon, sys_swapon), // 224 - // (__NR_swapoff, sys_swapoff), // 225 + LINX_(__NR_swapon, sys_swapon), // 224 + LINX_(__NR_swapoff, sys_swapoff), // 225 GENXY(__NR_mprotect, sys_mprotect), // 226 GENX_(__NR_msync, sys_msync), // 227 GENX_(__NR_mlock, sys_mlock), // 228 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index d891ac6daa..1402c3d1f5 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -2133,6 +2133,19 @@ POST(sys_ppoll_time64) ppoll_post_helper (tid, arrghs, status); } +PRE(sys_swapon) +{ + PRINT("sys_swapon ( %#lx, %#lx )", ARG1, ARG2); + PRE_REG_READ2(long, "swapon", const void *, path, int, flags); + PRE_MEM_RASCIIZ( "swapon(path)", ARG1); +} + +PRE(sys_swapoff) +{ + PRINT("sys_swapoff ( %#lx )", ARG1); + PRE_REG_READ1(long, "swapoff", const void *, path); + PRE_MEM_RASCIIZ( "swapoff(path)", ARG1); +} /* --------------------------------------------------------------------- epoll_* wrappers diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index c4d7a66206..4edfe8a703 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -852,7 +852,7 @@ static SyscallTableEntry syscall_main_table[] = { //.. // (__NR_oldlstat, sys_lstat), // 84 GENXY (__NR_readlink, sys_readlink), // 85 //.. // (__NR_uselib, sys_uselib), // 86 - //.. // (__NR_swapon, sys_swapon), // 87 + LINX_ (__NR_swapon, sys_swapon), // 87 //.. // (__NR_reboot, sys_reboot), // 88 //.. // (__NR_readdir, old_readdir), // 89 PLAX_ (__NR_mmap, sys_mmap), // 90 @@ -880,7 +880,7 @@ static SyscallTableEntry syscall_main_table[] = { //.. GENX_(__NR_idle, sys_ni_syscall), // 112 //.. // (__NR_vm86old, sys_vm86old), // 113 GENXY (__NR_wait4, sys_wait4), // 114 - //.. // (__NR_swapoff, sys_swapoff), // 115 + LINX_ (__NR_swapoff, sys_swapoff), // 115 LINXY (__NR_sysinfo, sys_sysinfo), // 116 LINXY (__NR_ipc, sys_ipc), // 117 GENX_ (__NR_fsync, sys_fsync), // 118 diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 45af0a3fd9..4fb6f060e3 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -215,8 +215,6 @@ SysRes sys_set_tls ( ThreadId tid, Addr tlsptr ) file, but that requires even more macro magic. */ DECL_TEMPLATE (mips_linux, sys_set_thread_area); -DECL_TEMPLATE (mips_linux, sys_swapon); -DECL_TEMPLATE (mips_linux, sys_swapoff); DECL_TEMPLATE (mips_linux, sys_sethostname); DECL_TEMPLATE (mips_linux, sys_reboot); DECL_TEMPLATE (mips_linux, sys_cacheflush); @@ -236,18 +234,6 @@ PRE(sys_sched_rr_get_interval) *flags |= SfMayBlock; } -PRE(sys_swapon) -{ - PRINT("sys_swapon ( %#" FMT_REGWORD "x, %#" FMT_REGWORD "x )", ARG1, ARG2); - PRE_REG_READ2(long, "swapon", const void *, path, int, flags); -} - -PRE(sys_swapoff) -{ - PRINT("sys_swapoff ( %#" FMT_REGWORD "x )", ARG1); - PRE_REG_READ1(long, "swapoff", const void *, path); -} - /* Very much MIPS specific */ PRE(sys_cacheflush) { @@ -648,8 +634,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_mount, sys_mount), LINX_ (__NR_mount_setattr, sys_mount_setattr), LINX_ (__NR_umount2, sys_umount), - PLAX_ (__NR_swapon, sys_swapon), - PLAX_ (__NR_swapoff, sys_swapoff), + LINX_ (__NR_swapon, sys_swapon), + LINX_ (__NR_swapoff, sys_swapoff), PLAX_ (__NR_reboot, sys_reboot), PLAX_ (__NR_sethostname, sys_sethostname), LINX_ (__NR_setdomainname, sys_setdomainname), diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index 94e4ce4d43..f1a0b3c593 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -383,8 +383,6 @@ DECL_TEMPLATE (mips_linux, sys_ptrace); DECL_TEMPLATE (mips_linux, sys_unshare); DECL_TEMPLATE (mips_linux, sys_reboot); DECL_TEMPLATE (mips_linux, sys_sethostname); -DECL_TEMPLATE (mips_linux, sys_swapon); -DECL_TEMPLATE (mips_linux, sys_swapoff); PRE(sys_mmap2) { @@ -519,18 +517,6 @@ PRE(sys_sethostname) PRE_REG_READ2 (long, "sethostname", const void *, name, int, len); } -PRE(sys_swapon) -{ - PRINT("sys_swapon ( %#lx, %#lx )", ARG1, ARG2); - PRE_REG_READ2(long, "swapon", const void *, path, int, flags); -} - -PRE(sys_swapoff) -{ - PRINT("sys_swapoff ( %#lx )", ARG1); - PRE_REG_READ1(long, "swapoff", const void *, path); -} - #undef PRE #undef POST @@ -765,8 +751,8 @@ static SyscallTableEntry syscall_main_table[] = { GENX_ (__NR_execve, sys_execve), PLAX_ (__NR_mmap2, sys_mmap2), LINX_ (__NR_fadvise64_64, sys_fadvise64_64), - PLAX_ (__NR_swapon, sys_swapon), - PLAX_ (__NR_swapoff, sys_swapoff), + LINX_ (__NR_swapon, sys_swapon), + LINX_ (__NR_swapoff, sys_swapoff), GENXY (__NR_mprotect, sys_mprotect), GENX_ (__NR_msync, sys_msync), GENX_ (__NR_mlock, sys_mlock), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 8bb0a04f56..b1390f3aba 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -716,7 +716,7 @@ static SyscallTableEntry syscall_table[] = { //.. GENXY(__NR_readlink, sys_readlink), // 85 //.. // (__NR_uselib, sys_uselib), // 86 */Linux -//.. // (__NR_swapon, sys_swapon), // 87 */Linux + LINX_(__NR_swapon, sys_swapon), // 87 */Linux //.. // (__NR_reboot, sys_reboot), // 88 */Linux //.. // (__NR_readdir, old_readdir), // 89 -- superseded @@ -750,7 +750,7 @@ static SyscallTableEntry syscall_table[] = { //.. // (__NR_vm86old, sys_vm86old), // 113 x86/Linux-only GENXY(__NR_wait4, sys_wait4), // 114 //.. -//.. // (__NR_swapoff, sys_swapoff), // 115 */Linux + LINX_(__NR_swapoff, sys_swapoff), // 115 */Linux LINXY(__NR_sysinfo, sys_sysinfo), // 116 LINXY(__NR_ipc, sys_ipc), // 117 GENX_(__NR_fsync, sys_fsync), // 118 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 0f51117289..4a08650846 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -704,7 +704,7 @@ static SyscallTableEntry syscall_table[] = { GENXY(__NR_readlink, sys_readlink), // 85 // _____(__NR_uselib, sys_uselib), // 86 -// _____(__NR_swapon, sys_swapon), // 87 + LINX_(__NR_swapon, sys_swapon), // 87 // _____(__NR_reboot, sys_reboot), // 88 // _____(__NR_readdir, sys_readdir), // 89 @@ -738,7 +738,7 @@ static SyscallTableEntry syscall_table[] = { // _____(__NR_vm86, sys_vm86), // 113 GENXY(__NR_wait4, sys_wait4), // 114 -// _____(__NR_swapoff, sys_swapoff), // 115 + LINX_(__NR_swapoff, sys_swapoff), // 115 LINXY(__NR_sysinfo, sys_sysinfo), // 116 LINXY(__NR_ipc, sys_ipc), // 117 GENX_(__NR_fsync, sys_fsync), // 118 diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index d806b92b8f..5a1ea2553d 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -530,6 +530,8 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_execve, sys_execve), /* 221 */ PLAX_(__NR_mmap, sys_mmap), /* 222 */ GENX_(__NR_fadvise64, sys_ni_syscall), /* 223 */ + LINX_(__NR_swapon, sys_swapon), /* 224 */ + LINX_(__NR_swapoff, sys_swapoff), /* 225 */ GENXY(__NR_mprotect, sys_mprotect), /* 226 */ GENX_(__NR_msync, sys_msync), /* 227 */ GENX_(__NR_mlock, sys_mlock), /* 228 */ diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 643549c64f..acb4aefee8 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -515,7 +515,7 @@ static SyscallTableEntry syscall_table[] = { GENXY(__NR_readlink, sys_readlink), // 85 // ?????(__NR_uselib, ), // 86 -// ?????(__NR_swapon, ), // 87 + LINX_(__NR_swapon, sys_swapon), // 87 // ?????(__NR_reboot, ), // 88 GENX_(89, sys_ni_syscall), /* unimplemented (by the kernel) */ // 89 @@ -549,7 +549,7 @@ static SyscallTableEntry syscall_table[] = { GENX_(113, sys_ni_syscall), /* unimplemented (by the kernel) */ // 113 GENXY(__NR_wait4, sys_wait4), // 114 -// ?????(__NR_swapoff, ), // 115 + LINX_(__NR_swapoff, sys_swapoff), // 115 LINXY(__NR_sysinfo, sys_sysinfo), // 116 LINXY(__NR_ipc, sys_ipc), // 117 GENX_(__NR_fsync, sys_fsync), // 118 diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 42a69cb965..f697a9e19d 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1261,7 +1261,7 @@ static SyscallTableEntry syscall_table[] = { //zz GENXY(__NR_readlink, sys_readlink), // 85 //zz // (__NR_uselib, sys_uselib), // 86 */Linux -//zz // (__NR_swapon, sys_swapon), // 87 */Linux + LINX_(__NR_swapon, sys_swapon), // 87 */Linux //zz // (__NR_reboot, sys_reboot), // 88 */Linux //zz // (__NR_readdir, old_readdir), // 89 -- superseded //zz @@ -1295,7 +1295,7 @@ static SyscallTableEntry syscall_table[] = { PLAXY(__NR_vm86old, sys_vm86old), // 113 x86/Linux-only GENXY(__NR_wait4, sys_wait4), // 114 //zz -//zz // (__NR_swapoff, sys_swapoff), // 115 */Linux + LINX_(__NR_swapoff, sys_swapoff), // 115 */Linux LINXY(__NR_sysinfo, sys_sysinfo), // 116 LINXY(__NR_ipc, sys_ipc), // 117 GENX_(__NR_fsync, sys_fsync), // 118 |
|
From: Martin C. <mc...@so...> - 2025-10-10 07:21:55
|
https://sourceware.org/cgit/valgrind/commit/?id=a04974ddcb51fbb24b1e44b1f9c98d0a11356cca commit a04974ddcb51fbb24b1e44b1f9c98d0a11356cca Author: Martin Cermak <mc...@re...> Date: Thu Oct 2 17:11:50 2025 +0200 Update the LTP version in valgrind testsuite to v20250930 Update the LTP version in valgrind testsuite to v20250930. All patches from auxprogs/ltp-patches were accepted by LTP upstream and included in the release, so these can now be dropped locally. https://bugs.kde.org/show_bug.cgi?id=510169 Diff: --- NEWS | 1 + auxprogs/Makefile.am | 9 +-- ...2-bit-powerpc-syscall-defs-don-t-leak-to-.patch | 41 ------------ .../0002-Introduce-LTP_QUIET-env-var.patch | 73 ---------------------- ...-sure-the-scanf-address-format-is-at-leas.patch | 39 ------------ 5 files changed, 4 insertions(+), 159 deletions(-) diff --git a/NEWS b/NEWS index 7335f05b33..ca3f9fca4a 100644 --- a/NEWS +++ b/NEWS @@ -147,6 +147,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) 509642 Add missing ppc64-linux syswraps 509643 Add missing s390x-linux syswraps +510169 Update the LTP version in valgrind testsuite to 20250930 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 0ce348ef54..d96e7fd0a9 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -20,10 +20,7 @@ LTP_FILTERS = \ filters/prctl10 \ filters/select03 -LTP_PATCHES = \ - ltp-patches/0001-Make-sure-32-bit-powerpc-syscall-defs-don-t-leak-to-.patch \ - ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch \ - ltp-patches/0003-mmap04-Make-sure-the-scanf-address-format-is-at-leas.patch +LTP_PATCHES = EXTRA_DIST = \ docs/valgrind-listener-manpage.xml \ @@ -173,8 +170,8 @@ endif endif # Linux Test Project -LTP_VERSION=20250530 -LTP_SHA256_SUM=27586ba78eac1e40cd422add2842f1ad70f09fea55da3bd6a25e10feb786d4f2 +LTP_VERSION=20250930 +LTP_SHA256_SUM=048fa4d69ddbe8a94aa15da9bdc85713ab07a0abbc3de2b8bdd9757644aef1e4 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) diff --git a/auxprogs/ltp-patches/0001-Make-sure-32-bit-powerpc-syscall-defs-don-t-leak-to-.patch b/auxprogs/ltp-patches/0001-Make-sure-32-bit-powerpc-syscall-defs-don-t-leak-to-.patch deleted file mode 100644 index bd1fb1dd63..0000000000 --- a/auxprogs/ltp-patches/0001-Make-sure-32-bit-powerpc-syscall-defs-don-t-leak-to-.patch +++ /dev/null @@ -1,41 +0,0 @@ -From a90b2aac69028bd6b9e0fcc1e36760639b937b99 Mon Sep 17 00:00:00 2001 -From: Martin Cermak <mc...@re...> -Date: Mon, 4 Aug 2025 21:46:52 +0200 -Subject: [PATCH] Make sure 32-bit powerpc syscall defs don't leak to 64-bit - powerpc systems - -generate_syscalls.sh generates the syscalls.h header at the configure -time. At the moment, that header has a set of 32-bit syscalls defined -with the __powerpc__ gate, plus another set of 64-bit syscalls defined -with the __powerpc64__ gate. For 32-bit powerpc systems that's fine. -But for a 64-bit powerpc system this means that both sets of syscalls -become defined, which isn't right. - -Thing is that on a 64-bit powerpc system, both __powerpc__ and -__powerpc64__ are defined compiler macros, while on a 32-bit powerpc -system, only the former is defined while the latter is not. - -That said, the correct gate for a 32-bit only powerpc code is: - #if defined(__powerpc__) && !defined(__powerpc64__) - -Without this patch, e.g. __NR_clock_gettime64 def leaks to -64-bit powerpc systems, which is wrong. This patch fixes it. ---- - include/lapi/syscalls/generate_syscalls.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/lapi/syscalls/generate_syscalls.sh b/include/lapi/syscalls/generate_syscalls.sh -index b17c72ddf..19f280dfb 100755 ---- a/include/lapi/syscalls/generate_syscalls.sh -+++ b/include/lapi/syscalls/generate_syscalls.sh -@@ -78,6 +78,7 @@ while IFS= read -r arch; do - parisc) echo "#ifdef __hppa__" ;; - loongarch64) echo "#ifdef __loongarch__" ;; - arm64) echo "#ifdef __aarch64__" ;; -+ powerpc) echo "#if defined(__powerpc__) && !defined(__powerpc64__)" ;; - *) echo "#ifdef __${arch}__" ;; - esac - --- -2.48.1 - diff --git a/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch b/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch deleted file mode 100644 index a77162bfca..0000000000 --- a/auxprogs/ltp-patches/0002-Introduce-LTP_QUIET-env-var.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 183df3240f8e7ca38fbe2fd472c31c9417ae7eb2 Mon Sep 17 00:00:00 2001 -From: Martin Cermak <mc...@re...> -Date: Tue, 16 Sep 2025 15:46:40 +0200 -Subject: [PATCH] Introduce LTP_QUIET env var - -Introduce LTP_QUIET env variable. When set to 1 or y, it will -suppress printing TCONF, TWARN, TINFO, and TDEBUG messages. ---- - lib/tst_test.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/lib/tst_test.c b/lib/tst_test.c -index 92872cc89..609a7b075 100644 ---- a/lib/tst_test.c -+++ b/lib/tst_test.c -@@ -68,6 +68,7 @@ static int iterations = 1; - static float duration = -1; - static float timeout_mul = -1; - static int reproducible_output; -+static int quiet_output; - - struct context { - int32_t lib_pid; -@@ -307,15 +308,19 @@ static void print_result(const char *file, const int lineno, int ttype, - res = "TBROK"; - break; - case TCONF: -+ if (quiet_output) return; - res = "TCONF"; - break; - case TWARN: -+ if (quiet_output) return; - res = "TWARN"; - break; - case TINFO: -+ if (quiet_output) return; - res = "TINFO"; - break; - case TDEBUG: -+ if (quiet_output) return; - res = "TDEBUG"; - break; - default: -@@ -670,6 +675,7 @@ static void print_help(void) - fprintf(stderr, "LTP_DEV_FS_TYPE Filesystem used for testing (default: %s)\n", DEFAULT_FS_TYPE); - fprintf(stderr, "LTP_ENABLE_DEBUG Print debug messages (set 1 or y)\n"); - fprintf(stderr, "LTP_REPRODUCIBLE_OUTPUT Values 1 or y discard the actual content of the messages printed by the test\n"); -+ fprintf(stderr, "LTP_QUIET Values 1 or y will suppress printing TCONF, TWARN, TINFO, and TDEBUG messages\n"); - fprintf(stderr, "LTP_SINGLE_FS_TYPE Specifies filesystem instead all supported (for .all_filesystems)\n"); - fprintf(stderr, "LTP_FORCE_SINGLE_FS_TYPE Testing only. The same as LTP_SINGLE_FS_TYPE but ignores test skiplist.\n"); - fprintf(stderr, "LTP_TIMEOUT_MUL Timeout multiplier (must be a number >=1)\n"); -@@ -1361,6 +1367,7 @@ static void do_setup(int argc, char *argv[]) - { - char *tdebug_env = getenv("LTP_ENABLE_DEBUG"); - char *reproducible_env = getenv("LTP_REPRODUCIBLE_OUTPUT"); -+ char *quiet_env = getenv("LTP_QUIET"); - - if (!tst_test) - tst_brk(TBROK, "No tests to run"); -@@ -1391,6 +1398,10 @@ static void do_setup(int argc, char *argv[]) - (!strcmp(reproducible_env, "1") || !strcmp(reproducible_env, "y"))) - reproducible_output = 1; - -+ if (quiet_env && -+ (!strcmp(quiet_env, "1") || !strcmp(quiet_env, "y"))) -+ quiet_output = 1; -+ - assert_test_fn(); - - TCID = tcid = get_tcid(argv); --- -2.48.1 - diff --git a/auxprogs/ltp-patches/0003-mmap04-Make-sure-the-scanf-address-format-is-at-leas.patch b/auxprogs/ltp-patches/0003-mmap04-Make-sure-the-scanf-address-format-is-at-leas.patch deleted file mode 100644 index 7956999b33..0000000000 --- a/auxprogs/ltp-patches/0003-mmap04-Make-sure-the-scanf-address-format-is-at-leas.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6c3a6a6f625b58e8dc611cc12bc6015dc8dd5b32 Mon Sep 17 00:00:00 2001 -From: Mark Wielaard <ma...@kl...> -Date: Thu, 18 Sep 2025 17:16:05 +0200 -Subject: [PATCH] mmap04: Make sure the scanf address format is at least 8 hex - chars - -The addresses in /proc/self/maps are at least 8 hex chars. Zeros are -added to the front of the address when shorter (both on 32bit and -64bit systems). - -Under valgrind the mmaps used in kernel/syscalls/mmap/mmap04.c come -out very low in the address space and might be shorter than 8 hex -chars. This causes the scanf to fail: -mmap04.c:62: TBROK: Expected 1 conversions got 0 FILE '/proc/self/maps' - -Fix this by using "%08" PRIxPTR when creating the fmt used. - -Signed-off-by: Mark Wielaard <ma...@kl...> ---- - testcases/kernel/syscalls/mmap/mmap04.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/mmap/mmap04.c b/testcases/kernel/syscalls/mmap/mmap04.c -index 4a050b7b50da..5b28180df29b 100644 ---- a/testcases/kernel/syscalls/mmap/mmap04.c -+++ b/testcases/kernel/syscalls/mmap/mmap04.c -@@ -58,7 +58,8 @@ static void run(unsigned int i) - - addr2 = SAFE_MMAP(addr1 + pagesize, pagesize, tc->prot, tc->flags | MAP_FIXED, -1, 0); - -- sprintf(fmt, "%" PRIxPTR "-%%*x %%s", (uintptr_t)addr2); -+ /* A /proc/self/maps address is at least 8 hex (left zero padded) */ -+ sprintf(fmt, "%08" PRIxPTR "-%%*x %%s", (uintptr_t)addr2); - SAFE_FILE_LINES_SCANF("/proc/self/maps", fmt, perms); - - if (!strcmp(perms, tc->exp_perms)) { --- -2.51.0 - |
|
From: Mark W. <ma...@kl...> - 2025-10-09 20:03:17
|
Hi Valgrind hackers, Normally we do a major releases in April and October. We did do a minor 3.25.1 release in May. And the VALGRIND_3_25_BRANCH does contain a couple more backported fixes. But the main branch has 350+ more commits so it is time to prepare for a new major release. I am proposing to do a release on Friday October 24. With an RC1 a week before, Friday October 17. And possibly an RC2 in between if we find some big issue for which we like more testing. There are a couple of things I like to add before RC1: - Update to GPLv3+. We discussed this on the list and then with some core developers asking for advice from the FSF Legal and Compliance team. I'll post a patch tomorrow with the full rational, so we can discuss it before applying for RC1. - Don't warn about fcntl F_GETFD with --track-fds https://bugs.kde.org/show_bug.cgi?id=510436 --track-fds=bad is great, but Paul correctly pointed out that there has to be a way for an application to explicitly check for bad fds that doesn't generate an error. - Removing glibc extra syscall frames might crash https://bugs.kde.org/show_bug.cgi?id=507188 This seems to only happen on i386 debian, but it a generic issue with syscall frame filtering. And if I have time I also like to finish the removal of artificial frames from the backtraces. There is already support for tracking these artificial frams since commit f7dccaab11b8 "Rewrite DWARF inlined subroutine handling to work cross CU". But they aren't yet filtered. - On Fedora 43 (beta) for amd64 we get some make regtest failures I haven't really investigated yet, but on f42 we get zero failures, so it would be nice to see what updates caused the new failures. Please let me know what you believe are blockers for the release or fixes you really would like to see in. Thanks, Mark |
|
From: Andreas A. <ar...@so...> - 2025-10-09 11:49:37
|
https://sourceware.org/cgit/valgrind/commit/?id=32fcdbfafd623569df800d2a1fa351c11f10a128 commit 32fcdbfafd623569df800d2a1fa351c11f10a128 Author: Andreas Arnez <ar...@li...> Date: Thu Oct 9 13:42:39 2025 +0200 s390x: Make IBM z17 known to Valgrind Make the IBM z17 machine model 9175 known to Valgrind. Also add the expected output of the s390x-specific "ecag" test case on an IBM z17, so the test case succeeds on that system. Diff: --- VEX/pub/libvex.h | 3 ++- coregrind/m_machine.c | 1 + none/tests/s390x/Makefile.am | 2 +- none/tests/s390x/ecag.stdout.exp-z17 | 21 +++++++++++++++++++++ tests/s390x_features.c | 1 + 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index e580160d30..bfa94d033f 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -158,7 +158,8 @@ typedef #define VEX_S390X_MODEL_Z14_ZR1 15 #define VEX_S390X_MODEL_Z15 16 #define VEX_S390X_MODEL_Z16 17 -#define VEX_S390X_MODEL_UNKNOWN 18 /* always last in list */ +#define VEX_S390X_MODEL_Z17 18 +#define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F #define VEX_HWCAPS_S390X_LDISP (1<<6) /* Long-displacement facility */ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index eaa18b0b61..bba498f989 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -624,6 +624,7 @@ static UInt VG_(get_machine_model)(void) { "8562", VEX_S390X_MODEL_Z15 }, { "3931", VEX_S390X_MODEL_Z16 }, { "3932", VEX_S390X_MODEL_Z16 }, + { "9175", VEX_S390X_MODEL_Z17 }, }; Int model, n, fh; diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 22b8128bba..dda923acc6 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -48,7 +48,7 @@ EXTRA_DIST = \ bfp-XxC.vgtest bfp-XxC.stderr.exp bfp-XxC.post.exp \ ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ - ecag.stdout.exp-z16 \ + ecag.stdout.exp-z16 ecag.stdout.exp-z17 \ op00.stderr.exp op00.vgtest \ dfp-XxC.vgtest dfp-XxC.stderr.exp dfp-XxC.post.exp \ dfp-XiC.vgtest dfp-XiC.stderr.exp dfp-XiC.post.exp \ diff --git a/none/tests/s390x/ecag.stdout.exp-z17 b/none/tests/s390x/ecag.stdout.exp-z17 new file mode 100644 index 0000000000..4708b2a835 --- /dev/null +++ b/none/tests/s390x/ecag.stdout.exp-z17 @@ -0,0 +1,21 @@ +L1 topology: separate data and instruction; private +L1 cache line size data: 256 +L1 cache line size insn: 256 +L1 total cachesize data: 131072 +L1 total cachesize insn: 131072 +L1 set. assoc. data: 8 +L1 set. assoc. insn: 8 +L2 topology: unified data and instruction; private +L2 cache line size data: 256 +L2 cache line size insn: 256 +L2 total cachesize data: 37748736 +L2 total cachesize insn: 37748736 +L2 set. assoc. data: 18 +L2 set. assoc. insn: 18 +L3 topology: unified data and instruction; shared +L3 cache line size data: 256 +L3 cache line size insn: 256 +L3 total cachesize data: 377487360 +L3 total cachesize insn: 377487360 +L3 set. assoc. data: 180 +L3 set. assoc. insn: 180 diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 507f3ab2f8..e0d4de76ce 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -120,6 +120,7 @@ model_info models[] = { { "8562", "z15" }, { "3931", "z16" }, { "3932", "z16" }, + { "9175", "z17" }, }; |
|
From: Florian K. <fk...@so...> - 2025-10-07 12:41:09
|
https://sourceware.org/cgit/valgrind/commit/?id=0329ab2021727242f31adfd665f602a8a6163aa8 commit 0329ab2021727242f31adfd665f602a8a6163aa8 Author: Florian Krohm <fl...@ei...> Date: Tue Oct 7 12:39:38 2025 +0000 Document that --vex-guest-chase=not ought to be used when doing IR injection. Fixes https://bugs.kde.org/show_bug.cgi?id=506453 Diff: --- NEWS | 1 + VEX/priv/ir_inject.c | 4 ++++ memcheck/tests/vbit-test/vbit-test-sec.vgtest | 2 +- memcheck/tests/vbit-test/vbit-test.vgtest | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index bdf175eac8..7335f05b33 100644 --- a/NEWS +++ b/NEWS @@ -987,6 +987,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 451843 valgrind fails to start on a FreeBSD system which enforces W^X 495483 Control building documentation via BUILD_DOCS 506211 Constant folding improvements +506453 Unexpected behaviour with IR injection and vex-guest-chase=yes 509157 riscv64: Shift instructions can behave wrong To see details of a given bug, visit diff --git a/VEX/priv/ir_inject.c b/VEX/priv/ir_inject.c index 04228538f1..b447f6e946 100644 --- a/VEX/priv/ir_inject.c +++ b/VEX/priv/ir_inject.c @@ -27,6 +27,10 @@ The GNU General Public License is contained in the file COPYING. */ +/* !!! When running valgrind on applications that use IR injection + !!! --vex-guest-chase=no should be given on the command line. This + !!! avoids that vex_inject_ir is called speculatively. +*/ #include "libvex_basictypes.h" #include "libvex_ir.h" #include "libvex.h" diff --git a/memcheck/tests/vbit-test/vbit-test-sec.vgtest b/memcheck/tests/vbit-test/vbit-test-sec.vgtest index 2d3c9389da..8d84e7e90b 100644 --- a/memcheck/tests/vbit-test/vbit-test-sec.vgtest +++ b/memcheck/tests/vbit-test/vbit-test-sec.vgtest @@ -1,3 +1,3 @@ prog: vbit-test-sec prereq: test -x vbit-test-sec -vgopts: -q --expensive-definedness-checks=yes +vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no diff --git a/memcheck/tests/vbit-test/vbit-test.vgtest b/memcheck/tests/vbit-test/vbit-test.vgtest index a05890566b..198c62351c 100644 --- a/memcheck/tests/vbit-test/vbit-test.vgtest +++ b/memcheck/tests/vbit-test/vbit-test.vgtest @@ -1,2 +1,2 @@ prog: vbit-test -vgopts: -q --expensive-definedness-checks=yes +vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no |
|
From: Paul F. <pa...@so...> - 2025-10-06 07:01:52
|
https://sourceware.org/cgit/valgrind/commit/?id=e55d0db975c69f0f4c0feae78d64fc8a7196351f commit e55d0db975c69f0f4c0feae78d64fc8a7196351f Author: Paul Floyd <pj...@wa...> Date: Sun Sep 28 03:39:45 2025 +0000 FreeBSD regtest: update setcred expected from arm64 Still have an unexpected extra error on amd64 Diff: --- memcheck/tests/freebsd/setcred.stderr.exp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/memcheck/tests/freebsd/setcred.stderr.exp b/memcheck/tests/freebsd/setcred.stderr.exp index 629ceacf84..8766361c09 100644 --- a/memcheck/tests/freebsd/setcred.stderr.exp +++ b/memcheck/tests/freebsd/setcred.stderr.exp @@ -1,29 +1,37 @@ Syscall param setcred(wcred) points to unaddressable byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:23) + by 0x........: main (setcred.cpp:28) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param setcred(flags) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:26) + by 0x........: main (setcred.cpp:33) Syscall param setcred(wcred) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:26) + by 0x........: main (setcred.cpp:33) Syscall param setcred(size) contains uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:26) + by 0x........: main (setcred.cpp:33) Syscall param setcred(wcred) points to unaddressable byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:26) + by 0x........: main (setcred.cpp:33) Address 0x........ is not stack'd, malloc'd or (recently) free'd +Syscall param setcred(flags) contains uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:38) + +Syscall param setcred(size) contains uninitialised byte(s) + at 0x........: setcred (in /...libc...) + by 0x........: main (setcred.cpp:43) + Syscall param setcred(wcred) points to uninitialised byte(s) at 0x........: setcred (in /...libc...) - by 0x........: main (setcred.cpp:31) + by 0x........: main (setcred.cpp:50) Address 0x........ is 0 bytes inside a block of size 48 alloc'd at 0x........: ...operator new... (vg_replace_malloc.c:...) - by 0x........: main (setcred.cpp:28) + by 0x........: main (setcred.cpp:47) |
|
From: Paul F. <pa...@so...> - 2025-10-06 06:56:55
|
https://sourceware.org/cgit/valgrind/commit/?id=ea1ec47ce1a8f29bf01412869b6a07e5ee6a2976 commit ea1ec47ce1a8f29bf01412869b6a07e5ee6a2976 Author: Paul Floyd <pj...@wa...> Date: Mon Oct 6 10:55:34 2025 +0200 FreeBSD setcred syscall: use arg3 for size Not really our job to check that thwe size is right. Also revamp the secred testcase. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 2 +- memcheck/tests/freebsd/setcred.cpp | 33 +++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index eb8a160586..2c3bffa1c2 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -7154,7 +7154,7 @@ PRE(sys_setcred) { PRINT("sys_setcred(%" FMT_REGWORD "u, %#" FMT_REGWORD "x, %" FMT_REGWORD "u)", ARG1, ARG2, ARG3); PRE_REG_READ3(int, "setcred", u_int, flags, const struct setcred*, wcred, size_t, size); - PRE_MEM_READ("setcred(wcred)", ARG2, sizeof(struct vki_setcred)); + PRE_MEM_READ("setcred(wcred)", ARG2, ARG3); } // SYS_exterrctl 592 diff --git a/memcheck/tests/freebsd/setcred.cpp b/memcheck/tests/freebsd/setcred.cpp index 464de08efe..619d1959f1 100644 --- a/memcheck/tests/freebsd/setcred.cpp +++ b/memcheck/tests/freebsd/setcred.cpp @@ -1,6 +1,8 @@ #include <sys/ucred.h> #include <cstring> #include <cstdlib> +#include <cerrno> +#include <cassert> static long x0; @@ -10,25 +12,44 @@ int main() x0 = px[0]; struct setcred cred1; struct setcred* cred2; - int flags1{0}; - int flags2; + int flags1{SETCREDF_RUID}; + int flags2{SETCREDF_SUPP_GROUPS}; size_t size1{sizeof(cred1)}; + int ret; std::memset(&cred1, 250, sizeof(cred1)); // needs to be root to work correctly - setcred(flags1, &cred1, size1); + ret = setcred(flags1, &cred1, size1); + assert(ret == -1); + assert(errno == EPERM); // not accessible - setcred(flags1, nullptr, size1); + ret = setcred(flags1, nullptr, size1); + assert(ret == -1); + assert(errno == EFAULT); // uninit - setcred(flags2, (struct setcred*)x0, size1+x0); + ret = setcred(flags2+x0, (struct setcred*)x0, size1+x0); + assert(ret == -1); + assert(errno == EFAULT); + + // invalid flags + ret = setcred(9999+x0, &cred1, sizeof(cred1)); + assert(ret == -1); + assert(errno == EINVAL); + + // invalid size + ret = setcred(flags1, &cred1, 3+x0); + assert(ret == -1); + assert(errno == EINVAL); cred2 = new struct setcred; // uninit memory - setcred(flags1, cred2, size1); + ret = setcred(flags1, cred2, size1); + assert(ret == -1); + assert(errno == EPERM); delete cred2; free(px); |
|
From: Paul F. <pa...@so...> - 2025-10-06 05:32:25
|
https://sourceware.org/cgit/valgrind/commit/?id=c6092d4230fd2533374555213632e77b95a33a5d commit c6092d4230fd2533374555213632e77b95a33a5d Author: Paul Floyd <pj...@wa...> Date: Sun Sep 28 02:11:58 2025 +0000 FreeBSD vgdb: ensure stack is 16byte aligned for invoker I haven't seen any issues but there's no harm in being certain. Diff: --- coregrind/vgdb-invoker-freebsd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/coregrind/vgdb-invoker-freebsd.c b/coregrind/vgdb-invoker-freebsd.c index 607e059919..4a89fb37dd 100644 --- a/coregrind/vgdb-invoker-freebsd.c +++ b/coregrind/vgdb-invoker-freebsd.c @@ -561,6 +561,7 @@ Bool invoker_invoke_gdbserver (pid_t pid) reg_mod.r_rip = shared64->invoke_gdbserver; #elif defined(VGA_arm64) reg_mod.x[0] = check; + sp &= ~0xf; // keep the stack aligned on 16 bytes ... reg_mod.sp = sp; reg_mod.elr = shared64->invoke_gdbserver; /* put NULL return address in Link Register */ |
|
From: Paul F. <pa...@so...> - 2025-10-03 18:58:34
|
https://sourceware.org/cgit/valgrind/commit/?id=3bcda36cf8f02c87ff900a0e06984b7e46a34e4f commit 3bcda36cf8f02c87ff900a0e06984b7e46a34e4f Author: Paul Floyd <pj...@wa...> Date: Fri Oct 3 20:54:15 2025 +0200 getdents* syswrap: only check proc fd/fdinfo on Linux and Solaris Keep check for __NR_getdents and use a check for __NR_getdents64 Diff: --- coregrind/m_syswrap/syswrap-generic.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 296ebdd910..0d13cea5e9 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3994,7 +3994,7 @@ PRE(sys_getdents) PRE_MEM_WRITE( "getdents(dirp)", ARG2, ARG3 ); } -#if !defined(VGO_freebsd) // Darwin as well? +#if defined(VGO_linux) || defined(VGO_solaris) /* Check if the given file descriptor points to a /proc/PID/fd or /proc/PID/fdinfo directory. Returns True if it's a directory we should filter Valgrind FDs from. */ @@ -4049,7 +4049,7 @@ static Bool should_keep_fd_entry(const HChar *name) /* Make sure we really need the proc filtering using (32bit) getdents, which not every linux arch implements. */ -#if defined(VGO_linux) && defined(__NR_getdents) +#if defined(__NR_getdents) /* Filter and compact dirent entries */ static SizeT filter_dirent_entries(struct vki_dirent *dirp, SizeT orig_size) @@ -4073,7 +4073,7 @@ static SizeT filter_dirent_entries(struct vki_dirent *dirp, SizeT orig_size) return new_size; } -#endif /* defined(VGO_linux) && defined(__NR_getdents) */ +#endif /* defined(__NR_getdents) */ /* Filter and compact dirent64 entries */ static SizeT filter_dirent64_entries(struct vki_dirent64 *dirp, SizeT orig_size) @@ -4098,11 +4098,9 @@ static SizeT filter_dirent64_entries(struct vki_dirent64 *dirp, SizeT orig_size) return new_size; } -#endif - /* Make sure we really need the proc filtering using (32bit) getdents, which not every linux arch implements. */ -#if defined(VGO_linux) && defined(__NR_getdents) +#if defined(__NR_getdents) /* Filter out Valgrind's internal file descriptors from getdents results with refill capability. When entries are filtered out, attempts to read more entries to avoid empty results. @@ -4132,9 +4130,7 @@ static SizeT filter_valgrind_fds_from_getdents_with_refill(Int fd, struct vki_di return new_size; } -#endif /* defined(VGO_linux) && defined(__NR_getdents) */ - -#if !defined(VGO_freebsd) // Darwin as well? +#endif /* defined(__NR_getdents) */ /* Filter out Valgrind's internal file descriptors from getdents64 results with refill capability. Same logic as getdents version but for 64-bit dirent structures. @@ -4165,7 +4161,7 @@ static SizeT filter_valgrind_fds_from_getdents64_with_refill(Int fd, struct vki_ return new_size; } -#endif +#endif /* defined(VGO_linux) || defined(VGO_solaris) */ POST(sys_getdents) { @@ -4175,7 +4171,7 @@ POST(sys_getdents) /* Make sure we really need the proc filtering using (32bit) getdents, which not every linux arch implements. */ -#if defined(VGO_linux) && defined(__NR_getdents) +#if (defined(VGO_linux) || defined(VGO_solaris)) && defined(__NR_getdents) /* Only filter Valgrind FDs when listing /proc/PID/fd or /proc/PID/fdinfo directories */ if (is_proc_fd_directory(ARG1)) { @@ -4188,13 +4184,13 @@ POST(sys_getdents) if (result_size != RES) SET_STATUS_Success(result_size); } -#endif /* defined(VGO_linux) && defined(__NR_getdents) */ +#endif /* (defined(VGO_linux) || defined(VGO_solaris)) && defined(__NR_getdents) */ POST_MEM_WRITE( ARG2, result_size ); } } -#if !defined(VGO_freebsd) +#if defined(__NR_getdents64) PRE(sys_getdents64) { @@ -4229,7 +4225,7 @@ POST(sys_getdents64) } } -#endif +#endif /* defined(__NR_getdents64) */ PRE(sys_getgroups) { |
|
From: Florian K. <fk...@so...> - 2025-10-03 16:33:25
|
https://sourceware.org/cgit/valgrind/commit/?id=c0e022d1a8a973c4872f497b79ccb8e0a51adae9 commit c0e022d1a8a973c4872f497b79ccb8e0a51adae9 Author: Florian Krohm <fl...@ei...> Date: Fri Oct 3 16:31:59 2025 +0000 Add BZ 495483 to NEWS. Darn I keep forgetting this.... Diff: --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index e4722a7293..bdf175eac8 100644 --- a/NEWS +++ b/NEWS @@ -985,6 +985,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 451626 Syscall param bpf(attr->raw_tracepoint.name) points to unaddressable byte(s) 451827 [ppc64le] VEX temporary storage exhausted with several vbpermq instructions 451843 valgrind fails to start on a FreeBSD system which enforces W^X +495483 Control building documentation via BUILD_DOCS 506211 Constant folding improvements 509157 riscv64: Shift instructions can behave wrong |
|
From: Florian K. <fk...@so...> - 2025-10-03 16:29:29
|
https://sourceware.org/cgit/valgrind/commit/?id=9c0c0e41d8b72825606da0db897a419c59658a56 commit 9c0c0e41d8b72825606da0db897a419c59658a56 Author: Florian Krohm <fl...@ei...> Date: Fri Oct 3 16:26:55 2025 +0000 Control building documentation (BZ 495483) Introduce Makefile variable BUILD_DOCS with these possible values: none - does not build any documentation all - builds all documentation html - builds HTML docs but skips building PDFs BUILD_ALL_DOCS is still recognised for backward compatibility and is mapped to BUILD_DOCS like so: If not specified --> BUILD_DOCS=all BUILD_ALL_DOCS=yes --> BUILD_DOCS=all BUILD_ALL_DOCS=no --> BUILD_DOCS=html README_DEVELOPERS adjusted. Fixes https://bugs.kde.org/show_bug.cgi?id=495483 Diff: --- README_DEVELOPERS | 2 +- docs/Makefile.am | 35 ++++++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/README_DEVELOPERS b/README_DEVELOPERS index 22e229bd49..5d9fb823f9 100644 --- a/README_DEVELOPERS +++ b/README_DEVELOPERS @@ -37,7 +37,7 @@ will also attempt to build the documentation. If you only want to test whether the generated tarball is complete and runs regression tests successfully, building documentation is not needed. - make dist BUILD_ALL_DOCS=no + make dist BUILD_DOCS=none If you insist on building documentation some embarrassing instructions can be found in docs/README. diff --git a/docs/Makefile.am b/docs/Makefile.am index 8672e8dd21..7e5ed389c5 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -4,10 +4,26 @@ ## tools to do so is impractical / too difficult ##------------------------------------------------------------- -# Comment out the next line to skip building print docs. The default -# is not to skip building print docs. Note, after changing it -# you need to re-run autogen.sh and configure to make it take effect. -BUILD_ALL_DOCS=yes +# Building documentation is a pain. It takes longish and requires certain +# tools you may not have installed. +# The variable BUILD_DOCS allows you to control what documentation gets +# built: +# +# BUILD_DOCS=all builds all documentation +# BUILD_DOCS=html builds HTML docs but skips building PDFs +# BUILD_DOCS=none does not build any documentation +# +# Use it on the command line. E.g.: make dist BUILD_DOCS=none +# +ifndef BUILD_ALL_DOCS + BUILD_DOCS ?= all + else + ifeq "$(BUILD_ALL_DOCS)" "yes" + BUILD_DOCS ?= all + else + BUILD_DOCS ?= html + endif + endif # Whether to run xmlto pdf --with-fop # This is de fault, set to empty to use the default fo to pdf @@ -281,7 +297,7 @@ install-data-hook: cp $$f $(DESTDIR)$(mandir)/man1; \ fi \ done - ifeq ($(BUILD_ALL_DOCS),yes) + ifeq ($(BUILD_DOCS),all) set -e; \ if test -r index.pdf ; then \ mkdir -p $(DESTDIR)$(datadir)/doc/valgrind; \ @@ -297,18 +313,23 @@ install-data-hook: # This is done at 'make dist' time. It builds the html docs, print # docs and man pages and copies them into the docs/ directory in the # tarball. - ifeq ($(BUILD_ALL_DOCS),yes) + ifeq ($(BUILD_DOCS),none) +dist-hook: + + else + ifeq ($(BUILD_DOCS),all) dist-hook: FAQ.txt html-docs man-pages print-docs cp -r html $(distdir) cp FAQ.txt $(distdir)/.. cp *.1 $(distdir) cp print/index.pdf $(distdir) cp print/index.ps $(distdir) - else + else dist-hook: FAQ.txt html-docs man-pages cp -r html $(distdir) cp FAQ.txt $(distdir)/.. cp *.1 $(distdir) + endif endif distclean-local: |
|
From: Florian K. <fl...@ei...> - 2025-10-03 16:29:17
|
Hi Mark,
thanks for taking the time.
On 02.10.25 22:53, Mark Wielaard wrote:
>
> That looks nice (I do have a wording nitpick, but feel free to ignore
> if you feel no-print is more clear than html).
Agreed.
> I wouldn't integrate the make dist with the post-regtest-checks
> though. It wouldn't have caught the issue because it only generates
> the tar ball. make distcheck would have caught it, but I think that
> make distcheck should be a separate step/check (it does multiple
> builds and takes a long time even with BUILD_DOCS=none).
True enough. I am going to check this in with your suggested changes.
Florian
|
|
From: Paul F. <pj...@wa...> - 2025-10-03 12:00:34
|
On 10/3/25 08:36, Paul Floyd via Valgrind-developers wrote: > > > Neither FreeBSD nor macOS have dirent64/getdents64. Furthemore neither > has /proc and so they don't need any fd filtering. FreeBSD does have > freebsd11_dirent/freebsd11_getdents (which is also the kernel > interface) just to confuse matters slightly. > > I'm trying to work out what illumos and Solaris have. Certainly they > have /proc and also need fd filtering. illumos has dirent (native), > dirent32 (x86) and dirent64 (kernel amd64 and x86 > _LARGEFILE64_SOURCE). illumos headers have syscall numbers for > getdents and getdents64 but getdents64 seems to produce a SIGSYS. I'll > see what Solaris 11.4 does and try to work out why illumos has > getdents64 in the headers. > On Illumos, I see 3 combinations amd64 -> getdents uses syscall 81 SYS_getdents x86 -> getdents uses syscall 81 again x86 largefile -> getdents uses syscall 213 SYS_getdents64 I guess Solaris 11.4 is the same, but for amd64 only. A+ Paul |
|
From: Paul F. <pj...@wa...> - 2025-10-03 06:36:18
|
On 10/2/25 22:57, Mark Wielaard wrote: > Hi, > > On Thu, Oct 02, 2025 at 09:30:11AM -0700, Bart Van Assche via Valgrind-developers wrote: >> On 10/1/25 10:48 PM, Paul Floyd wrote: >>> +#if !defined(VGO_freebsd) // Darwin as well? >> Isn't adding this type of #ifdefs a software anti-pattern? Please >> consider adding a configure test for dirent64() and getdent64() and to >> test the appropriate HAVE_* macro here. > Note that the other checks for this feature use: > > #if defined(VGO_linux) && defined(__NR_getdents) > > It would be good to use the same guards everywhere. > > Were these guards placed wrongly? What was the actual build failure on > freebsd? Neither FreeBSD nor macOS have dirent64/getdents64. Furthemore neither has /proc and so they don't need any fd filtering. FreeBSD does have freebsd11_dirent/freebsd11_getdents (which is also the kernel interface) just to confuse matters slightly. I'm trying to work out what illumos and Solaris have. Certainly they have /proc and also need fd filtering. illumos has dirent (native), dirent32 (x86) and dirent64 (kernel amd64 and x86 _LARGEFILE64_SOURCE). illumos headers have syscall numbers for getdents and getdents64 but getdents64 seems to produce a SIGSYS. I'll see what Solaris 11.4 does and try to work out why illumos has getdents64 in the headers. A+ Paul |