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
(27) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark W. <ma...@kl...> - 2025-02-25 15:59:25
|
--- builder/master.cfg | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/builder/master.cfg b/builder/master.cfg index 7a55e284301a..8fec93d3b09c 100644 --- a/builder/master.cfg +++ b/builder/master.cfg @@ -874,6 +874,8 @@ valgrind_scheduler = schedulers.SingleBranchScheduler( "valgrind-ibm-power9", # "valgrind-ibm-power10", "valgrind-fedora-ppc64le", + "valgrind-fedora-riscv", + "valgrind-ubuntu-riscv", "valgrind-fedora-s390x", "valgrind-debian-ppc64", # "valgrind-debian-arm64", @@ -892,6 +894,8 @@ valgrind_try_scheduler = schedulers.AnyBranchScheduler( # "valgrind-try-ibm-power10", "valgrind-try-fedora-x86_64", "valgrind-try-fedora-ppc64le", + "valgrind-try-fedora-riscv", + "valgrind-try-ubuntu-riscv", "valgrind-try-fedora-s390x", "valgrind-try-debian-ppc64", # "valgrind-try-debian-arm64", @@ -5139,6 +5143,38 @@ valgrind_try_fedora_ppc64le_builder = util.BuilderConfig( factory=valgrind_make_check_factory) c['builders'].append(valgrind_try_fedora_ppc64le_builder) +valgrind_ubuntu_riscv_builder = util.BuilderConfig( + name="valgrind-ubuntu-riscv", + workernames=starfive_workers, + tags=["valgrind", "ubuntu", "riscv"], + collapseRequests=True, + factory=valgrind_make_check_factory) +c['builders'].append(valgrind_ubuntu_riscv_builder) + +valgrind_try_ubuntu_riscv_builder = util.BuilderConfig( + name="valgrind-try-ubuntu-riscv", + workernames=starfive_workers, + tags=["valgrind-try", "ubuntu", "riscv"], + collapseRequests=True, + factory=valgrind_make_check_factory) +c['builders'].append(valgrind_try_ubuntu_riscv_builder) + +valgrind_fedora_riscv_builder = util.BuilderConfig( + name="valgrind-fedora-riscv", + workernames=bpi_f3_workers, + tags=["valgrind", "fedora", "riscv"], + collapseRequests=True, + factory=valgrind_make_check_factory) +c['builders'].append(valgrind_fedora_riscv_builder) + +valgrind_try_fedora_riscv_builder = util.BuilderConfig( + name="valgrind-try-fedora-riscv", + workernames=bpi_f3_workers, + tags=["valgrind-try", "fedora", "riscv"], + collapseRequests=True, + factory=valgrind_make_check_factory) +c['builders'].append(valgrind_try_fedora_riscv_builder) + valgrind_ibm_power9_builder = util.BuilderConfig( name="valgrind-ibm-power9", workernames=["ibm_power9"], -- 2.48.1 |
From: Paul F. <pa...@so...> - 2025-02-16 08:38:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=350f0028fcd8ae6db5b0500ed32fc9aa75ab9e7e commit 350f0028fcd8ae6db5b0500ed32fc9aa75ab9e7e Author: Paul Floyd <pj...@wa...> Date: Sun Feb 16 09:36:54 2025 +0100 Illumos regtest: update bug487993 testcase As I said in bugzilla, "Not tested on Solaris". Now I've tested it and Illumos libc doesn't use 16byte alignment (or at least the assert that alignment is 16bytes fails). Diff: --- memcheck/tests/x86/bug487993.cpp | 7 ++++++- memcheck/tests/x86/bug487993.vgtest | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/x86/bug487993.cpp b/memcheck/tests/x86/bug487993.cpp index 27f43d306c..e1678c9538 100644 --- a/memcheck/tests/x86/bug487993.cpp +++ b/memcheck/tests/x86/bug487993.cpp @@ -12,9 +12,14 @@ struct Test int main() { +#if defined(__sun__) + const auto alignment_mask{0x7UL}; +#else + const auto alignment_mask{0xfUL}; +#endif std::unique_ptr<Test> test = std::make_unique<Test>(); //std::cerr << "test " << test.get() << ' ' << (reinterpret_cast<size_t>(test.get()) & 0xfUL) << '\n'; - assert((reinterpret_cast<size_t>(test.get()) & 0xfUL) == 0); + assert((reinterpret_cast<size_t>(test.get()) & alignment_mask) == 0); } diff --git a/memcheck/tests/x86/bug487993.vgtest b/memcheck/tests/x86/bug487993.vgtest index a5f00a4821..ca5db1515d 100644 --- a/memcheck/tests/x86/bug487993.vgtest +++ b/memcheck/tests/x86/bug487993.vgtest @@ -1,3 +1,3 @@ -prereq: test -e bug487993 && ! ../../../tests/os_test solaris +prereq: test -e bug487993 prog: bug487993 vgopts: -q |
From: Paul F. <pa...@so...> - 2025-02-16 07:44:10
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e9645efebc16724c96c83c8b75f641fc32ad993f commit e9645efebc16724c96c83c8b75f641fc32ad993f Author: Paul Floyd <pj...@wa...> Date: Sun Feb 16 08:43:19 2025 +0100 Illumos regtest: update memcheck dw4 expeected The exp-solaris version was the same as the exp one. Diff: --- memcheck/tests/dw4.stderr.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/dw4.stderr.exp b/memcheck/tests/dw4.stderr.exp index 917dcb57e3..e4b523f982 100644 --- a/memcheck/tests/dw4.stderr.exp +++ b/memcheck/tests/dw4.stderr.exp @@ -35,12 +35,12 @@ Unaddressable byte(s) found during client check request Uninitialised byte(s) found during client check request at 0x........: croak (dw4.c:32) by 0x........: main (dw4.c:89) - Address 0x........ is in the brk data segment 0x........-0x........ + Address 0x........ is in a rw- mapped file /export/home/paulf/valgrind/memcheck/tests/dw4 segment Uninitialised byte(s) found during client check request at 0x........: croak (dw4.c:32) by 0x........: main (dw4.c:91) - Address 0x........ is in the brk data segment 0x........-0x........ + Address 0x........ is in a rw- mapped file /export/home/paulf/valgrind/memcheck/tests/dw4 segment Unaddressable byte(s) found during client check request at 0x........: croak (dw4.c:25) |
From: Paul F. <pa...@so...> - 2025-02-16 07:39:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4a2944627ef6087291c67ec07b45c9c3d7c35e64 commit 4a2944627ef6087291c67ec07b45c9c3d7c35e64 Author: Paul Floyd <pj...@wa...> Date: Sun Feb 16 08:38:58 2025 +0100 Illumos regtest: add a suppression for leak_cpp_intertior libstdc++.supp Diff: --- memcheck/tests/libstdc++.supp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/memcheck/tests/libstdc++.supp b/memcheck/tests/libstdc++.supp index 525b62832f..bcfb4a0648 100644 --- a/memcheck/tests/libstdc++.supp +++ b/memcheck/tests/libstdc++.supp @@ -122,3 +122,15 @@ fun:_setup fun:_rt_boot } +{ + Illumos-leaks-g++-malloc + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:_GLOBAL__sub_I_eh_alloc.cc + fun:call_array + fun:call_init + fun:setup + fun:_setup + fun:_rt_boot +} |
From: Paul F. <pa...@so...> - 2025-02-16 06:59:43
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a1f0a7daeb3ef4c98ad54821419fe02597592265 commit a1f0a7daeb3ef4c98ad54821419fe02597592265 Author: Paul Floyd <pj...@wa...> Date: Sun Feb 16 07:57:43 2025 +0100 Illumos regtest: getrandom uses a different syscall number from Solaris It doesn't look like the syscall interface changed, just the number. Diff: --- coregrind/m_syswrap/syswrap-solaris.c | 4 ++-- memcheck/tests/solaris/Makefile.am | 1 + .../tests/solaris/scalar_getrandom.stderr.exp-illumos | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index faeea15f54..3da0d216cd 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -10947,7 +10947,7 @@ static SyscallTableEntry syscall_table[] = { SOLXY(__NR_uuidsys, sys_uuidsys), /* 124 */ #endif /* SOLARIS_UUIDSYS_SYSCALL */ #if defined(HAVE_MREMAP) - GENX_(__NR_mremap, sys_mremap), /* 126 */ + GENX_(__NR_mremap, sys_mremap), /* 126 (Solaris only, not Illumos) */ #endif /* HAVE_MREMAP */ SOLX_(__NR_mmapobj, sys_mmapobj), /* 127 */ GENX_(__NR_setrlimit, sys_setrlimit), /* 128 */ @@ -10968,7 +10968,7 @@ static SyscallTableEntry syscall_table[] = { SOLX_(__NR_seteuid, sys_seteuid), /* 141 */ SOLX_(__NR_forksys, sys_forksys), /* 142 */ #if defined(SOLARIS_GETRANDOM_SYSCALL) - SOLXY(__NR_getrandom, sys_getrandom), /* 143 */ + SOLXY(__NR_getrandom, sys_getrandom), /* 143 (Solaris) 126 (Illumos) */ #endif /* SOLARIS_GETRANDOM_SYSCALL */ SOLXY(__NR_sigtimedwait, sys_sigtimedwait), /* 144 */ SOLX_(__NR_yield, sys_yield), /* 146 */ diff --git a/memcheck/tests/solaris/Makefile.am b/memcheck/tests/solaris/Makefile.am index 7cf1ac07ce..0c0d551ed0 100644 --- a/memcheck/tests/solaris/Makefile.am +++ b/memcheck/tests/solaris/Makefile.am @@ -34,6 +34,7 @@ EXTRA_DIST = \ scalar_auditon_stat.stderr.exp scalar_auditon_stat.stdout.exp scalar_auditon_stat.vgtest \ scalar_frealpathat.stderr.exp scalar_frealpathat.stdout.exp scalar_frealpathat.vgtest \ scalar_getrandom.stderr.exp scalar_getrandom.stdout.exp scalar_getrandom.vgtest \ + scalar_getrandom.stderr.exp-illumos \ scalar_ioctl.stderr.exp scalar_ioctl.stdout.exp scalar_ioctl.vgtest \ scalar_lwp_kill.stderr.exp scalar_lwp_kill.stdout.exp scalar_lwp_kill.vgtest \ scalar_lwp_name.stderr.exp scalar_lwp_name.stdout.exp scalar_lwp_name.vgtest \ diff --git a/memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos b/memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos new file mode 100644 index 0000000000..7e84a4849f --- /dev/null +++ b/memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos @@ -0,0 +1,16 @@ +--------------------------------------------------------- +126: SYS_getrandom (getrandom) 3s 1m +--------------------------------------------------------- +Syscall param getrandom(buf) contains uninitialised byte(s) + ... + +Syscall param getrandom(buflen) contains uninitialised byte(s) + ... + +Syscall param getrandom(flags) contains uninitialised byte(s) + ... + +Syscall param getrandom(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + |
From: Paul F. <pa...@so...> - 2025-02-15 20:11:22
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8dc7dcf1fa595e5c21b34f73e45190e6d2b5f09d commit 8dc7dcf1fa595e5c21b34f73e45190e6d2b5f09d Author: Paul Floyd <pj...@wa...> Date: Sat Feb 15 20:30:11 2025 +0100 Illumos regtest: improve filters filter_fdleak - move the Solaris filters earlier, there is a multiline awk filter that was being affected by the arm/FreeBSD filters coredump filter is different between Solaris and Illumos Diff: --- none/tests/filter_fdleak | 19 ++++++++++--------- none/tests/solaris/filter_coredump_many_threads_post | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index 260c6e24c0..f84008b6db 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -16,6 +16,16 @@ perl -p -e 's/^Open file descriptor [0-9]*:$/Open file descriptor ...:/' | perl -p -e 's/File descriptor [0-9]*: .* is already closed/File descriptor ...: ... is already closed/' | perl -p -e 's/127.0.0.1:[0-9]*/127.0.0.1:.../g' | perl -p -e 's/socket\.c:[1-9][0-9]*/in \/...libc.../' | + +# Solaris specific fdleak filters +perl -p -e 's/ __close / close /' | +perl -p -e 's/ __write / write /' | +sed '/ _so_socket /d;' | +awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | +awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | +sed '/__open/d' | +sed 's/__systemcall6/creat/' | + # arm systems substitute open for creat perl -p -e 's/open \(open64\.c:[1-9][0-9]*\)/creat (in \/...libc...)/' | perl -p -e "s/: open \(/: creat (/" | @@ -28,15 +38,6 @@ sed '/by 0x........: close (in \/...libc...)/d' | sed '/by 0x........: creat (in \/...libc...)/d' | sed '/by 0x........: write (in \/...libc...)/d' | -# Solaris specific fdleak filters -perl -p -e 's/ __close / close /' | -perl -p -e 's/ __write / write /' | -sed '/ _so_socket /d;' | -awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | -awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | -sed '/__open/d' | -sed 's/__systemcall6/creat/' | - # Stack traces showing where fds were created have lots of variations: # different numbers of entries, line numbers or not depending on whether # libc debug info is present, 'main' vs. '(below main)', etc. diff --git a/none/tests/solaris/filter_coredump_many_threads_post b/none/tests/solaris/filter_coredump_many_threads_post index 2d033700ef..e8284d1977 100755 --- a/none/tests/solaris/filter_coredump_many_threads_post +++ b/none/tests/solaris/filter_coredump_many_threads_post @@ -16,4 +16,5 @@ perl -p -e 's/^(THREAD)\s+(STATE)\s+(SOBJ)\s+(COUNT)\s*$/$1 $2 $3 $4\n/' | \ perl -p -e 's/^(\d+)\s+(UNPARKED)\s+(\S+)\s+(\d+)/$1 $2 $3 $4/g' | \ perl -p -e 's/^\s*libc.*.so.1/libc.so.1/g' | \ perl -p -e 's/\+0x[0-9A-Fa-f]+//g' | -sed 's/^ *//g' +sed 's/^ *//g' | +sed '/_start_crt/d' |
From: Paul F. <pa...@so...> - 2025-02-15 15:26:36
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=01a6ea5b031e48f35748a3df4e37bdaa25d61264 commit 01a6ea5b031e48f35748a3df4e37bdaa25d61264 Author: Paul Floyd <pj...@wa...> Date: Sat Feb 15 16:25:23 2025 +0100 Illumos regtest: add a filter for crt start Was causing a failure in one Massif test Diff: --- tests/filter_libc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/filter_libc b/tests/filter_libc index 160f1a4b4d..d3c875d90f 100755 --- a/tests/filter_libc +++ b/tests/filter_libc @@ -26,6 +26,9 @@ while (<>) s#_start1 \(src/lib/csu/i386/crt1_c.c.*#(below main)#; s#__libc_start1 \(in /...libc...\)#(below main)#; + # on Illumos + s#_start_crt \(in .*#(below main)#; + # filter out the exact libc-start.c:### line number. (ppc64*) s/\(libc-start.c:[0-9]*\)$/(in \/...libc...)/; |
From: Paul F. <pa...@so...> - 2025-02-14 19:48:38
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ba5e30347fa5691cc9b0c4c620ee41daa135e610 commit ba5e30347fa5691cc9b0c4c620ee41daa135e610 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 14 20:45:02 2025 +0100 Bug 496370 - Illumos: signal handling is broken This isn't a great fix, it just turns off optimization for a couple of signal frame functions. If ever I have time I'll try to find out out which part of -O1 is responsible, and maybe from that also exactly what part of the code. Diff: --- NEWS | 2 ++ coregrind/m_syswrap/syswrap-solaris.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1c627c7744..fb7642bb19 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 494327 Crash when running Helgrind built with #define TRACE_PTH_FNS 1 494337 All threaded applications cause still holding lock errors 495488 Add FreeBSD getrlimitusage syscall wrapper +496370 Illumos: signal handling is broken 496571 False positive for null key passed to bpf_map_get_next_key syscall. 469782 Valgrind does not support zstd-compressed debug sections 497130 Recognize new DWARF5 DW_LANG constants @@ -53,6 +54,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 499183 FreeBSD: differences in avx-vmovq output 499212 mmap() with MAP_ALIGNED() returns unaligned pointer + 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. diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 9abeb85001..faeea15f54 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -511,6 +511,9 @@ ULong ML_(fletcher64)(UInt *buf, SizeT blocks) return (sum2 << 32) | sum1; } +#pragma GCC push_options +#pragma GCC optimize ("O0") + /* Save a complete context (VCPU state, sigmask) of a given client thread into the vki_ucontext_t structure. This structure is supposed to be allocated in the client memory, a caller must make sure that the memory can @@ -666,6 +669,8 @@ void VG_(restore_context)(ThreadId tid, vki_ucontext_t *uc, CorePart part, } } +#pragma GCC pop_options + /* Set a client stack associated with a given thread id according to values passed in the vki_stack_t structure. */ static void set_stack(ThreadId tid, vki_stack_t *st) |
From: Paul F. <pa...@so...> - 2025-02-14 19:43:40
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=97e1ae53067200f6046a0e23f03392ecc9ed30e4 commit 97e1ae53067200f6046a0e23f03392ecc9ed30e4 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 14 20:42:33 2025 +0100 Soalris suppressions for pthread_once and gomp init Diff: --- solaris11.supp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/solaris11.supp b/solaris11.supp index ef8c5b5a42..e3ef0b7843 100644 --- a/solaris11.supp +++ b/solaris11.supp @@ -49,4 +49,17 @@ fun:_ZNSt5mutex4lockEv fun:_ZNSt10lock_guardISt5mutexEC1ERS0_ } +{ + Solaris:pthread_once + Helgrind:Race + fun:pthread_once +} +{ + Solaris:gomp_init_task + drd:ConflictingAccess + fun:priority_queue_init + fun:gomp_init_task + fun:gomp_team_start + fun:GOMP_parallel +} |
From: Paul F. <pa...@so...> - 2025-02-14 19:38:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=612a84d112b70feea6b76d5a8f9a8c65c0cc52bb commit 612a84d112b70feea6b76d5a8f9a8c65c0cc52bb Author: Paul Floyd <pj...@wa...> Date: Fri Feb 14 20:36:52 2025 +0100 Solaris regtest: add a suppression to helgrind/tests/bug392331.supp Diff: --- helgrind/tests/bug392331.supp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helgrind/tests/bug392331.supp b/helgrind/tests/bug392331.supp index d76ec469e0..27081c771d 100644 --- a/helgrind/tests/bug392331.supp +++ b/helgrind/tests/bug392331.supp @@ -11,3 +11,9 @@ fun:pthread_cond_signal_WRK fun:_ZNSt3__118condition_variable10notify_oneEv } +{ + Variation for Solaris + Helgrind:Dubious + fun:pthread_cond_signal_WRK + fun:cond_signal +} |
From: Paul F. <pa...@so...> - 2025-02-14 18:35:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8e76b87ddc90e6fa7262c3ee08eb14405b7eaa18 commit 8e76b87ddc90e6fa7262c3ee08eb14405b7eaa18 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 14 19:34:27 2025 +0100 Solaris regtest: add a suppression for GCC 12 libstdc++ memcheck leak_cpp_interior Diff: --- memcheck/tests/libstdc++.supp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/memcheck/tests/libstdc++.supp b/memcheck/tests/libstdc++.supp index 2cac057305..525b62832f 100644 --- a/memcheck/tests/libstdc++.supp +++ b/memcheck/tests/libstdc++.supp @@ -109,3 +109,16 @@ obj:/libexec/ld-elf*.so.1 obj:/libexec/ld-elf*.so.1 } +{ + Solaris-leaks-g++-malloc + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:_GLOBAL__sub_I_eh_alloc.cc + obj:*/libstdc++.so* + fun:_init + fun:call_init + fun:setup + fun:_setup + fun:_rt_boot +} |
From: Paul F. <pa...@so...> - 2025-02-14 07:16:35
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=930a17c6cbe27fa923c1b22ee1deae9875614b5f commit 930a17c6cbe27fa923c1b22ee1deae9875614b5f Author: Paul Floyd <pj...@wa...> Date: Fri Feb 14 08:15:00 2025 +0100 Solaris regtest: add to fdleak filter for file_dclose Diff: --- none/tests/filter_fdleak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index 6ad1ac6f11..260c6e24c0 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -34,6 +34,8 @@ perl -p -e 's/ __write / write /' | sed '/ _so_socket /d;' | awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | +sed '/__open/d' | +sed 's/__systemcall6/creat/' | # Stack traces showing where fds were created have lots of variations: # different numbers of entries, line numbers or not depending on whether |
From: Paul F. <pa...@so...> - 2025-02-09 07:44:57
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=79d09d0821ed55aec8ddf07c1207c9e290d1b1c9 commit 79d09d0821ed55aec8ddf07c1207c9e290d1b1c9 Author: Paul Floyd <pj...@wa...> Date: Sun Feb 9 08:21:58 2025 +0100 Revert "FreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue" This reverts commit 98cc2209b5c1690a8d181d372c6a248fbd3b2134. Diff: --- gdbserver_tests/sleepers.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gdbserver_tests/sleepers.c b/gdbserver_tests/sleepers.c index e884c9b8fe..b433c19847 100644 --- a/gdbserver_tests/sleepers.c +++ b/gdbserver_tests/sleepers.c @@ -15,7 +15,7 @@ static int sleepms = 1000; // in each loop, will sleep "sleepms" milliseconds static int burn = 0; // after each sleep, will burn cpu in a tight 'burn' loop static void setup_sigusr_handler(void); // sigusr1 and 2 sigaction setup. -static pid_t gettid_sys(void) +static pid_t gettid_sys() { #ifdef __NR_gettid return syscall(__NR_gettid); @@ -32,7 +32,7 @@ void whoami(char *msg) } -static void do_burn(void) +static void do_burn () { int i; int loopnr = 0; @@ -126,12 +126,6 @@ static void setaffinity(void) CPU_ZERO(&single_cpu); CPU_SET(1, &single_cpu); (void) sched_setaffinity(0, sizeof(single_cpu), &single_cpu); -#endif -#ifdef VGO_freebsd - cpu_set_t single_cpu; - CPU_ZERO(&single_cpu); - CPU_SET(1, &single_cpu); - pthread_setaffinity_np(pthread_self(), sizeof(single_cpu), &single_cpu); #endif // GDBTD: equivalent for Darwin ? } |
From: Paul F. <pa...@so...> - 2025-02-08 19:48:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=f2bb8c345f4e35deae99b904e77d23678744037b commit f2bb8c345f4e35deae99b904e77d23678744037b Author: Paul Floyd <pj...@wa...> Date: Sat Feb 8 21:47:38 2025 +0100 FreeBSD regtest: a couple of updates for FreeBSD 13.5 x86 Diff: --- none/tests/file_dclose.supp | 9 ++++++++- none/tests/filter_fdleak | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/none/tests/file_dclose.supp b/none/tests/file_dclose.supp index d812adeada..7c8bacae1f 100644 --- a/none/tests/file_dclose.supp +++ b/none/tests/file_dclose.supp @@ -3,5 +3,12 @@ CoreError:FdBadClose fun:*close* fun:closefile - #fun:main } +{ + badclose_2 + CoreError:FdBadClose + fun:_close + fun:close + fun:closefile +} + diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index 1f4a8c7bd6..6ad1ac6f11 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -26,6 +26,7 @@ perl -p -e "s/write\.c:[1-9][0-9]*/in \/...libc.../" | perl -p -e 's/ _close / close /;s/ _openat / creat /;s/ _write/ write/;s/internet/AF_INET socket 4: 127.0.0.1:... <-> 127.0.0.1:.../' | sed '/by 0x........: close (in \/...libc...)/d' | sed '/by 0x........: creat (in \/...libc...)/d' | +sed '/by 0x........: write (in \/...libc...)/d' | # Solaris specific fdleak filters perl -p -e 's/ __close / close /' | |
From: Paul F. <pa...@so...> - 2025-02-08 09:37:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=44e0c761af15114c42c76d2102b7fe01358de2f6 commit 44e0c761af15114c42c76d2102b7fe01358de2f6 Author: Paul Floyd <pj...@wa...> Date: Sat Feb 8 10:35:38 2025 +0100 Linux regtest: broaden none/tests/linux/bug498317.supp fcntl function name is versioned on Raspberry Pi OS (fcntl@@GLIBC_2.28) so use a wildcard in the suppression. Diff: --- none/tests/linux/bug498317.supp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/linux/bug498317.supp b/none/tests/linux/bug498317.supp index f345f3771f..4e204304f0 100644 --- a/none/tests/linux/bug498317.supp +++ b/none/tests/linux/bug498317.supp @@ -2,7 +2,7 @@ test suppression of FdBadUse CoreError:FdBadUse ... - fun:fcntl + fun:fcntl* fun:main } |
From: Paul F. <pa...@so...> - 2025-02-07 20:31:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=98cc2209b5c1690a8d181d372c6a248fbd3b2134 commit 98cc2209b5c1690a8d181d372c6a248fbd3b2134 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 7 21:29:23 2025 +0100 FreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue Doesn't seem to help, the test is still very flaky on recent (2025) hardware. Diff: --- gdbserver_tests/sleepers.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gdbserver_tests/sleepers.c b/gdbserver_tests/sleepers.c index b433c19847..e884c9b8fe 100644 --- a/gdbserver_tests/sleepers.c +++ b/gdbserver_tests/sleepers.c @@ -15,7 +15,7 @@ static int sleepms = 1000; // in each loop, will sleep "sleepms" milliseconds static int burn = 0; // after each sleep, will burn cpu in a tight 'burn' loop static void setup_sigusr_handler(void); // sigusr1 and 2 sigaction setup. -static pid_t gettid_sys() +static pid_t gettid_sys(void) { #ifdef __NR_gettid return syscall(__NR_gettid); @@ -32,7 +32,7 @@ void whoami(char *msg) } -static void do_burn () +static void do_burn(void) { int i; int loopnr = 0; @@ -126,6 +126,12 @@ static void setaffinity(void) CPU_ZERO(&single_cpu); CPU_SET(1, &single_cpu); (void) sched_setaffinity(0, sizeof(single_cpu), &single_cpu); +#endif +#ifdef VGO_freebsd + cpu_set_t single_cpu; + CPU_ZERO(&single_cpu); + CPU_SET(1, &single_cpu); + pthread_setaffinity_np(pthread_self(), sizeof(single_cpu), &single_cpu); #endif // GDBTD: equivalent for Darwin ? } |
From: Paul F. <pa...@so...> - 2025-02-07 11:40:19
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b918889d6cf18243df8e30a3462efa093b6372ac commit b918889d6cf18243df8e30a3462efa093b6372ac Author: Paul Floyd <pj...@wa...> Date: Fri Feb 7 12:37:04 2025 +0100 Remove exec bits on a few files and delete a Solaris regtest binary Pushed the binary by mistake in Sept 2023! Diff: --- VEX/priv/guest_nanomips_toIR.c | 0 VEX/priv/host_nanomips_defs.c | 0 drd/tests/pth_detached3.c | 0 memcheck/tests/sized_aligned_new_delete_misaligned | Bin 42384 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/VEX/priv/guest_nanomips_toIR.c b/VEX/priv/guest_nanomips_toIR.c old mode 100755 new mode 100644 diff --git a/VEX/priv/host_nanomips_defs.c b/VEX/priv/host_nanomips_defs.c old mode 100755 new mode 100644 diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c old mode 100755 new mode 100644 diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned b/memcheck/tests/sized_aligned_new_delete_misaligned deleted file mode 100755 index 1c69036c16..0000000000 Binary files a/memcheck/tests/sized_aligned_new_delete_misaligned and /dev/null differ |
From: Paul F. <pa...@so...> - 2025-02-07 07:39:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=410ff526ea55f22cb4f301fde1a372046ab2149e commit 410ff526ea55f22cb4f301fde1a372046ab2149e Author: Paul Floyd <pj...@wa...> Date: Fri Feb 7 08:38:38 2025 +0100 FreeBSD regtest: add arm64 expected for auxv_script test Diff: --- none/tests/freebsd/Makefile.am | 1 + none/tests/freebsd/auxv_script.stderr.exp-arm64 | 30 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 667445aa15..15ea01cc9e 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -13,6 +13,7 @@ EXTRA_DIST = \ auxv.stderr.exp-arm64 \ auxv_script.vgtest \ auxv_script.stderr.exp \ + auxv_script.stderr.exp-arm64 \ bug452274.vgtest \ bug452274.stderr.exp \ bug498317.vgtest bug498317.stderr.exp \ diff --git a/none/tests/freebsd/auxv_script.stderr.exp-arm64 b/none/tests/freebsd/auxv_script.stderr.exp-arm64 new file mode 100644 index 0000000000..738a284dcb --- /dev/null +++ b/none/tests/freebsd/auxv_script.stderr.exp-arm64 @@ -0,0 +1,30 @@ +val: AT_PHDR int: 03 ptr: 0x........ +val: AT_PHENT int: 04 ptr: 0x........ +val: AT_PHNUM int: 05 ptr: 0x........ +val: AT_PAGESZ int: 06 ptr: 0x........ +val: AT_FLAGS int: 08 ptr: 0x........ +val: AT_ENTRY int: 09 ptr: 0x........ +val: AT_BASE int: 07 ptr: 0x........ +val: AT_EHDRFLAGS int: 24 ptr: 0x........ +val: AT_EXECPATH int: 15 ptr: 0x........ +EXECPATH: BASEDIR/valgrind/none/tests/freebsd/auxv +val: AT_OSRELDATE int: 18 ptr: 0x........ +val: AT_CANARY int: 16 ptr: 0x........ +val: AT_CANARYLEN int: 17 ptr: 0x........ +val: AT_NCPUS int: 19 ptr: 0x........ +val: AT_PAGESIZES int: 20 ptr: 0x........ +val: AT_PAGESIZESLEN int: 21 ptr: 0x........ +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_STACKPROT int: 23 ptr: 0x........ +val: AT_HWCAP int: 25 ptr: 0x........ +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_ARGC int: 28 ptr: 0x........ +val: AT_ARGV int: 29 ptr: 0x........ +ARGV: ./auxv +val: AT_ENVC int: 30 ptr: 0x........ +val: AT_ENVV int: 31 ptr: 0x........ +val: AT_PS_STRINGS int: 32 ptr: 0x........ +PS_STRINGS ARGV: ./auxv +val: AT_USRSTACKBASE int: 35 ptr: 0x........ +val: AT_USRSTACKLIM int: 36 ptr: 0x........ |
From: Paul F. <pa...@so...> - 2025-02-06 20:50:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=fc9ae97c3d3b93a021328c029503070d2acdc344 commit fc9ae97c3d3b93a021328c029503070d2acdc344 Author: Paul Floyd <pj...@wa...> Date: Thu Feb 6 21:49:59 2025 +0100 FreeBSD DRD: cleanup suppressions There were quite a lot that duplicated the top level libthr.so.3 suppression. Diff: --- freebsd-drd.supp | 47 +---------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/freebsd-drd.supp b/freebsd-drd.supp index 2f3c8066a9..c0767aadf7 100644 --- a/freebsd-drd.supp +++ b/freebsd-drd.supp @@ -23,28 +23,7 @@ fun:f*lockfile } { - DRD-MANY1 - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - obj:/libexec/ld-elf*.so.1 -} -{ - DRD-MANY2 - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - obj:*/lib*/libthr.so.3 - obj:/libexec/ld-elf*.so.1 -} -{ - DRD-MANY3 - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - obj:*/lib*/libthr.so.3 - obj:*/lib*/libthr.so.3 - obj:/libexec/ld-elf*.so.1 -} -{ - DRD-MANY4 + DRD-MANY drd:ConflictingAccess obj:*/lib*/libthr.so.3 } @@ -75,14 +54,6 @@ drd:ConflictingAccess fun:.omp_outlined* } -{ - DRD-LIBGOMP4 - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - obj:*/lib*/libthr.so.3 - obj:*/lib*/libthr.so.3 - fun:pthread_setspecific -} { DRD-UNWIND1 drd:ConflictingAccess @@ -135,22 +106,6 @@ obj:*/lib*/libgcc_s.so.1 obj:*/lib*/libgcc_s.so.1 } -{ - DRD-DLOPEN - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - obj:/libexec/ld-elf*.so.1 - obj:/libexec/ld-elf*.so.1 - obj:/libexec/ld-elf*.so.1 - fun:dlopen -} -{ - DRD-LD-ELF - drd:ConflictingAccess - obj:*/lib*/libthr.so.3 - ... - obj:/libexec/ld-elf*.so.1 -} { DRD-SNPRINTF drd:ConflictingAccess |
From: Paul F. <pa...@so...> - 2025-02-06 20:04:37
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1fefba79021779d840bbf8cebc43e40c74b40f31 commit 1fefba79021779d840bbf8cebc43e40c74b40f31 Author: Paul Floyd <pj...@wa...> Date: Thu Feb 6 20:23:42 2025 +0100 Bug 396415 - Valgrind is not looking up $ORIGIN rpath of shebang programs Diff: --- NEWS | 1 + coregrind/m_initimg/initimg-darwin.c | 7 ---- coregrind/m_initimg/initimg-freebsd.c | 59 ++++++++++++++++++++++++++----- coregrind/m_initimg/initimg-linux.c | 7 ---- coregrind/m_initimg/initimg-solaris.c | 7 ---- coregrind/m_ume/elf.c | 7 ++++ coregrind/m_ume/macho.c | 5 +++ none/tests/freebsd/Makefile.am | 2 ++ none/tests/freebsd/auxv_script | 1 + none/tests/freebsd/auxv_script.stderr.exp | 29 +++++++++++++++ none/tests/freebsd/auxv_script.vgtest | 4 +++ 11 files changed, 100 insertions(+), 29 deletions(-) diff --git a/NEWS b/NEWS index ca5bfb23f4..1c627c7744 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,7 @@ bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. +396415 Valgrind is not looking up $ORIGIN rpath of shebang programs 487296 --track-fds=yes and --track-fds=all report erroneous information when fds 0, 1, or 2 are used as non-std 489913 WARNING: unhandled amd64-linux syscall: 444 (landlock_create_ruleset) diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index 7bac7dc0d1..57fbd0bf75 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -61,7 +61,6 @@ static void load_client ( /*OUT*/ExeInfo* info, { const HChar* exe_name; Int ret; - SysRes res; vg_assert( VG_(args_the_exename) != NULL); exe_name = VG_(find_executable)( VG_(args_the_exename) ); @@ -76,12 +75,6 @@ static void load_client ( /*OUT*/ExeInfo* info, // The client was successfully loaded! Continue. - /* Get hold of a file descriptor which refers to the client - executable. This is needed for attaching to GDB. */ - res = VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR); - if (!sr_isError(res)) - VG_(cl_exec_fd) = sr_Res(res); - /* Copy necessary bits of 'info' that were filled in */ *client_ip = info->init_ip; } diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 6749e849fc..cb98eb9144 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -64,7 +64,6 @@ static void load_client ( /*OUT*/ExeInfo* info, { const HChar* exe_name; Int ret; - SysRes res; vg_assert( VG_(args_the_exename) != NULL); exe_name = VG_(find_executable)( VG_(args_the_exename) ); @@ -83,13 +82,6 @@ static void load_client ( /*OUT*/ExeInfo* info, // The client was successfully loaded! Continue. - /* Get hold of a file descriptor which refers to the client - executable. This is needed for attaching to GDB. */ - res = VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR); - if (!sr_isError(res)) { - VG_(cl_exec_fd) = sr_Res(res); - } - /* Copy necessary bits of 'info' that were filled in */ *client_ip = info->init_ip; *client_toc = info->init_toc; @@ -342,6 +334,53 @@ static const struct auxv *find_auxv(const UWord* sp) return (const struct auxv *)sp; } +static Bool try_get_interp(const HChar* args_exe, HChar* interp_out) +{ + HChar hdr[4096]; + Int len = sizeof hdr; + SysRes res; + Int fd; + HChar* end; + HChar* cp; + HChar* interp; + + res = VG_(open)(args_exe, VKI_O_RDONLY, 0); + if (sr_isError(res)) { + return False; + } else { + fd = sr_Res(res); + } + + res = VG_(pread)(fd, hdr, len, 0); + + if (sr_isError(res)) { + VG_(close)(fd); + return False; + } else { + len = sr_Res(res); + } + + if (0 != VG_(memcmp)(hdr, "#!", 2)) { + VG_(close)(fd); + return False; + } + + end = hdr + len; + interp = hdr + 2; + while (interp < end && (*interp == ' ' || *interp == '\t')) + interp++; + + for (cp = interp; cp < end && !VG_(isspace)(*cp); cp++) + ; + + *cp = '\0'; + + VG_(sprintf)(interp_out, "%s", interp); + + VG_(close)(fd); + return True; +} + /* ---------------------------------------------------------------- This sets up the client's initial stack, containing the args, @@ -425,6 +464,10 @@ static Addr setup_client_stack(const void* init_sp, vg_assert( VG_(args_for_client) ); const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); + HChar interp_name[VKI_PATH_MAX]; + if (try_get_interp(exe_name, interp_name)) { + exe_name = interp_name; + } HChar resolved_name[VKI_PATH_MAX]; VG_(realpath)(exe_name, resolved_name); diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index 5359189bf6..feec1e5f11 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -70,7 +70,6 @@ static void load_client ( /*MOD*/ExeInfo* info, { const HChar* exe_name; Int ret; - SysRes res; vg_assert( VG_(args_the_exename) != NULL); exe_name = VG_(find_executable)( VG_(args_the_exename) ); @@ -88,12 +87,6 @@ static void load_client ( /*MOD*/ExeInfo* info, // The client was successfully loaded! Continue. - /* Get hold of a file descriptor which refers to the client - executable. This is needed for attaching to GDB. */ - res = VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR); - if (!sr_isError(res)) - VG_(cl_exec_fd) = sr_Res(res); - /* Copy necessary bits of 'info' that were filled in */ *client_ip = info->init_ip; *client_toc = info->init_toc; diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index 1e9e3fd061..4fa94b8c4c 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -65,7 +65,6 @@ static void load_client(/*OUT*/ExeInfo *info, { const HChar *exe_name; Int ret; - SysRes res; vg_assert(VG_(args_the_exename)); exe_name = VG_(find_executable)(VG_(args_the_exename)); @@ -96,12 +95,6 @@ static void load_client(/*OUT*/ExeInfo *info, } VG_(strcpy)(out_exe_name, exe_name); - /* Get hold of a file descriptor which refers to the client executable. - This is needed for attaching to GDB. */ - res = VG_(open)(exe_name, VKI_O_RDONLY, VKI_S_IRUSR); - if (!sr_isError(res)) - VG_(cl_exec_fd) = sr_Res(res); - /* Set initial brk values. */ if (info->ldsoexec) { VG_(brk_base) = VG_(brk_limit) = -1; diff --git a/coregrind/m_ume/elf.c b/coregrind/m_ume/elf.c index a850a50cfa..bad7e5ee6b 100644 --- a/coregrind/m_ume/elf.c +++ b/coregrind/m_ume/elf.c @@ -41,6 +41,7 @@ #include "pub_core_mallocfree.h" // VG_(malloc), VG_(free) #include "pub_core_vkiscnums.h" #include "pub_core_syscall.h" // VG_(strerror) +#include "pub_core_clientstate.h" #include "pub_core_ume.h" // self #include "priv_ume.h" @@ -876,6 +877,12 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) VG_(free)(e->p); VG_(free)(e); + /* Get hold of a file descriptor which refers to the client + executable. This is needed for attaching to GDB. */ + SysRes res = VG_(dup)(fd); + if (!sr_isError(res)) + VG_(cl_exec_fd) = sr_Res(res); + return 0; } diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index 046d174933..6d65574e44 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -41,6 +41,7 @@ #include "pub_core_machine.h" // VG_ELF_CLASS (XXX: which should be moved) #include "pub_core_mallocfree.h" // VG_(malloc), VG_(free) #include "pub_core_syscall.h" // VG_(strerror) +#include "pub_core_clientstate.h" #include "pub_core_ume.h" // self #include "priv_ume.h" @@ -857,6 +858,10 @@ Int VG_(load_macho)(Int fd, const HChar *name, ExeInfo *info) info->executable_path = VG_(strdup)("ume.macho.executable_path", name); + SysRes res = VG_(dup)(fd); + if (!sr_isError(res)) + VG_(cl_exec_fd) = sr_Res(res); + return 0; } diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index d1f7759ec9..667445aa15 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -11,6 +11,8 @@ EXTRA_DIST = \ auxv.stderr.exp-freebsd131 \ auxv.stderr.exp-freebsd14 \ auxv.stderr.exp-arm64 \ + auxv_script.vgtest \ + auxv_script.stderr.exp \ bug452274.vgtest \ bug452274.stderr.exp \ bug498317.vgtest bug498317.stderr.exp \ diff --git a/none/tests/freebsd/auxv_script b/none/tests/freebsd/auxv_script new file mode 100755 index 0000000000..7794012c1f --- /dev/null +++ b/none/tests/freebsd/auxv_script @@ -0,0 +1 @@ +#!./auxv diff --git a/none/tests/freebsd/auxv_script.stderr.exp b/none/tests/freebsd/auxv_script.stderr.exp new file mode 100644 index 0000000000..dcca09f63c --- /dev/null +++ b/none/tests/freebsd/auxv_script.stderr.exp @@ -0,0 +1,29 @@ +val: AT_PHDR int: 03 ptr: 0x........ +val: AT_PHENT int: 04 ptr: 0x........ +val: AT_PHNUM int: 05 ptr: 0x........ +val: AT_PAGESZ int: 06 ptr: 0x........ +val: AT_FLAGS int: 08 ptr: 0x........ +val: AT_ENTRY int: 09 ptr: 0x........ +val: AT_BASE int: 07 ptr: 0x........ +val: AT_EHDRFLAGS int: 24 ptr: 0x........ +val: AT_EXECPATH int: 15 ptr: 0x........ +EXECPATH: BASEDIR/valgrind/none/tests/freebsd/auxv +val: AT_OSRELDATE int: 18 ptr: 0x........ +val: AT_CANARY int: 16 ptr: 0x........ +val: AT_CANARYLEN int: 17 ptr: 0x........ +val: AT_NCPUS int: 19 ptr: 0x........ +val: AT_PAGESIZES int: 20 ptr: 0x........ +val: AT_PAGESIZESLEN int: 21 ptr: 0x........ +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_STACKPROT int: 23 ptr: 0x........ +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_ARGC int: 28 ptr: 0x........ +val: AT_ARGV int: 29 ptr: 0x........ +ARGV: ./auxv +val: AT_ENVC int: 30 ptr: 0x........ +val: AT_ENVV int: 31 ptr: 0x........ +val: AT_PS_STRINGS int: 32 ptr: 0x........ +PS_STRINGS ARGV: ./auxv +val: AT_IGNORE int: 01 ptr: 0x........ +val: AT_USRSTACKBASE int: 35 ptr: 0x........ +val: AT_USRSTACKLIM int: 36 ptr: 0x........ diff --git a/none/tests/freebsd/auxv_script.vgtest b/none/tests/freebsd/auxv_script.vgtest new file mode 100644 index 0000000000..ccd450a9a2 --- /dev/null +++ b/none/tests/freebsd/auxv_script.vgtest @@ -0,0 +1,4 @@ +prog: auxv_script +vgopts: -q +stderr_filter: filter_auxv + |
From: Binbin Z. <zho...@lo...> - 2025-02-06 07:06:35
|
Hi Mark, Paul & all developers: First, it is a pleasure to meet you all, and I am honored to continue LoongArch64/Linux's port work. Regarding the Valgrind LoongAcrh support, we are continuously working on it. Specifically, the LoongAcrh patch set was previously updated to v8[1], while we continue to test on the latest Valgrind version. Additionally, I'm also continuing to work on improving vector instruction support. Unfortunately, probably due to a lack of understanding of the community support process for the new architecture, port work seems to go on for a long time, so what do we need to pay particular attention to? I'm not sure if the **CI build** of the new architecture is a critical step. If it is, I would try to provide an available environment. There are two ways to provide a CI build environment, which one does our community need: 1. Donate machines directly to our community; 2. Provide a community-accessible machine environment. [1]: https://bugs.kde.org/show_bug.cgi?id=457504 Thanks. Binbin |
From: Paul F. <pa...@so...> - 2025-02-04 19:37:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6f6025d53a8f53a85c74d03d7b177792f62ac147 commit 6f6025d53a8f53a85c74d03d7b177792f62ac147 Author: Paul Floyd <pj...@wa...> Date: Tue Feb 4 20:34:57 2025 +0100 FreeBSD syscall: improve utrace wrapper The public wrapper is just a void pointer and length. Internally, the struct used has holes which generate errors (since ld.so which is probably the only user of this syscall doesn't memset the struct to zero). Added the struct definition and PRE_MEM_READ for each field. Diff: --- .gitignore | 1 + coregrind/m_syswrap/syswrap-freebsd.c | 29 +++++++++++++++++++++++++++- memcheck/tests/freebsd/Makefile.am | 5 ++++- memcheck/tests/freebsd/scalar.stderr.exp | 4 ---- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 4 ---- memcheck/tests/freebsd/utrace.stderr.exp | 0 memcheck/tests/freebsd/utrace.vgtest | 6 ++++++ 7 files changed, 39 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 483b077ca3..c5a2b0592c 100644 --- a/.gitignore +++ b/.gitignore @@ -1452,6 +1452,7 @@ /memcheck/tests/freebsd/timing_safe /memcheck/tests/freebsd/utimens /memcheck/tests/freebsd/utimes +/memcheck/tests/freebsd/utrace # /memcheck/tests/amd64-freebsd /memcheck/tests/amd64-freebsd/*.stderr.diff diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 3397249383..6fd4367a83 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -3109,13 +3109,40 @@ POST(sys_sched_rr_get_interval) POST_MEM_WRITE(ARG2, sizeof(struct vki_timespec)); } +/* + * Putting this here rather than in vki-freebsd.h because this is a workaround + * (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284563) + * The syscall interface doesn't allow us to properly validate the memory, + * and struct utrace_rtld isn't public. + */ +#define VKI_RTLD_UTRACE_SIG_SZ 4 + +struct vki_utrace_rtld { + char sig[VKI_RTLD_UTRACE_SIG_SZ]; + int event; + void *handle; + void *mapbase; + size_t mapsize; + int refcnt; + char name[VKI_PATH_MAX]; +}; + // SYS_utrace 335 // int utrace(const void *addr, size_t len); PRE(sys_utrace) { PRINT("sys_utrace ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u )", ARG1, ARG2); PRE_REG_READ2(int, "utrace", const void *, addr, vki_size_t, len); - PRE_MEM_READ( "utrace(addr)", ARG1, ARG2 ); + if (ARG1 && ARG2 >= sizeof(struct vki_utrace_rtld) && ML_(safe_to_deref)((const void*)ARG1, ARG2)) { + struct vki_utrace_rtld* ut = (struct vki_utrace_rtld*)ARG1; + PRE_MEM_READ("utrace(addr.sig)", (Addr)&ut->sig, VKI_RTLD_UTRACE_SIG_SZ*sizeof(char)); + PRE_MEM_READ("utrace(addr.event)", (Addr)&ut->event, sizeof(int)); + PRE_MEM_READ("utrace(addr.handle)", (Addr)&ut->handle, sizeof(void*)); + PRE_MEM_READ("utrace(addr.mapbase)", (Addr)&ut->mapbase, sizeof(void*)); + PRE_MEM_READ("utrace(addr.mapsize)", (Addr)&ut->mapsize, sizeof(size_t)); + PRE_MEM_READ("utrace(addr.refcnt)", (Addr)&ut->handle, sizeof(int)); + PRE_MEM_READ("utrace(addr.name)", (Addr)&ut->name, VKI_PATH_MAX*sizeof(char)); + } } // SYS_kldsym 337 diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 4b6b36c6ce..1213b31898 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -137,7 +137,10 @@ EXTRA_DIST = \ utimens.stderr.exp \ utimes.vgtest \ utimes.stderr.exp-x86 \ - utimes.stderr.exp + utimes.stderr.exp \ + utrace.vgtest \ + utrace.stderr.exp + check_PROGRAMS = \ access aio aio_read aligned_alloc bug464476 bug470713 \ diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 4a57e002aa..0e47fe1aac 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -2391,10 +2391,6 @@ Syscall param utrace(addr) contains uninitialised byte(s) Syscall param utrace(len) contains uninitialised byte(s) ... -Syscall param utrace(addr) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 337: SYS_kldsym 3s 1m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 86599836de..6a532ae8e0 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -2397,10 +2397,6 @@ Syscall param utrace(addr) contains uninitialised byte(s) Syscall param utrace(len) contains uninitialised byte(s) ... -Syscall param utrace(addr) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 337: SYS_kldsym 3s 1m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/utrace.stderr.exp b/memcheck/tests/freebsd/utrace.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/freebsd/utrace.vgtest b/memcheck/tests/freebsd/utrace.vgtest new file mode 100644 index 0000000000..2b69572982 --- /dev/null +++ b/memcheck/tests/freebsd/utrace.vgtest @@ -0,0 +1,6 @@ +# This produces no output (only does so under truss or ktrace) +# but there was an issue with the syscall that generated false positives +# due to holes in the struct used +env: LD_UTRACE=1 +prog: ../../../tests/true +vgopts: -q |
From: Paul F. <pj...@wa...> - 2025-02-04 07:37:35
|
On 01-02-25 00:34, Pol Marcet Sardà wrote: > I have attached the patch in: https://bugs.kde.org/show_bug.cgi? > id=486398 <https://bugs.kde.org/show_bug.cgi?id=486398> > If someone can review/submit the patch, they can freely do so! I'll take a look as soon as I can. A+ Paul |
From: Pol M. S. <pol...@gm...> - 2025-01-31 23:35:05
|
I have attached the patch in: https://bugs.kde.org/show_bug.cgi?id=486398 If someone can review/submit the patch, they can freely do so! Missatge de Pol Marcet Sardà <pol...@gm...> del dia dv., 31 de gen. 2025 a les 23:54: > Hello, > > I'd need some assistance on how to submit a patch to the sourceware repo, > at the moment I have a patch cleaned up with all instructions implemented. > I am unfamiliar with the process (I am used to the PR mechanisms of > bitbucket/gitlab/github) > > Sorry for writing a similar message to both the mailing list and the IRC > > Best regards, > > Pol Marcet Sardà > > Missatge de Pol Marcet Sardà <pol...@gm...> del dia ds., 25 > de gen. 2025 a les 18:14: > >> Hi, >> >> in an application I develop, compilers tend to emit from time to time >> SSE4a instructions as I target AMD CPUs. I filed a bug (486398) a while >> ago, but given that I faced this same issue recently, I guessed that there >> simply hadn't been bandwidth for a more than a decade old niche set of >> instructions. >> >> Given that I still need them, and that there are only 4 instructions, I >> have already added support for the INSERTQ and EXTRQ into VEX, and I intend >> to finish the job by implementing MOVNTSD & MOVNTSS. >> >> Looking at the documentation, it seems to assume that you need to have >> write access into the repo to publish code, so I'd like to request some >> assistance regarding the logistics of submitting a patch (or, if possible, >> creating a pull request). >> >> The documentation also mentions that I should use clang-format, but after >> applying the formatting all the code changed, making a diff completely >> unreadable. May I know if this is expected? Maybe VEX has been touched on >> less, and hasn't had its formatting updated yet? Did I configure something >> wrong? >> >> I'm certain that I'll have gotten some subtleties of Valgrind wrong, so >> once I do submit a patch, please, review it thoroughly! :D >> >> Regards, >> >> Pol Marcet Sardà >> >> |
From: Pol M. S. <pol...@gm...> - 2025-01-31 22:54:59
|
Hello, I'd need some assistance on how to submit a patch to the sourceware repo, at the moment I have a patch cleaned up with all instructions implemented. I am unfamiliar with the process (I am used to the PR mechanisms of bitbucket/gitlab/github) Sorry for writing a similar message to both the mailing list and the IRC Best regards, Pol Marcet Sardà Missatge de Pol Marcet Sardà <pol...@gm...> del dia ds., 25 de gen. 2025 a les 18:14: > Hi, > > in an application I develop, compilers tend to emit from time to time > SSE4a instructions as I target AMD CPUs. I filed a bug (486398) a while > ago, but given that I faced this same issue recently, I guessed that there > simply hadn't been bandwidth for a more than a decade old niche set of > instructions. > > Given that I still need them, and that there are only 4 instructions, I > have already added support for the INSERTQ and EXTRQ into VEX, and I intend > to finish the job by implementing MOVNTSD & MOVNTSS. > > Looking at the documentation, it seems to assume that you need to have > write access into the repo to publish code, so I'd like to request some > assistance regarding the logistics of submitting a patch (or, if possible, > creating a pull request). > > The documentation also mentions that I should use clang-format, but after > applying the formatting all the code changed, making a diff completely > unreadable. May I know if this is expected? Maybe VEX has been touched on > less, and hasn't had its formatting updated yet? Did I configure something > wrong? > > I'm certain that I'll have gotten some subtleties of Valgrind wrong, so > once I do submit a patch, please, review it thoroughly! :D > > Regards, > > Pol Marcet Sardà > > |