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
(60) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark W. <ma...@kl...> - 2024-10-27 23:59:07
|
There are still some pending patches, but lets do an RC1 for some wider testing. An RC1 tarball for 3.24.0 is now available at https://sourceware.org/pub/valgrind/valgrind-3.24.0.RC1.tar.bz2 (md5sum = a11f33c94dcb0f545a27464934b6fef8) (sha1sum = b87105b23d3b6d0e212d5729235d0d8225ff8851) https://sourceware.org/pub/valgrind/valgrind-3.24.0.RC1.tar.bz2.asc Please give it a try in configurations that are important for you and report any problems you have, either on this mailing list, or (preferably) via our bug tracker at https://bugs.kde.org/enter_bug.cgi?product=valgrind If nothing critical emerges a final release will happen on Thursday 31 October. |
From: Mark W. <ma...@so...> - 2024-10-27 23:36:32
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1ad4fbf86a8771358bd6f413e5b04af07d45cbcb commit 1ad4fbf86a8771358bd6f413e5b04af07d45cbcb Author: Mark Wielaard <ma...@kl...> Date: Mon Oct 28 00:13:19 2024 +0100 Set version to 3.24.0-RC1 Also update vg-lifespan which is used for documentation copyright years. Diff: --- NEWS | 4 ++-- configure.ac | 4 ++-- docs/xml/vg-entities.xml.in | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index acefe24188..74679b34ca 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Release 3.24.0 (?? Oct 2024) +Release 3.24.0.RC1 (27 Oct 2024) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, @@ -90,7 +90,7 @@ To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX where XXXXXX is the bug number as listed above. -(3.24.0.RC1: ?? Oct 2024) +(3.24.0.RC1: 27 Oct 2024) Release 3.23.0 (26 Apr 2024) diff --git a/configure.ac b/configure.ac index 23e4901060..9670d02b88 100755 --- a/configure.ac +++ b/configure.ac @@ -17,8 +17,8 @@ m4_define([v_major_ver], [3]) m4_define([v_minor_ver], [24]) m4_define([v_micro_ver], [0]) -m4_define([v_suffix_ver], [GIT]) -m4_define([v_rel_date], ["?? Oct 2024"]) +m4_define([v_suffix_ver], [RC1]) +m4_define([v_rel_date], ["27 Oct 2024"]) m4_define([v_version], m4_if(v_suffix_ver, [], [v_major_ver.v_minor_ver.v_micro_ver], diff --git a/docs/xml/vg-entities.xml.in b/docs/xml/vg-entities.xml.in index 0d2a4313c3..2feaeec2f2 100644 --- a/docs/xml/vg-entities.xml.in +++ b/docs/xml/vg-entities.xml.in @@ -2,7 +2,7 @@ <!ENTITY vg-jemail "ju...@va..."> <!ENTITY vg-vemail "val...@va..."> <!ENTITY cl-email "Jos...@gm..."> -<!ENTITY vg-lifespan "2000-2022"> +<!ENTITY vg-lifespan "2000-2024"> <!-- valgrind release + version stuff --> <!ENTITY rel-type "Release"> |
From: Paul F. <pa...@so...> - 2024-10-27 20:59:15
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5bc26782d6c917e4ee411ce4b8b2d530e780a25c commit 5bc26782d6c917e4ee411ce4b8b2d530e780a25c Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 22:58:32 2024 +0100 FreeBSD regtest: final part of scalar rationalisation, x86 expected Diff: --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 186 +++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 290cc163b1..cce726e1d6 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -610,6 +610,7 @@ Syscall param mprotect(len) contains uninitialised byte(s) Syscall param mprotect(prot) contains uninitialised byte(s) ... +Warning: client syscall mprotect tried to modify addresses 0x........-0x........ --------------------------------------------------------- 75: SYS_madvise 3s 0m --------------------------------------------------------- @@ -5596,6 +5597,191 @@ Syscall param __sysctlbyname(newp) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +571: SYS_shm_open2 5s 2m +--------------------------------------------------------- +Syscall param shm_open2(path) contains uninitialised byte(s) + ... + +Syscall param shm_open2(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open2(shmflags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) contains uninitialised byte(s) + ... + +Syscall param shm_open2(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param shm_open2(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +571: SYS_shm_open2 5s 1m +--------------------------------------------------------- +Syscall param shm_open2(path) contains uninitialised byte(s) + ... + +Syscall param shm_open2(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open2(shmflags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +574: SYS___realpathat 5s 2m +--------------------------------------------------------- +Syscall param __realpathat(fd) contains uninitialised byte(s) + ... + +Syscall param __realpathat(path) contains uninitialised byte(s) + ... + +Syscall param __realpathat(buf) contains uninitialised byte(s) + ... + +Syscall param __realpathat(size) contains uninitialised byte(s) + ... + +Syscall param __realpathat(flags) contains uninitialised byte(s) + ... + +Syscall param __realpathat(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param __realpathat(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +575: SYS_close_range 3s 0m +--------------------------------------------------------- +Syscall param close_range(lowfd) contains uninitialised byte(s) + ... + +Syscall param close_range(highfd) contains uninitialised byte(s) + ... + +Syscall param close_range(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +577: SYS___specialfd 3s 1m +--------------------------------------------------------- +Syscall param __specialfd(type) contains uninitialised byte(s) + ... + +Syscall param __specialfd(req) contains uninitialised byte(s) + ... + +Syscall param __specialfd(len) contains uninitialised byte(s) + ... + +Syscall param __specialfd(req) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +578: SYS_aio_writev 1s 1m +--------------------------------------------------------- +Syscall param aio_writev(iocb) contains uninitialised byte(s) + ... + +Syscall param aio_writev(iocb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +579: SYS_aio_readv 1s 1m +--------------------------------------------------------- +Syscall param aio_readv(iocb) contains uninitialised byte(s) + ... + +Syscall param aio_readv(iocb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +583: SYS_kqueuex 1s 0m +--------------------------------------------------------- +Syscall param kqueuex(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +584: SYS_membarrier 3s 0m +--------------------------------------------------------- +Syscall param membarrier(cmd) contains uninitialised byte(s) + ... + +Syscall param membarrier(flags) contains uninitialised byte(s) + ... + +Syscall param membarrier(cpu_id) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +585: SYS_timerfd_create 2s 0m +--------------------------------------------------------- +Syscall param timerfd_create(clockid) contains uninitialised byte(s) + ... + +Syscall param timerfd_create(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +586: SYS_timerfd_gettime 2s 1m +--------------------------------------------------------- +Syscall param timerfd_gettime(fd) contains uninitialised byte(s) + ... + +Syscall param timerfd_gettime(curr_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_gettime(curr_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +587: SYS_timerfd_settime 4s 2m +--------------------------------------------------------- +Syscall param timerfd_settime(fd) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(flags) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(new_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(old_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(new_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param timerfd_settime(old_value) 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-10-27 20:56:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=57a1c75bb2f2bd29582aa8fcac3eaa12c20e4e74 commit 57a1c75bb2f2bd29582aa8fcac3eaa12c20e4e74 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 21:54:55 2024 +0100 FreeBSD regtest: add fakes for older versions in scalar Syscalls added for FreeBSD 15 or thereabouts. Diff: --- memcheck/tests/freebsd/scalar.c | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index 8ddf408c07..5aecfebacf 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2325,6 +2325,10 @@ int main(void) GO(SYS_kqueuex, " 1s 0m"); SY(SYS_kqueuex, x0+123); FAIL; #else + FAKE_GO("583: SYS_kqueuex 1s 0m"); + FAKE_SY("Syscall param kqueuex(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); #endif /* SYS_membarrier 584 */ @@ -2332,6 +2336,16 @@ int main(void) GO(SYS_membarrier, " 3s 0m"); SY(SYS_membarrier, x0+123, x0+456, x0+789); FAIL; #else + FAKE_GO("584: SYS_membarrier 3s 0m"); + FAKE_SY("Syscall param membarrier(cmd) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param membarrier(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param membarrier(cpu_id) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); #endif /* SYS_timerfd_create 585 */ @@ -2339,6 +2353,13 @@ int main(void) GO(SYS_timerfd_create, " 2s 0m"); SY(SYS_timerfd_create, x0+123, x0+23456); FAIL; #else + FAKE_GO("585: SYS_timerfd_create 2s 0m"); + FAKE_SY("Syscall param timerfd_create(clockid) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_create(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); #endif /* SYS_timerfd_gettime 586 */ @@ -2346,6 +2367,17 @@ int main(void) GO(SYS_timerfd_gettime, " 2s 1m"); SY(SYS_timerfd_gettime, x0+100, x0); FAIL; #else + FAKE_GO("586: SYS_timerfd_gettime 2s 1m"); + FAKE_SY("Syscall param timerfd_gettime(fd) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_gettime(curr_value) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_gettime(curr_value) 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_timerfd_settime 587 */ @@ -2353,6 +2385,27 @@ int main(void) GO(SYS_timerfd_settime, "4s 2m"); SY(SYS_timerfd_settime, x0+321, x0, x0+10, x0+5); FAIL; #else + FAKE_GO("587: SYS_timerfd_settime 4s 2m"); + FAKE_SY("Syscall param timerfd_settime(fd) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_settime(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_settime(new_value) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_settime(old_value) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param timerfd_settime(new_value) 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"); + FAKE_SY("Syscall param timerfd_settime(old_value) 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 */ |
From: Paul F. <pa...@so...> - 2024-10-27 20:22:43
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=94bca9b9fc14e1c7a1c3a2848cbbacdee3a649ed commit 94bca9b9fc14e1c7a1c3a2848cbbacdee3a649ed Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 21:21:51 2024 +0100 FreeBSD regtest: remove scalar for version 15+ Now also merged into scalar.c Diff: --- .gitignore | 1 - configure.ac | 17 ------- memcheck/tests/freebsd/Makefile.am | 7 --- memcheck/tests/freebsd/scalar.c | 36 ++++++++++++++ memcheck/tests/freebsd/scalar.stderr.exp | 63 ++++++++++++++++++++++++ memcheck/tests/freebsd/scalar_15_plus.c | 31 ------------ memcheck/tests/freebsd/scalar_15_plus.stderr.exp | 63 ------------------------ memcheck/tests/freebsd/scalar_15_plus.vgtest | 12 ----- 8 files changed, 99 insertions(+), 131 deletions(-) diff --git a/.gitignore b/.gitignore index 9757543e68..1b6e2d002b 100644 --- a/.gitignore +++ b/.gitignore @@ -1433,7 +1433,6 @@ /memcheck/tests/freebsd/realpathat /memcheck/tests/freebsd/revoke /memcheck/tests/freebsd/scalar -/memcheck/tests/freebsd/scalar_15_plus /memcheck/tests/freebsd/scalar_abort2 /memcheck/tests/freebsd/scalar_fork /memcheck/tests/freebsd/scalar_pdfork diff --git a/configure.ac b/configure.ac index 39885a63c3..23e4901060 100755 --- a/configure.ac +++ b/configure.ac @@ -4815,29 +4815,12 @@ AC_MSG_RESULT([no]) ]) AM_CONDITIONAL(FREEBSD_TIMERFD_SYSCALL, test x$freebsd_timerfd_syscall = xyes) -AC_MSG_CHECKING([for syscalls only in FreeBSD 15 and later]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <sys/syscall.h> -]], [[ - return !SYS_getrlimitusage; -]])], [ -freebsd_syscall15=yes -AC_MSG_RESULT([yes]) -AC_DEFINE([FREEBSD_SYSCALL15], 1, - [Define to 1 if you are using FreeBSD 15 or later.]) -], [ -freebsd_syscall15=no -AC_MSG_RESULT([no]) -]) -AM_CONDITIONAL(FREEBSD_SYSCALL15, test x$freebsd_syscall15 = xyes) - else AM_CONDITIONAL(FREEBSD_EVENTFD, false) AM_CONDITIONAL(FREEBSD_REALPATHAT_SYSCALL, false) AM_CONDITIONAL(FREEBSD_KQUEUEX_SYSCALL, false) AM_CONDITIONAL(FREEBSD_TIMERFD_SYSCALL, false) -AM_CONDITIONAL(FREEBSD_SYSCALL15, false) fi # test "$VGCONF_OS" = "freebsd" diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 4f7e35b393..b2e84fc03e 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -93,8 +93,6 @@ EXTRA_DIST = \ scalar.stderr.exp-x86 \ scalar.supp \ scalar_abort2.vgtest \ - scalar_15_plus.vgtest \ - scalar_15_plus.stderr.exp \ scalar_abort2.stderr.exp \ scalar_fork.vgtest \ scalar_fork.stderr.exp \ @@ -202,11 +200,6 @@ check_PROGRAMS += timerfd timerfd_LDFLAGS = -lm endif -if FREEBSD_SYSCALL15 -check_PROGRAMS += scalar_15_plus timerfd -scalar_15_plus_CFLAGS = ${AM_CFLAGS} -g -endif - aligned_alloc_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT@ delete_sized_mismatch_CXXFLAGS = ${AM_CXXFLAGS} --std=c++14 diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index bd34487b08..8ddf408c07 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -2319,6 +2319,42 @@ int main(void) FAKE_SY("\n"); #endif + // FreeBSD 15 (and any backports) + /* SYS_kqueuex 583 */ +#if defined(SYS_kqueuex) + GO(SYS_kqueuex, " 1s 0m"); + SY(SYS_kqueuex, x0+123); FAIL; +#else +#endif + + /* SYS_membarrier 584 */ +#if defined(SYS_membarrier) + GO(SYS_membarrier, " 3s 0m"); + SY(SYS_membarrier, x0+123, x0+456, x0+789); FAIL; +#else +#endif + + /* SYS_timerfd_create 585 */ +#if defined(SYS_timerfd_create) + GO(SYS_timerfd_create, " 2s 0m"); + SY(SYS_timerfd_create, x0+123, x0+23456); FAIL; +#else +#endif + + /* SYS_timerfd_gettime 586 */ +#if defined(SYS_timerfd_gettime) + GO(SYS_timerfd_gettime, " 2s 1m"); + SY(SYS_timerfd_gettime, x0+100, x0); FAIL; +#else +#endif + + /* SYS_timerfd_settime 587 */ +#if defined(SYS_timerfd_settime) + GO(SYS_timerfd_settime, "4s 2m"); + SY(SYS_timerfd_settime, x0+321, x0, x0+10, x0+5); FAIL; +#else +#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 cdda0a7e0d..ed5f0a9b15 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5647,6 +5647,69 @@ Syscall param aio_readv(iocb) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +583: SYS_kqueuex 1s 0m +--------------------------------------------------------- +Syscall param kqueuex(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +584: SYS_membarrier 3s 0m +--------------------------------------------------------- +Syscall param membarrier(cmd) contains uninitialised byte(s) + ... + +Syscall param membarrier(flags) contains uninitialised byte(s) + ... + +Syscall param membarrier(cpu_id) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +585: SYS_timerfd_create 2s 0m +--------------------------------------------------------- +Syscall param timerfd_create(clockid) contains uninitialised byte(s) + ... + +Syscall param timerfd_create(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +586: SYS_timerfd_gettime 2s 1m +--------------------------------------------------------- +Syscall param timerfd_gettime(fd) contains uninitialised byte(s) + ... + +Syscall param timerfd_gettime(curr_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_gettime(curr_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +587: SYS_timerfd_settime 4s 2m +--------------------------------------------------------- +Syscall param timerfd_settime(fd) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(flags) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(new_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(old_value) contains uninitialised byte(s) + ... + +Syscall param timerfd_settime(new_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param timerfd_settime(old_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 1: SYS_exit 1s 0m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar_15_plus.c b/memcheck/tests/freebsd/scalar_15_plus.c deleted file mode 100644 index b417c14373..0000000000 --- a/memcheck/tests/freebsd/scalar_15_plus.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "scalar.h" -#include <sys/mman.h> - -int main(void) -{ - long *px = malloc(2*sizeof(long)); - x0 = px[0]; - - /* SYS_kqueuex 583 */ - GO(SYS_kqueuex, " 1s 0m"); - SY(SYS_kqueuex, x0+123); FAIL; - - /* SYS_membarrier 584 */ - GO(SYS_membarrier, " 3s 0m"); - SY(SYS_membarrier, x0+123, x0+456, x0+789); FAIL; - - /* SYS_timerfd_create 585 */ - GO(SYS_timerfd_create, " 2s 0m"); - SY(SYS_timerfd_create, x0+123, x0+23456); FAIL; - - /* SYS_timerfd_gettime 586 */ - GO(SYS_timerfd_gettime, " 2s 1m"); - SY(SYS_timerfd_gettime, x0+100, x0); FAIL; - - /* SYS_timerfd_settime 587 */ - GO(SYS_timerfd_settime, "4s 2m"); - SY(SYS_timerfd_settime, x0+321, x0, x0+10, x0+5); FAIL; - - return(0); -} - diff --git a/memcheck/tests/freebsd/scalar_15_plus.stderr.exp b/memcheck/tests/freebsd/scalar_15_plus.stderr.exp deleted file mode 100644 index b95f3ab12e..0000000000 --- a/memcheck/tests/freebsd/scalar_15_plus.stderr.exp +++ /dev/null @@ -1,63 +0,0 @@ ---------------------------------------------------------- -583: SYS_kqueuex 1s 0m ---------------------------------------------------------- -Syscall param kqueuex(flags) contains uninitialised byte(s) - ... - ---------------------------------------------------------- -584: SYS_membarrier 3s 0m ---------------------------------------------------------- -Syscall param membarrier(cmd) contains uninitialised byte(s) - ... - -Syscall param membarrier(flags) contains uninitialised byte(s) - ... - -Syscall param membarrier(cpu_id) contains uninitialised byte(s) - ... - ---------------------------------------------------------- -585: SYS_timerfd_create 2s 0m ---------------------------------------------------------- -Syscall param timerfd_create(clockid) contains uninitialised byte(s) - ... - -Syscall param timerfd_create(flags) contains uninitialised byte(s) - ... - ---------------------------------------------------------- -586: SYS_timerfd_gettime 2s 1m ---------------------------------------------------------- -Syscall param timerfd_gettime(fd) contains uninitialised byte(s) - ... - -Syscall param timerfd_gettime(curr_value) contains uninitialised byte(s) - ... - -Syscall param timerfd_gettime(curr_value) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -587: SYS_timerfd_settime 4s 2m ---------------------------------------------------------- -Syscall param timerfd_settime(fd) contains uninitialised byte(s) - ... - -Syscall param timerfd_settime(flags) contains uninitialised byte(s) - ... - -Syscall param timerfd_settime(new_value) contains uninitialised byte(s) - ... - -Syscall param timerfd_settime(old_value) contains uninitialised byte(s) - ... - -Syscall param timerfd_settime(new_value) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param timerfd_settime(old_value) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - diff --git a/memcheck/tests/freebsd/scalar_15_plus.vgtest b/memcheck/tests/freebsd/scalar_15_plus.vgtest deleted file mode 100644 index fe40176591..0000000000 --- a/memcheck/tests/freebsd/scalar_15_plus.vgtest +++ /dev/null @@ -1,12 +0,0 @@ -prereq: test -e ./scalar_15_plus -prog: scalar_15_plus -vgopts: -q --error-limit=no -stderr_filter: filter_scalar -# Remove all frames from the stack trace except the first one. -# This is important because syscall() function on x86 isn't ABI conformant -# which confuses the Valgrind stack unwinder. -# Therefore x86 and amd64 stack traces are unified so that they contain only -# 'syscall (in libc)' stack frame and this is then filtered out completely. -stderr_filter_args: libc -args: < scalar_13_plus.c - |
From: Paul F. <pa...@so...> - 2024-10-27 19:17:58
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=fbec9641c6f09b2c41a1a37b16b52d0398dc0eb8 commit fbec9641c6f09b2c41a1a37b16b52d0398dc0eb8 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 20:17:03 2024 +0100 FreeBSD regtest: remove test for version 13+ syscalls Now merged into main scalar.c Diff: --- .gitignore | 1 - configure.ac | 17 ---- memcheck/tests/freebsd/Makefile.am | 7 -- memcheck/tests/freebsd/scalar_13_plus.c | 38 ------- memcheck/tests/freebsd/scalar_13_plus.stderr.exp | 122 ----------------------- memcheck/tests/freebsd/scalar_13_plus.vgtest | 12 --- 6 files changed, 197 deletions(-) diff --git a/.gitignore b/.gitignore index 8275e9f901..9757543e68 100644 --- a/.gitignore +++ b/.gitignore @@ -1433,7 +1433,6 @@ /memcheck/tests/freebsd/realpathat /memcheck/tests/freebsd/revoke /memcheck/tests/freebsd/scalar -/memcheck/tests/freebsd/scalar_13_plus /memcheck/tests/freebsd/scalar_15_plus /memcheck/tests/freebsd/scalar_abort2 /memcheck/tests/freebsd/scalar_fork diff --git a/configure.ac b/configure.ac index 7a740a2da5..39885a63c3 100755 --- a/configure.ac +++ b/configure.ac @@ -4783,22 +4783,6 @@ AC_MSG_RESULT([no]) ]) AM_CONDITIONAL(FREEBSD_REALPATHAT_SYSCALL, test x$freebsd_realpathat_syscall = xyes) -AC_MSG_CHECKING([for syscalls only in FreeBSD 13 and later]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <sys/syscall.h> -]], [[ - return !SYS_aio_readv; -]])], [ -freebsd_syscall13=yes -AC_MSG_RESULT([yes]) -AC_DEFINE([FREEBSD_SYSCALL13], 1, - [Define to 1 if you are using FreeBSD 13 or later.]) -], [ -freebsd_syscall13=no -AC_MSG_RESULT([no]) -]) -AM_CONDITIONAL(FREEBSD_SYSCALL13, test x$freebsd_syscall13 = xyes) - AC_MSG_CHECKING([for the SYS_kqueuex syscall (FreeBSD-specific)]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/syscall.h> @@ -4851,7 +4835,6 @@ else AM_CONDITIONAL(FREEBSD_EVENTFD, false) AM_CONDITIONAL(FREEBSD_REALPATHAT_SYSCALL, false) -AM_CONDITIONAL(FREEBSD_SYSCALL13, false) AM_CONDITIONAL(FREEBSD_KQUEUEX_SYSCALL, false) AM_CONDITIONAL(FREEBSD_TIMERFD_SYSCALL, false) AM_CONDITIONAL(FREEBSD_SYSCALL15, false) diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 0a144cd3d2..4f7e35b393 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -93,8 +93,6 @@ EXTRA_DIST = \ scalar.stderr.exp-x86 \ scalar.supp \ scalar_abort2.vgtest \ - scalar_13_plus.vgtest \ - scalar_13_plus.stderr.exp \ scalar_15_plus.vgtest \ scalar_15_plus.stderr.exp \ scalar_abort2.stderr.exp \ @@ -187,11 +185,6 @@ inlinfo_nested_so_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd -s bug464476_SOURCES = bug464476.cpp bug470713_SOURCES = bug470713.cpp -if FREEBSD_SYSCALL13 -check_PROGRAMS += scalar_13_plus -scalar_13_plus_CFLAGS = ${AM_CFLAGS} -g -endif - if FREEBSD_EVENTFD check_PROGRAMS += eventfd1 eventfd2 endif diff --git a/memcheck/tests/freebsd/scalar_13_plus.c b/memcheck/tests/freebsd/scalar_13_plus.c deleted file mode 100644 index 799dcfc8b7..0000000000 --- a/memcheck/tests/freebsd/scalar_13_plus.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "scalar.h" -#include <sys/mman.h> - -int main(void) -{ - long *px = malloc(2*sizeof(long)); - x0 = px[0]; - - /* SYS_shm_open2 571 */ - GO(SYS_shm_open2, " 5s 2m"); - SY(SYS_shm_open2, x0+0xf00c, x0+1, x0+2, x0+3, x0+4); FAIL; - - GO(SYS_shm_open2, " 5s 1m"); - SY(SYS_shm_open2, x0+SHM_ANON, x0+1, x0+2, x0+3, x0+4); FAIL; - - /* SYS___realpathat 574 */ - GO(SYS___realpathat, " 5s 2m"); - SY(SYS___realpathat, x0+0xffff, x0, x0, x0+100, x0+2); FAIL; - - /* SYS_close_range 575 */ - GO(SYS_close_range, "3s 0m"); - SY(SYS_close_range, x0+5, x0+10, x0); SUCC; - - /* SYS___specialfd 577 */ - GO(SYS___specialfd, "3s 1m"); - SY(SYS___specialfd, x0+0xf000, x0+1, x0+10); FAIL; - - /* SYS_aio_writev 578 */ - GO(SYS_aio_writev, "1s 1m"); - SY(SYS_aio_writev, x0+1); FAIL; - - /* SYS_aio_readv 579 */ - GO(SYS_aio_readv, "1s 1m"); - SY(SYS_aio_readv, x0+1); FAIL; - - return(0); -} - diff --git a/memcheck/tests/freebsd/scalar_13_plus.stderr.exp b/memcheck/tests/freebsd/scalar_13_plus.stderr.exp deleted file mode 100644 index c7c2e4027b..0000000000 --- a/memcheck/tests/freebsd/scalar_13_plus.stderr.exp +++ /dev/null @@ -1,122 +0,0 @@ ---------------------------------------------------------- -571: SYS_shm_open2 5s 2m ---------------------------------------------------------- -Syscall param shm_open2(path) contains uninitialised byte(s) - ... - -Syscall param shm_open2(flags) contains uninitialised byte(s) - ... - -Syscall param shm_open2(mode) contains uninitialised byte(s) - ... - -Syscall param shm_open2(shmflags) contains uninitialised byte(s) - ... - -Syscall param shm_open2(name) contains uninitialised byte(s) - ... - -Syscall param shm_open2(path) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param shm_open2(name) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -571: SYS_shm_open2 5s 1m ---------------------------------------------------------- -Syscall param shm_open2(path) contains uninitialised byte(s) - ... - -Syscall param shm_open2(flags) contains uninitialised byte(s) - ... - -Syscall param shm_open2(mode) contains uninitialised byte(s) - ... - -Syscall param shm_open2(shmflags) contains uninitialised byte(s) - ... - -Syscall param shm_open2(name) contains uninitialised byte(s) - ... - -Syscall param shm_open2(name) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -574: SYS___realpathat 5s 2m ---------------------------------------------------------- -Syscall param __realpathat(fd) contains uninitialised byte(s) - ... - -Syscall param __realpathat(path) contains uninitialised byte(s) - ... - -Syscall param __realpathat(buf) contains uninitialised byte(s) - ... - -Syscall param __realpathat(size) contains uninitialised byte(s) - ... - -Syscall param __realpathat(flags) contains uninitialised byte(s) - ... - -Syscall param __realpathat(path) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param __realpathat(buf) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -575: SYS_close_range 3s 0m ---------------------------------------------------------- -Syscall param close_range(lowfd) contains uninitialised byte(s) - ... - -Syscall param close_range(highfd) contains uninitialised byte(s) - ... - -Syscall param close_range(flags) contains uninitialised byte(s) - ... - ---------------------------------------------------------- -577: SYS___specialfd 3s 1m ---------------------------------------------------------- -Syscall param __specialfd(type) contains uninitialised byte(s) - ... - -Syscall param __specialfd(req) contains uninitialised byte(s) - ... - -Syscall param __specialfd(len) contains uninitialised byte(s) - ... - -Syscall param __specialfd(req) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -578: SYS_aio_writev 1s 1m ---------------------------------------------------------- -Syscall param aio_writev(iocb) contains uninitialised byte(s) - ... - -Syscall param aio_writev(iocb) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - ---------------------------------------------------------- -579: SYS_aio_readv 1s 1m ---------------------------------------------------------- -Syscall param aio_readv(iocb) contains uninitialised byte(s) - ... - -Syscall param aio_readv(iocb) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - diff --git a/memcheck/tests/freebsd/scalar_13_plus.vgtest b/memcheck/tests/freebsd/scalar_13_plus.vgtest deleted file mode 100644 index 09dc90e90b..0000000000 --- a/memcheck/tests/freebsd/scalar_13_plus.vgtest +++ /dev/null @@ -1,12 +0,0 @@ -prereq: test -e ./scalar_13_plus -prog: scalar_13_plus -vgopts: -q --error-limit=no -stderr_filter: filter_scalar -# Remove all frames from the stack trace except the first one. -# This is important because syscall() function on x86 isn't ABI conformant -# which confuses the Valgrind stack unwinder. -# Therefore x86 and amd64 stack traces are unified so that they contain only -# 'syscall (in libc)' stack frame and this is then filtered out completely. -stderr_filter_args: libc -args: < scalar_13_plus.c - |
From: Paul F. <pa...@so...> - 2024-10-27 18:32:31
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=449c6a27fa246196fd8cccdb2445abdcec1c7f7a commit 449c6a27fa246196fd8cccdb2445abdcec1c7f7a Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 18:59:12 2024 +0100 FreeBSD regtest: add fakes for FreeBSD < 13 Also try again to make mprotect fail. It doesn't fail with a bogus 'prot' on FreeBSD 12.4. Diff: --- memcheck/tests/freebsd/scalar.c | 119 ++++++++++++++++++++++++++++++- memcheck/tests/freebsd/scalar.stderr.exp | 1 + memcheck/tests/freebsd/scalar.supp | 3 +- 3 files changed, 120 insertions(+), 3 deletions(-) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index a1cfb06b14..bd34487b08 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -334,7 +334,7 @@ int main(void) /* SYS_mprotect 74 */ GO(SYS_mprotect, "3s 0m"); - SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; + SY(SYS_mprotect, x0+1, x0-10, x0+9999); FAIL; /* SYS_madvise 75 */ GO(SYS_madvise, "3s 0m"); @@ -2176,31 +2176,148 @@ int main(void) // FreeBSD 13 (and any backports) /* SYS_shm_open2 571 */ +#if defined(SYS_shm_open2) GO(SYS_shm_open2, " 5s 2m"); SY(SYS_shm_open2, x0+0xf00c, x0+1, x0+2, x0+3, x0+4); FAIL; GO(SYS_shm_open2, " 5s 1m"); SY(SYS_shm_open2, x0+SHM_ANON, x0+1, x0+2, x0+3, x0+4); FAIL; +#else + FAKE_GO("571: SYS_shm_open2 5s 2m"); + FAKE_SY("Syscall param shm_open2(path) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(mode) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(shmflags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(name) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(path) 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"); + FAKE_SY("Syscall param shm_open2(name) 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"); + + FAKE_GO("571: SYS_shm_open2 5s 1m"); + FAKE_SY("Syscall param shm_open2(path) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(mode) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(shmflags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(name) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param shm_open2(name) 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___realpathat 574 */ +#if defined(SYS___realpathat) GO(SYS___realpathat, " 5s 2m"); SY(SYS___realpathat, x0+0xffff, x0, x0, x0+100, x0+2); FAIL; +#else + FAKE_GO("574: SYS___realpathat 5s 2m"); + FAKE_SY("Syscall param __realpathat(fd) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __realpathat(path) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __realpathat(buf) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __realpathat(size) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __realpathat(flags) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __realpathat(path) 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"); + FAKE_SY("Syscall param __realpathat(buf) 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_close_range 575 */ +#if defined(SYS_close_range) GO(SYS_close_range, "3s 0m"); SY(SYS_close_range, x0+5, x0+10, x0+12345); FAIL; +#else +#endif /* SYS___specialfd 577 */ +#if defined(SYS___specialfd) GO(SYS___specialfd, "3s 1m"); SY(SYS___specialfd, x0+0xf000, x0+1, x0+10); FAIL; +#else + FAKE_GO("577: SYS___specialfd 3s 1m"); + FAKE_SY("Syscall param __specialfd(type) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __specialfd(req) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __specialfd(len) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param __specialfd(req) 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_aio_writev 578 */ +#if defined(SYS_aio_writev) GO(SYS_aio_writev, "1s 1m"); SY(SYS_aio_writev, x0+1); FAIL; +#else + FAKE_GO("578: SYS_aio_writev 1s 1m"); + FAKE_SY("Syscall param aio_writev(iocb) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param aio_writev(iocb) 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_aio_readv 579 */ +#if defined(SYS_aio_readv) GO(SYS_aio_readv, "1s 1m"); SY(SYS_aio_readv, x0+1); FAIL; +#else + FAKE_GO("579: SYS_aio_readv 1s 1m"); + FAKE_SY("Syscall param aio_readv(iocb) contains uninitialised byte(s)\n"); + FAKE_SY(" ...\n"); + FAKE_SY("\n"); + FAKE_SY("Syscall param aio_readv(iocb) 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"); diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index db12726f55..cdda0a7e0d 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -610,6 +610,7 @@ Syscall param mprotect(len) contains uninitialised byte(s) Syscall param mprotect(prot) contains uninitialised byte(s) ... +Warning: client syscall mprotect tried to modify addresses 0x........-0x........ --------------------------------------------------------- 75: SYS_madvise 3s 0m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.supp b/memcheck/tests/freebsd/scalar.supp index f6b15a33ea..bf83845b59 100644 --- a/memcheck/tests/freebsd/scalar.supp +++ b/memcheck/tests/freebsd/scalar.supp @@ -1,4 +1,4 @@ -# not sure what causes this exactly# on x86 and amd64 (but not arm64) +# not sure what causes this exactly on x86 and amd64 (but not arm64) # there is an conditional uninit read # there are several if statements that use the two pointers to stack # structures that probably generate the error @@ -7,5 +7,4 @@ internal uninitilized read Memcheck:Cond fun:syscall - fun:main } |
From: Paul F. <pa...@so...> - 2024-10-27 17:15:07
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9828f4808d8044190a9a585bbec1a80e0b2674d5 commit 9828f4808d8044190a9a585bbec1a80e0b2674d5 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 18:14:20 2024 +0100 FreeBSD regtest: start removing versioned scalar variants Diff: --- memcheck/tests/freebsd/scalar.c | 6 +- memcheck/tests/freebsd/scalar.stderr.exp | 122 +++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 4 deletions(-) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index 8862f3df3e..a1cfb06b14 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -334,7 +334,7 @@ int main(void) /* SYS_mprotect 74 */ GO(SYS_mprotect, "3s 0m"); - //SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; + SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; /* SYS_madvise 75 */ GO(SYS_madvise, "3s 0m"); @@ -372,7 +372,7 @@ int main(void) /* SYS_swapon 85 */ GO(SYS_swapon, "1s 1m"); - //SY(SYS_swapon, x0+1); SUCC; + SY(SYS_swapon, x0+1); FAIL; /* SYS_getitimer 86 */ GO(SYS_getitimer, "2s 1m"); @@ -2174,7 +2174,6 @@ int main(void) GO(SYS___sysctlbyname, "(putnew) 4s 2m"); SY(SYS___sysctlbyname, x0, x0+1, NULL, NULL, x0+1, x0+2); FAIL; -#if 0 // for later // FreeBSD 13 (and any backports) /* SYS_shm_open2 571 */ GO(SYS_shm_open2, " 5s 2m"); @@ -2202,7 +2201,6 @@ int main(void) /* SYS_aio_readv 579 */ GO(SYS_aio_readv, "1s 1m"); SY(SYS_aio_readv, x0+1); FAIL; -#endif /* SYS_exit 1 */ GO(SYS_exit, "1s 0m"); diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 02f17f9d6c..db12726f55 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -5524,6 +5524,128 @@ Syscall param __sysctlbyname(newp) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +571: SYS_shm_open2 5s 2m +--------------------------------------------------------- +Syscall param shm_open2(path) contains uninitialised byte(s) + ... + +Syscall param shm_open2(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open2(shmflags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) contains uninitialised byte(s) + ... + +Syscall param shm_open2(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param shm_open2(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +571: SYS_shm_open2 5s 1m +--------------------------------------------------------- +Syscall param shm_open2(path) contains uninitialised byte(s) + ... + +Syscall param shm_open2(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open2(shmflags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +574: SYS___realpathat 5s 2m +--------------------------------------------------------- +Syscall param __realpathat(fd) contains uninitialised byte(s) + ... + +Syscall param __realpathat(path) contains uninitialised byte(s) + ... + +Syscall param __realpathat(buf) contains uninitialised byte(s) + ... + +Syscall param __realpathat(size) contains uninitialised byte(s) + ... + +Syscall param __realpathat(flags) contains uninitialised byte(s) + ... + +Syscall param __realpathat(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param __realpathat(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +575: SYS_close_range 3s 0m +--------------------------------------------------------- +Syscall param close_range(lowfd) contains uninitialised byte(s) + ... + +Syscall param close_range(highfd) contains uninitialised byte(s) + ... + +Syscall param close_range(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +577: SYS___specialfd 3s 1m +--------------------------------------------------------- +Syscall param __specialfd(type) contains uninitialised byte(s) + ... + +Syscall param __specialfd(req) contains uninitialised byte(s) + ... + +Syscall param __specialfd(len) contains uninitialised byte(s) + ... + +Syscall param __specialfd(req) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +578: SYS_aio_writev 1s 1m +--------------------------------------------------------- +Syscall param aio_writev(iocb) contains uninitialised byte(s) + ... + +Syscall param aio_writev(iocb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +579: SYS_aio_readv 1s 1m +--------------------------------------------------------- +Syscall param aio_readv(iocb) contains uninitialised byte(s) + ... + +Syscall param aio_readv(iocb) 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-10-27 16:57:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=0d9ba0fc48edc3f183520185e25926dde1434219 commit 0d9ba0fc48edc3f183520185e25926dde1434219 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 17:48:58 2024 +0100 FreeBSD: put back stacktrace hack for syscalls in older versions Diff: --- coregrind/m_stacktrace.c | 42 ++++++++++++++++++++++++++--------- memcheck/tests/freebsd/scalar.c | 4 ++-- memcheck/tests/freebsd/setproctitle.c | 2 +- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 2cb0f3233e..630b5b8752 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -282,6 +282,26 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, i = 1; if (do_stats) stats.nr++; + // Does this apply to macOS 10.14 and earlier? +# if defined(VGO_freebsd) && (__FreeBSD_version < 1300000) + if (VG_(is_valid_tid)(tid_if_known) && + VG_(is_in_syscall)(tid_if_known) && + i < max_n_ips) { + /* On FreeBSD, all the system call stubs have no function + * prolog. So instead of top of the stack being a new + * frame comprising a saved BP and a return address, we + * just have the return address in the caller's frame. + * Adjust for this by recording the return address. + */ + if (debug) + VG_(printf)(" in syscall, use XSP-1\n"); + ips[i] = *(Addr *)uregs.xsp - 1; + if (sps) sps[i] = uregs.xsp; + if (fps) fps[i] = uregs.xbp; + i++; + } +# endif + while (True) { if (i >= max_n_ips) @@ -502,19 +522,19 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, || defined(VGP_amd64_solaris) || defined(VGP_amd64_freebsd) /* - * Concerning the comment in the function about syscalls, this also used to - * apply to FreeBSD. I'm not sure what changed or when. The situation with - * FreeBSD going at least as far back as version 12.1 (so Nov 2019) is that - * system calls are implemented with generated wrappers that call through - * an interposing table of function pointers. The restult when built with - * clang is that code for the frame pointer prolog is generated but then - * an optimized sibling call is made. That means the frame pointer is popped - * off the stack and a jmp is made to the function in the table rather than + * Concerning the comment in the function about syscalls, I'm not sure + * what changed or when with FreeBSD. The situation going at least + * as far back as FreeBSD 12.1 (so Nov 2019) is that system calls are + * implemented with generated wrappers that call through an interposing + * table of function pointers. The result when built with clang is that + * code for the frame pointer prolog is generated but then an optimized + * sibling call is made. That means the frame pointer is popped off + * the stack and a jmp is made to the function in the table rather than * a call. * * The end result is that, when we are in a syscall it is as though there were - * no prolog but a copy of the frame pointer is stored 64byte word below the - * stack pointer. If FreeBSD uses the hack for Darwin that sets + * no prolog but a copy of the frame pointer is stored one 64bit word below the + * stack pointer. If more recent FreeBSD uses the hack that sets * ips[i] = *(Addr *)uregs.xsp - 1; * then the caller of the syscall gets added twice. */ @@ -592,7 +612,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, VG_(printf)(" ipsS[%d]=%#08lx rbp %#08lx rsp %#08lx\n", i-1, ips[i-1], uregs.xbp, uregs.xsp); -# if defined(VGO_darwin) +# if defined(VGO_darwin) || (defined(VGO_freebsd) && __FreeBSD_version < 1300000) if (VG_(is_valid_tid)(tid_if_known) && VG_(is_in_syscall)(tid_if_known) && i < max_n_ips) { diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index e9d936e474..8862f3df3e 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -334,7 +334,7 @@ int main(void) /* SYS_mprotect 74 */ GO(SYS_mprotect, "3s 0m"); - SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; + //SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; /* SYS_madvise 75 */ GO(SYS_madvise, "3s 0m"); @@ -372,7 +372,7 @@ int main(void) /* SYS_swapon 85 */ GO(SYS_swapon, "1s 1m"); - SY(SYS_swapon, x0); FAIL; + //SY(SYS_swapon, x0+1); SUCC; /* SYS_getitimer 86 */ GO(SYS_getitimer, "2s 1m"); diff --git a/memcheck/tests/freebsd/setproctitle.c b/memcheck/tests/freebsd/setproctitle.c index cc0357f42f..44e7514a2e 100644 --- a/memcheck/tests/freebsd/setproctitle.c +++ b/memcheck/tests/freebsd/setproctitle.c @@ -10,7 +10,7 @@ int main(void) { -#if defined(KERN_PS_STRINGS) +#if defined(KERN_PS_STRINGS) && defined(AT_PS_STRINGS) unsigned long ul_ps_strings; struct ps_strings* v1; struct ps_strings* v2; |
From: Paul F. <pa...@so...> - 2024-10-27 13:28:09
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dd23a6c30910020700b283e3deabbfc27606e4db commit dd23a6c30910020700b283e3deabbfc27606e4db Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 15:27:38 2024 +0100 FreeBSD regtest: x86 scalar expected Diff: --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index e83b942838..290cc163b1 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -1154,6 +1154,23 @@ Syscall param adjtime(delta) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +140: SYS_adjtime 2s 2m +--------------------------------------------------------- +Syscall param adjtime(delta) contains uninitialised byte(s) + ... + +Syscall param adjtime(olddelta) contains uninitialised byte(s) + ... + +Syscall param adjtime(delta) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param adjtime(olddelta) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 147: SYS_setsid 0s 0m --------------------------------------------------------- @@ -3993,6 +4010,22 @@ Syscall param shm_open(flags) contains uninitialised byte(s) Syscall param shm_open(mode) contains uninitialised byte(s) ... +--------------------------------------------------------- +482: SYS_shm_open 3s 1m +--------------------------------------------------------- +Syscall param shm_open(path) contains uninitialised byte(s) + ... + +Syscall param shm_open(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 483: SYS_shm_unlink 1s 1m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2024-10-27 13:25:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bb706490243127ea6de47caaf5026536f787b8e1 commit bb706490243127ea6de47caaf5026536f787b8e1 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 14:22:58 2024 +0100 FreeBSD regtest: cleanup scalar Make more tests fail. Add a few more tests. Add some asserts for tests that don't return -1 on failure. Diff: --- memcheck/tests/freebsd/scalar.c | 33 +++++++++++++++++++------------- memcheck/tests/freebsd/scalar.stderr.exp | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index a7dd23947b..e9d936e474 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -334,8 +334,7 @@ int main(void) /* SYS_mprotect 74 */ GO(SYS_mprotect, "3s 0m"); - /* PJF why does this succeed? */ - SY(SYS_mprotect, x0+1, x0, x0); SUCC; + SY(SYS_mprotect, x0+1, x0+1, x0+9999); FAIL; /* SYS_madvise 75 */ GO(SYS_madvise, "3s 0m"); @@ -503,11 +502,11 @@ int main(void) /* SYS_setreuid 126 */ GO(SYS_setreuid, "2s 0m"); - SY(SYS_setreuid, x0-1, x0-1); SUCC; + SY(SYS_setreuid, x0+1, x0+1); FAIL; /* SYS_setregid 127 */ GO(SYS_setregid, "2s 0m"); - SY(SYS_setregid, x0-1, x0-1); SUCC; + SY(SYS_setregid, x0+1, x0+1); FAIL; /* SYS_rename 128 */ GO(SYS_rename, "2s 2m"); @@ -552,8 +551,10 @@ int main(void) /* SYS_adjtime 140 */ GO(SYS_adjtime, "2s 1m"); - /* succeeds? need non-null arg2 for 2m */ - SY(SYS_adjtime, x0, x0); SUCC; + SY(SYS_adjtime, x0+1, x0); FAIL; + + GO(SYS_adjtime, "2s 2m"); + SY(SYS_adjtime, x0+1, x0+1); FAIL; /* 4.3 getpeername 141 */ @@ -1004,6 +1005,7 @@ int main(void) /* SYS_clock_nanosleep 244 */ GO(SYS_clock_nanosleep, "4s 2m"); SY(SYS_clock_nanosleep, x0+5000, x0+3000, x0+3, x0+1); SUCC; + assert(res == EFAULT); #endif // SYS_clock_getcpuclockid2 247 @@ -1101,7 +1103,7 @@ int main(void) /* SYS_modnext 300 */ GO(SYS_modnext, "1s 0m"); - SY(SYS_modnext, x0+1); SUCC; + SY(SYS_modnext, x0+100000); FAIL; /* SYS_modstat 301 */ GO(SYS_modstat, "2s 1m"); @@ -1109,7 +1111,7 @@ int main(void) /* SYS_modfnext 302 */ GO(SYS_modfnext, "1s 0m"); - SY(SYS_modfnext, x0+1); SUCC; + SY(SYS_modfnext, x0+100000); FAIL; /* SYS_modfind 303 */ GO(SYS_modfind, "1s 1m"); @@ -1228,6 +1230,7 @@ int main(void) SY(SYS_sched_rr_get_interval, x0+999999, x0+1); FAIL; /* SYS_utrace 335*/ + /* only works if process is being traced */ GO(SYS_utrace, "2s 1m"); SY(SYS_utrace, x0+1, x0+16); SUCC; @@ -1758,14 +1761,16 @@ int main(void) #if defined(SYS_freebsd12_shm_open) GO(SYS_freebsd12_shm_open, "(SHM_ANON) 3s 0m"); SY(SYS_freebsd12_shm_open, x0+SHM_ANON, x0+2, x0+9); SUCC; + + GO(SYS_freebsd12_shm_open, "3s 1m"); + SY(SYS_freebsd12_shm_open, x0+2, x0+2, x0+9); FAIL; #else GO(SYS_shm_open, "(SHM_ANON) 3s 0m"); SY(SYS_shm_open, x0+SHM_ANON, x0+2, x0+9); SUCC; -#endif - // @todo this was causing a VG crash - // GO(SYS_shm_open, "3s 1m"); - //SY(SYS_shm_open, x0+2, x0+2, x0+9); SUCC; + GO(SYS_shm_open, "3s 1m"); + SY(SYS_shm_open, x0+2, x0+2, x0+9); FAIL; +#endif /* SYS_shm_unlink 483 */ GO(SYS_shm_unlink, "1s 1m"); @@ -1981,10 +1986,12 @@ int main(void) GO(SYS_posix_fallocate, "5s 0m"); SY(SYS_posix_fallocate, x0+99999, x0, x0+10, x0, x0+20); SUCC; #endif + assert(res == EBADF); /* SYS_posix_fadvise 531 */ GO(SYS_posix_fadvise, "4s 0m"); SY(SYS_posix_fadvise, x0+99999, x0+10, x0+20, x0); SUCC; + assert(res == EBADF); /* SYS_wait6 532 */ GO(SYS_wait6, "6s 3m"); @@ -2182,7 +2189,7 @@ int main(void) /* SYS_close_range 575 */ GO(SYS_close_range, "3s 0m"); - SY(SYS_close_range, x0+5, x0+10, x0); SUCC; + SY(SYS_close_range, x0+5, x0+10, x0+12345); FAIL; /* SYS___specialfd 577 */ GO(SYS___specialfd, "3s 1m"); diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 5c61947a15..02f17f9d6c 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -1154,6 +1154,23 @@ Syscall param adjtime(delta) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +140: SYS_adjtime 2s 2m +--------------------------------------------------------- +Syscall param adjtime(delta) contains uninitialised byte(s) + ... + +Syscall param adjtime(olddelta) contains uninitialised byte(s) + ... + +Syscall param adjtime(delta) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param adjtime(olddelta) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 147: SYS_setsid 0s 0m --------------------------------------------------------- @@ -3966,6 +3983,22 @@ Syscall param shm_open(flags) contains uninitialised byte(s) Syscall param shm_open(mode) contains uninitialised byte(s) ... +--------------------------------------------------------- +482: SYS_shm_open 3s 1m +--------------------------------------------------------- +Syscall param shm_open(path) contains uninitialised byte(s) + ... + +Syscall param shm_open(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 483: SYS_shm_unlink 1s 1m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2024-10-27 08:55:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=50b056811c58a7ee57b8a51d44a58f9c74eaba98 commit 50b056811c58a7ee57b8a51d44a58f9c74eaba98 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 10:54:23 2024 +0100 FreeBSD x86 scalar: update expected after fix for sigwait Diff: --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 6bff63d332..e83b942838 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -3614,6 +3614,10 @@ Syscall param mq_timedreceive(msg_prio) contains uninitialised byte(s) Syscall param mq_timedreceive(abs_timeout) contains uninitialised byte(s) ... +Syscall param mq_timedreceive(msg_ptr) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param mq_timedreceive(msg_prio) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -3640,6 +3644,10 @@ Syscall param mq_timedsend(msg_prio) contains uninitialised byte(s) Syscall param mq_timedsend(abs_timeout) contains uninitialised byte(s) ... +Syscall param mq_timedsend(msg_ptr) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param mq_timedsend(abs_timeout) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -3723,6 +3731,14 @@ Syscall param sctp_generic_sendmsg(sinfo) contains uninitialised byte(s) Syscall param sctp_generic_sendmsg(flags) contains uninitialised byte(s) ... +Syscall param sctp_generic_sendmsg(msg) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sctp_generic_sendmsg(to) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param sctp_generic_sendmsg(sinfo) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -4055,6 +4071,10 @@ Syscall param cpuset_getaffinity(setsize) contains uninitialised byte(s) Syscall param cpuset_getaffinity(mask) contains uninitialised byte(s) ... +Syscall param cpuset_getaffinity points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 488: SYS_cpuset_setaffinity 5s 1m --------------------------------------------------------- @@ -4076,6 +4096,10 @@ Syscall param cpuset_setaffinity(setsize) contains uninitialised byte(s) Syscall param cpuset_setaffinity(mask) contains uninitialised byte(s) ... +Syscall param cpuset_setaffinity points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 489: SYS_faccessat 3s 1m --------------------------------------------------------- |
From: Paul F. <pa...@so...> - 2024-10-27 08:21:26
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3b8f138bfb904ec7489a44e44035e37711da0bb3 commit 3b8f138bfb904ec7489a44e44035e37711da0bb3 Author: Paul Floyd <pj...@wa...> Date: Sun Oct 27 09:15:31 2024 +0100 FreeBSD sigwait syscall: fixes for unusual return codes sigwait doesn't follow the usual syscall convention of returning -1 on error and setting errno. Instead it returns errno and 0 means success. Previously the POST was getting called on failure, potentially resulting in memory getting incorrectly marked as accessible and initialized. Also only flag 'may block' if the first sigset argument is accessible. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 7 +++++-- memcheck/tests/freebsd/scalar.c | 31 +++++++++++++++++++++++++++++++ memcheck/tests/freebsd/scalar.stderr.exp | 16 ++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 787581b860..685eb6be07 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -4010,13 +4010,16 @@ PRE(sys___acl_aclcheck_link) // int sigwait(const sigset_t * restrict set, int * restrict sig); PRE(sys_sigwait) { - *flags |= SfMayBlock; PRINT("sys_sigwait ( %#" FMT_REGWORD "x, %#" FMT_REGWORD "x )", ARG1,ARG2); PRE_REG_READ2(int, "sigwait", const vki_sigset_t *, set, int *, sig); if (ARG1 != 0) { PRE_MEM_READ( "sigwait(set)", ARG1, sizeof(vki_sigset_t)); + vki_sigset_t* set = (vki_sigset_t*)ARG1; + if (ML_(safe_to_deref)(set, sizeof(vki_sigset_t))) { + *flags |= SfMayBlock; + } } if (ARG2 != 0) { PRE_MEM_WRITE( "sigwait(sig)", ARG2, sizeof(int)); @@ -4025,7 +4028,7 @@ PRE(sys_sigwait) POST(sys_sigwait) { - if (ARG2 != 0) { + if (RES == 0 && ARG2 != 0) { POST_MEM_WRITE( ARG2, sizeof(int)); } } diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index ef66490408..a7dd23947b 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -1547,6 +1547,7 @@ int main(void) /* SYS_sigwait 429 */ GO(SYS_sigwait, "2s 2m"); SY(SYS_sigwait, x0+1, x0+2); SUCC; + assert(res == EFAULT); // thr_create 430 @@ -2166,6 +2167,36 @@ int main(void) GO(SYS___sysctlbyname, "(putnew) 4s 2m"); SY(SYS___sysctlbyname, x0, x0+1, NULL, NULL, x0+1, x0+2); FAIL; +#if 0 // for later + // FreeBSD 13 (and any backports) + /* SYS_shm_open2 571 */ + GO(SYS_shm_open2, " 5s 2m"); + SY(SYS_shm_open2, x0+0xf00c, x0+1, x0+2, x0+3, x0+4); FAIL; + + GO(SYS_shm_open2, " 5s 1m"); + SY(SYS_shm_open2, x0+SHM_ANON, x0+1, x0+2, x0+3, x0+4); FAIL; + + /* SYS___realpathat 574 */ + GO(SYS___realpathat, " 5s 2m"); + SY(SYS___realpathat, x0+0xffff, x0, x0, x0+100, x0+2); FAIL; + + /* SYS_close_range 575 */ + GO(SYS_close_range, "3s 0m"); + SY(SYS_close_range, x0+5, x0+10, x0); SUCC; + + /* SYS___specialfd 577 */ + GO(SYS___specialfd, "3s 1m"); + SY(SYS___specialfd, x0+0xf000, x0+1, x0+10); FAIL; + + /* SYS_aio_writev 578 */ + GO(SYS_aio_writev, "1s 1m"); + SY(SYS_aio_writev, x0+1); FAIL; + + /* SYS_aio_readv 579 */ + GO(SYS_aio_readv, "1s 1m"); + SY(SYS_aio_readv, x0+1); FAIL; +#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 681bb8f2ad..5c61947a15 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -3605,6 +3605,10 @@ Syscall param mq_timedreceive(msg_prio) contains uninitialised byte(s) Syscall param mq_timedreceive(abs_timeout) contains uninitialised byte(s) ... +Syscall param mq_timedreceive(msg_ptr) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param mq_timedreceive(msg_prio) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -3631,6 +3635,10 @@ Syscall param mq_timedsend(msg_prio) contains uninitialised byte(s) Syscall param mq_timedsend(abs_timeout) contains uninitialised byte(s) ... +Syscall param mq_timedsend(msg_ptr) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param mq_timedsend(abs_timeout) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -3714,6 +3722,14 @@ Syscall param sctp_generic_sendmsg(sinfo) contains uninitialised byte(s) Syscall param sctp_generic_sendmsg(flags) contains uninitialised byte(s) ... +Syscall param sctp_generic_sendmsg(msg) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sctp_generic_sendmsg(to) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param sctp_generic_sendmsg(sinfo) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd |
From: D. J. B. <aut...@bo...> - 2024-10-26 14:58:54
|
Paul Floyd via Valgrind-developers writes: > 1. Using a / in environment variables doesn't work with most (all?) shells. Also hyphens; but, as noted in my previous message, this is only a minor disadvantage since one can set the variables using env rather than shell builtins. This is also what the tests in the patch do, and it works for the intended use case of simplifying scripts. Anyway, the revised patch below uses VALGRIND__x_y=z for --x-y=z. (This will also mean tweaking some environment-variable tests in the division patch.) Obviously this creates potential ambiguity from option names that differ only in hyphen vs. underscore, but there don't seem to be any underscores in current option names. Case conversion would be more worrisome since there's some existing uppercase for, e.g., --LL. > 2. -v doesn't include these new options in the "Valgrind options:" summary. The revised patch changes "Valgrind options:" to list the options that were in fact processed, so it includes the environment variables that are used (in the order they're used), while it suppresses ignored options such as --memcheck:foo=bar in the context of --tool=none. The patch also includes a test for this. > 3. --command-line-only=yes doesn't turn off using the new environment > variables. The revised patch changes this, adds a test specifically for it, and adjusts the other env tests to use --command-line-only=no. The patch also corrects docs/xml/manual-core.xml to list the pre-early options for which default options don't work, and to add a description of what --command-line-only=yes does. Full regtest (minus auto-skipped tests) succeeds on Debian 12 on Zen 2 except for one test, namely memcheck/tests/x86-linux/scalar.vgtest, which as I noted earlier is also broken in HEAD: - in frame #1, created by main (scalar.c:29) + in frame #2, created by main (scalar.c:29) Also, I noticed ulimit -n 1024 breaking some tests; ulimit -n 8192 works. ---D. J. Bernstein |
From: Mark W. <ma...@kl...> - 2024-10-25 22:04:15
|
Hi, I had wanted to do an RC1 this Friday. But given it already isn't Friday around here, that isn't going to happen. Sorry. I'll go over some pending bugs/patches this weekend and do the RC1 on Sunday. Cheers, Mark |
From: Paul F. <pa...@so...> - 2024-10-25 19:26:55
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=323f609f26cd63d234a45b8571b6862dd32fc185 commit 323f609f26cd63d234a45b8571b6862dd32fc185 Author: Paul Floyd <pj...@wa...> Date: Fri Oct 25 23:25:26 2024 +0200 FreeBSD Helgrind: turn off check for locks held on exit for FreeBSD 14.2 thread-safe exit included in FreeBSD 14.2-PRERELEASE Diff: --- helgrind/hg_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 2d7eea0d73..bbf95c0ba0 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -1719,11 +1719,11 @@ void evh__pre_thread_ll_exit ( ThreadId quit_tid ) Bool lock_at_exit = False; #if defined(VGO_freebsd) /* Bugzilla 494337 - * temporary (?): turn off this check on FreeBSD 15+ + * 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)() > 1500000) { + if (VG_(getosreldate)() > 1401500) { lock_at_exit = True; } #endif |
From: Paul F. <pj...@wa...> - 2024-10-25 08:24:31
|
On 23-10-24 21:09, D. J. Bernstein wrote: > Mark Wielaard writes: >> The environment variable trick is nice. I wonder if we can generalize >> that. > > Attached is a reasonably straightforward patch that allows environment > variables VALGRIND/--x=y for any x and y with essentially the same > semantics as a subsequent VALGRIND_CLO_CHANGE("--x=y") from the binary. > > As before, the critical difference from --x=y in the command line (or in > VALGRIND_OPTS etc.) is that an unrecognized --x doesn't terminate the > run. This simplifies scripts that want a best-effort attempt to use --x > while falling back to ignoring --x with older versions of valgrind. > > This patch includes some tests (more than the preexisting tests for > VALGRIND_CLO_CHANGE...), internal documentation under docs/internals, > and user-facing documentation inside docs/xml/manual-core.xml. > > A minor disadvantage of VALGRIND/--x=y, compared to VALGRIND_X=y from > the previous patch (for one x), is that VALGRIND/--x=y has to be set > from env rather than from sh builtins. Hi Thanks for the contribution, looks like this could become a nice feature. However it needs some more work. 1. Using a / in environment variables doesn't work with most (all?) shells. 2. -v doesn't include these new options in the "Valgrind options:" summary. 3. --command-line-only=yes doesn't turn off using the new environment variables. A+ Paul |
From: Paul F. <pa...@so...> - 2024-10-25 06:41:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=52796b991354a101766805304f44dca1f2cab742 commit 52796b991354a101766805304f44dca1f2cab742 Author: Paul Floyd <pj...@wa...> Date: Fri Oct 25 08:40:26 2024 +0200 Typos in comments about syscall stacktraces. Diff: --- coregrind/m_stacktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index cd42e5a96f..2cb0f3233e 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -508,7 +508,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, * system calls are implemented with generated wrappers that call through * an interposing table of function pointers. The restult when built with * clang is that code for the frame pointer prolog is generated but then - * an optimized sibling call is made. That means ehe frame pointer is popped + * an optimized sibling call is made. That means the frame pointer is popped * off the stack and a jmp is made to the function in the table rather than * a call. * @@ -516,7 +516,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, * no prolog but a copy of the frame pointer is stored 64byte word below the * stack pointer. If FreeBSD uses the hack for Darwin that sets * ips[i] = *(Addr *)uregs.xsp - 1; - * then the caller of the syyscall gets added twice. + * then the caller of the syscall gets added twice. */ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, |
From: Carl L. <ca...@so...> - 2024-10-24 00:52:38
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3b1a12795cc5cbb57dbf0219375229094c86122e commit 3b1a12795cc5cbb57dbf0219375229094c86122e Author: Carl Love <ce...@li...> Date: Wed Oct 23 18:25:23 2024 -0500 PowerPC, dcbf instruction ISA 2.7 and ISA 3.0 "accepts" L = 0 to 3, ISA 3.1 "accepts: L = 0 to 7. Removed the L field check so valgrind will match the real hardware. For the purposes of Valgrind the dcbf instruction is a NOP anyway so it will not change the behavior of Valgrind. Diff: --- NEWS | 2 ++ VEX/priv/guest_ppc_toIR.c | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index b375fa2687..acefe24188 100644 --- a/NEWS +++ b/NEWS @@ -81,6 +81,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. FUSE_COMPATIBLE_MAY_BLOCK 493970 s390x: Store/restore FPC upon helper call causes slowdown 494252 s390x: incorrect disassembly for LOCHI and friends +495278 PowerPC instruction dcbf should allow the L field values of 4, 6 on + ISA 3.0 and earlier, just ignore the value n-i-bz Improve messages for sigaltstack errors, use specific stack_t member names diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index d05cce394d..94930aa1c9 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -12145,7 +12145,10 @@ static Bool dis_cache_manage ( UInt prefix, UInt theInstr, UChar opc1 = ifieldOPC(theInstr); UChar b21to25 = ifieldRegDS(theInstr); /* The L-field is 2 bits in ISA 3.0 and earlier and 3 bits in ISA 3.1 */ - UChar flag_L = IFIELD(theInstr, 21, (allow_isa_3_1 ? 3 : 2)); + /* Relaxed the test to mach actual hardware, accept all L values from 0 to 7. + The hardware ignores the L value if not supported. 10/23/2024 + UChar flag_L = IFIELD(theInstr, 21, (allow_isa_3_1 ? 3 : 2)); */ + UChar rA_addr = ifieldRegA(theInstr); UChar rB_addr = ifieldRegB(theInstr); UInt opc2 = ifieldOPClo10(theInstr); @@ -12203,15 +12206,19 @@ static Bool dis_cache_manage ( UInt prefix, UInt theInstr, dcbf ra, rb, 0 dcbf dcbf ra, rb, 1 dcbf local dcbf ra, rb, 3 dcbf local primary - dcbf ra, rb, 4 dcbf block fjush to persistent storage isa 3.1 - dcbf ra, rb, 6 dcbf block store to persistent storage isa 3.1 - */ - if (!((flag_L == 0 || flag_L == 1 || flag_L == 3) - || ((flag_L == 4 || flag_L == 6) && allow_isa_3_1 == True))) + dcbf ra, rb, 4 dcbf block fjush to persistent storage isa 3.1 + dcbf ra, rb, 6 dcbf block store to persistent storage isa 3.1 + Relaxed requirement to allow all L values from 0 to 7 to match the + operation of the real hardware. The real hardware accepts the + unsupported L values. 10/23/2024 + + if (!((flag_L == 0 || flag_L == 1 || flag_L == 3) + || ((flag_L == 4 || flag_L == 6) && allow_isa_3_1 == True))) { vex_printf("dis_cache_manage(ppc)(dcbf,flag_L)\n"); return False; } + */ /* nop as far as vex is concerned */ break; |
From: D. J. B. <aut...@bo...> - 2024-10-23 21:36:42
|
Mark Wielaard writes: > The environment variable trick is nice. I wonder if we can generalize > that. Attached is a reasonably straightforward patch that allows environment variables VALGRIND/--x=y for any x and y with essentially the same semantics as a subsequent VALGRIND_CLO_CHANGE("--x=y") from the binary. As before, the critical difference from --x=y in the command line (or in VALGRIND_OPTS etc.) is that an unrecognized --x doesn't terminate the run. This simplifies scripts that want a best-effort attempt to use --x while falling back to ignoring --x with older versions of valgrind. This patch includes some tests (more than the preexisting tests for VALGRIND_CLO_CHANGE...), internal documentation under docs/internals, and user-facing documentation inside docs/xml/manual-core.xml. A minor disadvantage of VALGRIND/--x=y, compared to VALGRIND_X=y from the previous patch (for one x), is that VALGRIND/--x=y has to be set from env rather than from sh builtins. ---D. J. Bernstein P.S. I noticed that memcheck/tests/x86-linux/scalar fails in current HEAD, with or without this patch. A full regtest succeeds otherwise. |
From: D. J. B. <dj...@cr...> - 2024-10-23 21:24:23
|
Attached is a division patch that is the same as the previous division patch except for removing the previous environment-variable handling. This is intended to be orthogonal to the new environment-variable patch, except that a few of the tests in this patch rely on that patch. ---D. J. Bernstein |
From: Paul F. <pa...@so...> - 2024-10-15 06:24:54
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=812e1c8a3a5d5f6ba3f58a846e65ce734d3acd68 commit 812e1c8a3a5d5f6ba3f58a846e65ce734d3acd68 Author: Paul Floyd <pj...@wa...> Date: Tue Oct 15 08:23:43 2024 +0200 Helgrind: use static asserts in client requests Thanks, clangd. Diff: --- helgrind/hg_intercepts.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 50bbc90b61..0068ea7a6f 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -132,7 +132,7 @@ #define DO_CREQ_v_W(_creqF, _ty1F,_arg1F) \ do { \ Word _arg1; \ - assert(sizeof(_ty1F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty1F) == sizeof(Word)); \ _arg1 = (Word)(_arg1F); \ VALGRIND_DO_CLIENT_REQUEST_STMT((_creqF), \ _arg1, 0,0,0,0); \ @@ -141,8 +141,8 @@ #define DO_CREQ_v_WW(_creqF, _ty1F,_arg1F, _ty2F,_arg2F) \ do { \ Word _arg1, _arg2; \ - assert(sizeof(_ty1F) == sizeof(Word)); \ - assert(sizeof(_ty2F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty1F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty2F) == sizeof(Word)); \ _arg1 = (Word)(_arg1F); \ _arg2 = (Word)(_arg2F); \ VALGRIND_DO_CLIENT_REQUEST_STMT((_creqF), \ @@ -153,8 +153,8 @@ _ty2F,_arg2F) \ do { \ Word _res, _arg1, _arg2; \ - assert(sizeof(_ty1F) == sizeof(Word)); \ - assert(sizeof(_ty2F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty1F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty2F) == sizeof(Word)); \ _arg1 = (Word)(_arg1F); \ _arg2 = (Word)(_arg2F); \ _res = VALGRIND_DO_CLIENT_REQUEST_EXPR(2, \ @@ -167,9 +167,9 @@ _ty2F,_arg2F, _ty3F, _arg3F) \ do { \ Word _arg1, _arg2, _arg3; \ - assert(sizeof(_ty1F) == sizeof(Word)); \ - assert(sizeof(_ty2F) == sizeof(Word)); \ - assert(sizeof(_ty3F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty1F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty2F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty3F) == sizeof(Word)); \ _arg1 = (Word)(_arg1F); \ _arg2 = (Word)(_arg2F); \ _arg3 = (Word)(_arg3F); \ @@ -182,10 +182,10 @@ _ty4F, _arg4F) \ do { \ Word _arg1, _arg2, _arg3, _arg4; \ - assert(sizeof(_ty1F) == sizeof(Word)); \ - assert(sizeof(_ty2F) == sizeof(Word)); \ - assert(sizeof(_ty3F) == sizeof(Word)); \ - assert(sizeof(_ty4F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty1F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty2F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty3F) == sizeof(Word)); \ + STATIC_ASSERT(sizeof(_ty4F) == sizeof(Word)); \ _arg1 = (Word)(_arg1F); \ _arg2 = (Word)(_arg2F); \ _arg3 = (Word)(_arg3F); \ |
From: Paul F. <pj...@wa...> - 2024-10-14 06:16:57
|
Hi Mark On 13-10-24 20:10, Mark Wielaard wrote: >> - some VEX items from a github clone of VEX used with python, some >> of these have patches and might be easy to integrate but I'm not >> sure if they have testcases > > Do you have a link? These were reported (or added to) by Matt Borgerson https://bugs.kde.org/show_bug.cgi?id=493004 https://bugs.kde.org/show_bug.cgi?id=493003 https://bugs.kde.org/show_bug.cgi?id=492961 https://bugs.kde.org/show_bug.cgi?id=275024 https://bugs.kde.org/show_bug.cgi?id=492923 Another old one https://bugs.kde.org/show_bug.cgi?id=381819 I also recently looked at a couple related to AMD XOP https://bugs.kde.org/show_bug.cgi?id=339596 https://bugs.kde.org/show_bug.cgi?id=323431 That is an opcode that was added to the AMD 15h family (Bulldozer to Excavator in the 2011-2015 timeframe). It got removed in the Zen family, and all the machines that I have access to are either older than Bulldozer or are Zen EPYC chips. I need to look at QEMU. >> There are a few items (472329 and 485276 [same issue] > > Tricky C++ std::optional usage one on x86_64 the other aarch64. Yes, this needs us to be able to detect that a pointer dereference is safe (memory on the stack) in the VEX frontend. >> I don't think that I've done anything for macOS in the last 6 >> months. There was some activity on the AVX512 bugilla item. For >> Loongson and RISC-V we have patches but I'd like to be sure of >> having someone to maintain them. > > And having regression and/or nightly testers. Agreed A+ Paul |
From: Mark W. <ma...@kl...> - 2024-10-13 20:10:32
|
Hi Paul, On Sun, Oct 13, 2024 at 07:35:28PM +0000, Paul Floyd via Valgrind-developers wrote: > I think it's time to start thinking of making a 3.24 release. Yes, we usually do a major release in April and October. > I'm going to be on holiday from 17 to 24 October with only my iPad, > so no code changes. If we are sticking to October for the 3.24.0 release I think we should do an RC1 on Friday 25 October and a final release on Thursday 31 October. > I'm not sure how much time there is to get more things in. There > have been quite a lot of new bugzilla items recently > - fd related items from the recent Cauldron I hope that Alexandra and I can at least add fixes this/next week for: 493418 Add bad fd usage errors for --track-fds in ML_(fd_allowed) 492422 Please support DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD > - some VEX items from a github clone of VEX used with python, some > of these have patches and might be easy to integrate but I'm not > sure if they have testcases Do you have a link? > - variability issues (which I suspect are all or mostly issues with > the guest testcases). > > It would be nice to get https://bugs.kde.org/show_bug.cgi?id=469782 > in, it seems to be all ready apart from the license files. Yes, the code part seems fine. The licenses themselves are also fine. The only issue is how to refer to the (correct) version of each. > For FreeBSD there have been a few breakages on the 15.0-CURRENT > development branch but nothing too serious. > > There are a few items (472329 and 485276 [same issue] Tricky C++ std::optional usage one on x86_64 the other aarch64. > and 487413/487418) that are high on my priorities for 3.25 but I doubt I > will have anything for 3.24. ARM64 MSR missing register support. > After that there are all the usual big ticket items > - macOS > - Loongson > - RISC-V > - AVX512 > > I don't think that I've done anything for macOS in the last 6 > months. There was some activity on the AVX512 bugilla item. For > Loongson and RISC-V we have patches but I'd like to be sure of > having someone to maintain them. And having regression and/or nightly testers. Cheers, Mark |
From: Paul F. <pj...@wa...> - 2024-10-13 19:35:48
|
Hi all I think it's time to start thinking of making a 3.24 release. I'm going to be on holiday from 17 to 24 October with only my iPad, so no code changes. I'm not sure how much time there is to get more things in. There have been quite a lot of new bugzilla items recently - fd related items from the recent Cauldron - some VEX items from a github clone of VEX used with python, some of these have patches and might be easy to integrate but I'm not sure if they have testcases - variability issues (which I suspect are all or mostly issues with the guest testcases). It would be nice to get https://bugs.kde.org/show_bug.cgi?id=469782 in, it seems to be all ready apart from the license files. For FreeBSD there have been a few breakages on the 15.0-CURRENT development branch but nothing too serious. There are a few items (472329 and 485276 [same issue] and 487413/487418) that are high on my priorities for 3.25 but I doubt I will have anything for 3.24. After that there are all the usual big ticket items - macOS - Loongson - RISC-V - AVX512 I don't think that I've done anything for macOS in the last 6 months. There was some activity on the AVX512 bugilla item. For Loongson and RISC-V we have patches but I'd like to be sure of having someone to maintain them. A+ Paul |