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
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(3) |
2
(2) |
3
(5) |
4
|
|
5
(3) |
6
|
7
|
8
(1) |
9
(3) |
10
|
11
|
|
12
|
13
(2) |
14
|
15
|
16
(1) |
17
(1) |
18
|
|
19
(1) |
20
|
21
(3) |
22
|
23
(1) |
24
(1) |
25
(4) |
|
26
|
27
(1) |
28
(9) |
|
|
|
|
|
From: Louis B. <lou...@gm...> - 2023-02-09 19:29:32
|
On 03/02/2023 11:52, Mark Wielaard wrote: > Hi valgrind developers, > > - The macOS port status - do we have any users/developers? I was planning to join the meetup (like last year) but I won't be able to attend. I would be happy to support the port more directly (my mirror has x86 support for all macOS versions, with some caveats for some versions), how can I get more involved? On Thu, 9 Feb 2023 at 17:25, Floyd, Paul <pj...@wa...> wrote: > Been having a fairly long look at this. Will update on Friday. I would love to hear your thoughts Paul, you can message me directly if you want (or forward me any notes from the meetup if there are any). Thanks! Louis Brunner |
|
From: Floyd, P. <pj...@wa...> - 2023-02-09 17:24:52
|
On 03/02/2023 11:52, Mark Wielaard wrote: > Hi valgrind developers, > > - The macOS port status - do we have any users/developers? Been having a fairly long look at this. Will update on Friday. There has been a lot of noise about memory safety recently. https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDF https://advocacy.consumerreports.org/wp-content/uploads/2023/01/Memory-Safety-Convening-Report-1-1.pdf And some responses from C++ (I don't follow C standards evolution so closely) https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2739r0.pdf https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2759r0.pdf https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2687r0.pdf If they do "fix" C and C++ we might be out of a job ;-) A+ Paul |
|
From: Paul F. <pa...@so...> - 2023-02-08 21:58:10
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6e4eb0b674db465c9c332ec72b5c7f5202de7d71 commit 6e4eb0b674db465c9c332ec72b5c7f5202de7d71 Author: Paul Floyd <pj...@wa...> Date: Wed Feb 8 22:54:57 2023 +0100 Darwin: try to fix assert in DRD The hard coded memory mapping trigger drd_start_using_mem_w_perms which will lead to tl_assert(vg_tid != VG_INVALID_THREADID); But vg_tid was just set to VG_INVALID_THREADID before the hard coded memory map. Diff: --- coregrind/m_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 0a7e96e500..b5501b5f31 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -2047,10 +2047,6 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) True /* executable? */, 0 /* di_handle: no associated debug info */ ); - /* Clear the running thread indicator */ - VG_(running_tid) = VG_INVALID_THREADID; - vg_assert(VG_(running_tid) == VG_INVALID_THREADID); - /* Darwin only: tell the tools where the client's kernel commpage is. It would be better to do this by telling aspacemgr about it -- see the now disused record_system_memory() in @@ -2068,6 +2064,10 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) True, False, True, /* r-x */ 0 /* di_handle: no associated debug info */ ); # endif + + /* Clear the running thread indicator */ + VG_(running_tid) = VG_INVALID_THREADID; + vg_assert(VG_(running_tid) == VG_INVALID_THREADID); } //-------------------------------------------------------------- |
|
From: Paul F. <pa...@so...> - 2023-02-05 11:50:55
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9fb974c359e127caa930fc2ccf49218778e7c584 commit 9fb974c359e127caa930fc2ccf49218778e7c584 Author: Paul Floyd <pj...@wa...> Date: Sun Feb 5 12:50:13 2023 +0100 Regtest: rationalize filters for new/delete Diff: --- memcheck/tests/Makefile.am | 3 +-- memcheck/tests/filter_sized_delete | 4 ---- memcheck/tests/sized_delete.vgtest | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index e5b2ae5863..55eea450b9 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -80,8 +80,7 @@ dist_noinst_SCRIPTS = \ filter_varinfo3 \ filter_memcheck \ filter_overlaperror \ - filter_malloc_free \ - filter_sized_delete + filter_malloc_free noinst_HEADERS = leak.h diff --git a/memcheck/tests/filter_sized_delete b/memcheck/tests/filter_sized_delete deleted file mode 100755 index 54dea76b5d..0000000000 --- a/memcheck/tests/filter_sized_delete +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -./filter_stderr "$@" | -grep -v free | grep -v malloc diff --git a/memcheck/tests/sized_delete.vgtest b/memcheck/tests/sized_delete.vgtest index 9f483e01c4..1ad6b68f3a 100644 --- a/memcheck/tests/sized_delete.vgtest +++ b/memcheck/tests/sized_delete.vgtest @@ -1,4 +1,4 @@ prog: sized_delete prereq: test -e sized_delete vgopts: -q "--trace-malloc=yes" --show-mismatched-frees=yes -stderr_filter: filter_sized_delete +stderr_filter: filter_malloc_free |
|
From: Paul F. <pa...@so...> - 2023-02-05 10:36:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=0eb7257254c55a9d9a28194986fa1efd0f96ad87 commit 0eb7257254c55a9d9a28194986fa1efd0f96ad87 Author: Paul Floyd <pj...@wa...> Date: Sun Feb 5 11:35:28 2023 +0100 Darwin regtest: add filtering for zone functions and realloc For test of C++17 new/delete variations Diff: --- memcheck/tests/filter_malloc_free | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/filter_malloc_free b/memcheck/tests/filter_malloc_free index 9d4c52559c..3927792ef0 100755 --- a/memcheck/tests/filter_malloc_free +++ b/memcheck/tests/filter_malloc_free @@ -2,5 +2,5 @@ ./filter_stderr "$@" | ./filter_allocs | -sed -e '/^malloc/d;/^free/d;/^calloc/d' +sed -e '/^malloc/d;/^free/d;/^calloc/d;/^zone/d;/^realloc/d' |
|
From: Paul F. <pa...@so...> - 2023-02-05 10:36:47
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=60303f4316008f0ba9553cb14d6530dfdd3c3760 commit 60303f4316008f0ba9553cb14d6530dfdd3c3760 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 19:27:39 2023 +0100 DRD regtest: try to make timed_mutex more reliable On RHEL 7.6 ARM I see this with the lock returning false but without the 11 second timeout. Try adding some sleeps. Diff: --- docs/Makefile.am | 1 + docs/internals/Darwin-debug.txt | 62 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 3850d7b744..f9ba4e3958 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -46,6 +46,7 @@ EXTRA_DIST = \ internals/arm_thumb_notes_gdbserver.txt \ internals/avx-notes.txt \ internals/BIG_APP_NOTES.txt \ + internals/Darwin-debug.txt \ internals/Darwin-notes.txt \ internals/SPEC-notes.txt \ internals/directory-structure.txt \ diff --git a/docs/internals/Darwin-debug.txt b/docs/internals/Darwin-debug.txt new file mode 100644 index 0000000000..5bc9b56633 --- /dev/null +++ b/docs/internals/Darwin-debug.txt @@ -0,0 +1,62 @@ +Some general notes on debugging on macOS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Written early 2023, based on macOS 13.1 / Darwin 22.2.0 Intel + +If you need to use ssh then you can't use lldb directly because, by default, +it wants to open a dialog for your password/fingerprint. You can disable this +with: + +sudo DevToolsSecurity --enable + +Tracing syscalls looks rather scary and involves rebooting and disabling security. + +Launcher and initimg +~~~~~~~~~~~~~~~~~~~~ + +Things are a bit different on Darwin. Quick reminder for other platforms: + +1. Early command line processing, specifically tool and verbosity +2. Select the platform by looking at the ELF headers. Default + to the build platform if the client is a script and the shebangs + don't lead to an ELF binary. +3. Add VALGRIND_LAUNCHER to the environment. This is based on the path. +4. Get the tool path. This uses either the path baked into the build + by the configure --prefix option (VG_LIBDIR) or the VALGRIND_LIB + environment variable (set by the vg-in-place script for running + in the build directory). +5. exec the tool. + +On Darwin that is + +1. Early command line processing. As above but also the undocumented + --arch option. +2. The client exename can be an app bundle which means expanding + "client" to "client.app/Contents/MacOS/client". +3. Platform detection is complicated by the macOS history of + having dual-platform fat binaries. A list of supported platforms + is considered and compared against the Valgrind install. Then + the mach_header is examined to make the final decision. +4. The additions to the environment variables are also a bit more + complicated. Like on ELF based systems there is VALGRIND_LAUNCHER. + Additionally there is + VALGRIND_STARTUP_PWD_%PID_XYZZY=current_working_dir + which is used to work out the working directory. + Darwin doesn't have a cwd syscall? I wonder how 'pwd' works. + Looks like it does open(.) fstat to check then fcntl(F_GETPATH). + The seems to only matter for %p and %q log filename expansion + and reading any .valgrindrc in the working directory. Not + big problems for debugging. +5. Another slight complication is that dylib environment variables need + protecting. Maybe because the tool is statically linked? In any + case all env vars that start with "DYLD_" get changed to "VYLD_". +6. The tool path is determined along the same lines as ELF. +7. exec the tool. + + +In stage2 on Darwin the "VYLD_" munging is undone. DYLD_INSERT_LIBRARIES +gets set for core and tool preloads (the equivalent of LD_PRELOAD). +DYLD_SHARED_REGION gets set to "avoid" (but note that for macOS 11 +Big Sur and later "avoid" is no longer an option). + +The Darwin calstack is a bit simpler to synthesise than the ones on +ELF platforms. There is no auxiliary vector (auxv) to construct. |
|
From: Paul F. <pa...@so...> - 2023-02-03 18:29:09
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=add5fe983292106d62196a77c57e9416c26ef1b8 commit add5fe983292106d62196a77c57e9416c26ef1b8 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 19:27:39 2023 +0100 DRD regtest: try to make timed_mutex more reliable On RHEL 7.6 ARM I see this with the lock returning false but without the 11 second timeout. Try adding some sleeps. Diff: --- drd/tests/timed_mutex.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drd/tests/timed_mutex.cpp b/drd/tests/timed_mutex.cpp index b1bb61efa6..fa7464ea5b 100644 --- a/drd/tests/timed_mutex.cpp +++ b/drd/tests/timed_mutex.cpp @@ -12,16 +12,19 @@ void f() auto now=std::chrono::steady_clock::now(); test_mutex.try_lock_until(now + std::chrono::seconds(11)); --global; + std::this_thread::sleep_for(std::chrono::seconds(1)); test_mutex.unlock(); } - + + int main() { global = 0; + std::thread t(f); + std::this_thread::sleep_for(std::chrono::seconds(1)); auto now=std::chrono::steady_clock::now(); test_mutex.try_lock_until(now + std::chrono::seconds(11)); ++global; - std::thread t(f); test_mutex.unlock(); t.join(); assert(global == 0); |
|
From: Paul F. <pa...@so...> - 2023-02-03 18:12:20
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dfaf01873391977d2863da0c227a8b363f762019 commit dfaf01873391977d2863da0c227a8b363f762019 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 19:10:50 2023 +0100 DRD regtesat: update suppression file for std_threads2 On RHEL 7.6 ARM glibc 2.17 is used which doesn't match the 2.2* wildard, so widen the wildcard to just 2.* Diff: --- drd/tests/std_thread2.supp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drd/tests/std_thread2.supp b/drd/tests/std_thread2.supp index 2e41bac503..69b210c469 100644 --- a/drd/tests/std_thread2.supp +++ b/drd/tests/std_thread2.supp @@ -11,13 +11,13 @@ { pthread_create drd:ConflictingAccess - fun:pthread_create@@GLIBC_2.2* + fun:pthread_create@@GLIBC_2.* } { pthread_create drd:ConflictingAccess fun:allocate_stack - fun:pthread_create@@GLIBC_2.2* + fun:pthread_create@@GLIBC_2.* } { drd-gcc-runtims |
|
From: Paul F. <pa...@so...> - 2023-02-03 12:52:17
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4c80a467a93fd3e4be04b567fbaae6146b2b23de commit 4c80a467a93fd3e4be04b567fbaae6146b2b23de Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 13:51:04 2023 +0100 FreeBSD: fix internal sysctlbyname I used the libc interface rather than the syscall interface. The syscall also has the name length which libc adds. Diff: --- coregrind/m_libcproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c index 55bb7cbf97..592d69bf13 100644 --- a/coregrind/m_libcproc.c +++ b/coregrind/m_libcproc.c @@ -1200,8 +1200,9 @@ void VG_(do_atfork_child)(ThreadId tid) #if defined(VGO_freebsd) Int VG_(sysctlbyname)(const HChar *name, void *oldp, SizeT *oldlenp, const void *newp, SizeT newlen) { + vg_assert(name); #if (FREEBSD_VERS >= FREEBSD_12_2) - SysRes res = VG_(do_syscall5)(__NR___sysctlbyname, (UWord)name, (UWord)oldp, (UWord)oldlenp, (UWord)newp, (UWord)newlen); + SysRes res = VG_(do_syscall6)(__NR___sysctlbyname, (RegWord)name, VG_(strlen)(name), (RegWord)oldp, (RegWord)oldlenp, (RegWord)newp, (RegWord)newlen); return sr_isError(res) ? -1 : sr_Res(res); #else Int oid[2]; |
|
From: Paul F. <pa...@so...> - 2023-02-03 12:51:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=cdabd4ba74ea653515a1bf9a6e9067f3179c2d54 commit cdabd4ba74ea653515a1bf9a6e9067f3179c2d54 Author: Paul Floyd <pj...@wa...> Date: Fri Feb 3 13:48:22 2023 +0100 Regtest: foix warning from drd test pth_mutex_signal.c GCC on RHEL 7.6 ARM complains about the empty init list. I also noticed that we are using the SA_NOTIFY form of sigaction (with that union member and handler prototype) but not setting the SA_NOTIFY flag. Seems harmless in this case as we don't use the siginfo or context. Diff: --- drd/tests/pth_mutex_signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drd/tests/pth_mutex_signal.c b/drd/tests/pth_mutex_signal.c index 38fafdba8a..916afdfe59 100644 --- a/drd/tests/pth_mutex_signal.c +++ b/drd/tests/pth_mutex_signal.c @@ -42,12 +42,12 @@ int main () pthread_mutexattr_t mutex_attr; pthread_attr_t thread_attr_contender; pthread_t contender; - struct sigaction signalAction = { }; + struct sigaction signalAction; // install signal handler signalAction.sa_sigaction = nullHandler; sigfillset(&signalAction.sa_mask); - signalAction.sa_flags = 0; + signalAction.sa_flags = SA_SIGINFO; sigaction(SIGINT, &signalAction, NULL); // initialize the mutex |
|
From: Mark W. <ma...@kl...> - 2023-02-03 10:53:00
|
Hi valgrind developers, Paul suggested that we should have a developer video chat again to discuss development issues. And I agree that would be a good thing to set some goals for the next release in April. We would like to meet on Friday February 10 at 16:00 UTC (17:00 CET, 11:00 EST). https://meet.jit.si/ValgrindDevMeeting Some issues we can discuss: - Pick a date for the April 3.21.0 release Critical bugs that are must fix? - Upstreaming risc-v - https://github.com/petrpavlu/valgrind-riscv64 - AVX512 status - https://bugs.kde.org/show_bug.cgi?id=383010 - loongarch - https://bugs.kde.org/show_bug.cgi?id=457504 - The macOS port status - do we have any users/developers? - https://bugs.kde.org/show_bug.cgi?id=433859 aligned and sized stuff. Do we have enough bits to track this efficiently? - Plugging into the new FORTIFY_SOURCE=3 support in glibc. valgrind memcheck should be able to show useful information about the memory block that triggered the fault. - Infrastructure stuff. We are still using the sourcefore mailinglist and the kde bugzilla. But our git repo and website are at sourceware. Should we migrate everything to sourceware? - Would that be a good point to switch from "master" to "main" for the main git branch name? We already largely avoid terms like black/whitelist and master/slave in the code and it would be a good transition towards more inclusive language as described in https://inclusivenaming.org/ These are all just suggestions. Please feel free to join and/or propose other topics, features or bugs to discuss. Cheers, Mark |
|
From: Paul F. <pa...@so...> - 2023-02-02 21:08:49
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7003f40be9de1e10796578cba9e40ea6a548fc16 commit 7003f40be9de1e10796578cba9e40ea6a548fc16 Author: Paul Floyd <pj...@wa...> Date: Thu Feb 2 22:06:38 2023 +0100 FreeBSD: improve internal syscallbyname Post FreeBSD 12.2 this is a syscall that does everything (rather than needing an undocumented syscall). Diff: --- coregrind/m_libcproc.c | 7 ++++++- coregrind/pub_core_libcproc.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c index b94cabcf1f..55bb7cbf97 100644 --- a/coregrind/m_libcproc.c +++ b/coregrind/m_libcproc.c @@ -1194,12 +1194,16 @@ void VG_(do_atfork_child)(ThreadId tid) } /* --------------------------------------------------------------------- - FreeBSD sysctlbyname(), modfind(), etc + FreeBSD sysctlbyname, getosreldate, is32on64 ------------------------------------------------------------------ */ #if defined(VGO_freebsd) Int VG_(sysctlbyname)(const HChar *name, void *oldp, SizeT *oldlenp, const void *newp, SizeT newlen) { +#if (FREEBSD_VERS >= FREEBSD_12_2) + SysRes res = VG_(do_syscall5)(__NR___sysctlbyname, (UWord)name, (UWord)oldp, (UWord)oldlenp, (UWord)newp, (UWord)newlen); + return sr_isError(res) ? -1 : sr_Res(res); +#else Int oid[2]; Int real_oid[10]; SizeT oidlen; @@ -1214,6 +1218,7 @@ Int VG_(sysctlbyname)(const HChar *name, void *oldp, SizeT *oldlenp, const void oidlen /= sizeof(int); error = VG_(sysctl)(real_oid, oidlen, oldp, oldlenp, newp, newlen); return error; + #endif } Int VG_(getosreldate)(void) diff --git a/coregrind/pub_core_libcproc.h b/coregrind/pub_core_libcproc.h index d63a4f7c47..ff056ec408 100644 --- a/coregrind/pub_core_libcproc.h +++ b/coregrind/pub_core_libcproc.h @@ -86,7 +86,7 @@ extern void VG_(do_atfork_parent) ( ThreadId tid ); extern void VG_(do_atfork_child) ( ThreadId tid ); #if defined(VGO_freebsd) -// sysctl, modfind +// sysctlbyname, getosreldate, is32on64 extern Int VG_(sysctlbyname)(const HChar *name, void *oldp, SizeT *oldlenp, const void *newp, SizeT newlen); extern Int VG_(getosreldate)(void); extern Bool VG_(is32on64)(void); |
|
From: Paul F. <pa...@so...> - 2023-02-02 20:52:41
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a8e350c6d1b2a64e9515d29134b4217bccb62382 commit a8e350c6d1b2a64e9515d29134b4217bccb62382 Author: Paul Floyd <pj...@wa...> Date: Thu Feb 2 21:51:21 2023 +0100 GDB regtest: add filter for gdb python load, RHEL 7.4 ARM Diff: --- gdbserver_tests/filter_vgdb.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in index c1844e90c0..7c42a1849f 100755 --- a/gdbserver_tests/filter_vgdb.in +++ b/gdbserver_tests/filter_vgdb.in @@ -38,6 +38,7 @@ $SED -e '/warning: Missing auto-load script.*/d' | $SED -e '/of file .*vgpreload.*so.*/d' | $SED -e '/Use.*info auto-load python-scripts.*/d' | $SED -e '/warning: Invalid entry in .debug_gdb_scripts section/d' | +$SED -e "/Use .info auto-load python .REGEXP.. to list them./d" | # and filter out any remaining empty lines $SED -e '/^$/d' |
|
From: Mark W. <ma...@so...> - 2023-02-01 22:54:02
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e4c5c764e80db00aabb2e217e1f5ce9856eadae7 commit e4c5c764e80db00aabb2e217e1f5ce9856eadae7 Author: Mark Wielaard <ma...@kl...> Date: Wed Feb 1 23:52:59 2023 +0100 Add valgrind-monitor[-def].py to EXTRA_DIST So as to make sure these get copied into the tarball. Fixes make distcheck. Diff: --- coregrind/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index dda0689ddf..80115f21fe 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -771,6 +771,8 @@ vglib_DATA += m_gdbserver/valgrind-monitor-def.py # so as to make sure these get copied into the tarball EXTRA_DIST += $(GDBSERVER_XML_FILES) +EXTRA_DIST += m_gdbserver/valgrind-monitor.py +EXTRA_DIST += m_gdbserver/valgrind-monitor-def.py #---------------------------------------------------------------------------- # General stuff |
|
From: Paul F. <pa...@so...> - 2023-02-01 20:48:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=fd7daaa5e06d90325dd40be9467da3be694c8c7d commit fd7daaa5e06d90325dd40be9467da3be694c8c7d Author: Paul Floyd <pj...@wa...> Date: Wed Feb 1 21:45:46 2023 +0100 FreeBSD: cleanup launcher cppcheck spotted a bug in the skipping of whitespace between shebang and interpreter command. This could potentially cause the platform to be misidentified (for x86 on amd64). Diff: --- coregrind/launcher-freebsd.c | 72 +++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/coregrind/launcher-freebsd.c b/coregrind/launcher-freebsd.c index 7d40ad6cce..792a4bd239 100644 --- a/coregrind/launcher-freebsd.c +++ b/coregrind/launcher-freebsd.c @@ -45,6 +45,7 @@ #include <sys/sysctl.h> /* #include <sys/user.h> */ #include <unistd.h> +#include <limits.h> #include "pub_core_debuglog.h" #include "pub_core_vki.h" // Avoids warnings from @@ -52,12 +53,6 @@ #include "pub_core_libcproc.h" // For VALGRIND_LIB, VALGRIND_LAUNCHER #include "pub_core_ume.h" - -#if !defined(PATH_MAX) -#define PATH_MAX 4096 /* POSIX refers to this a lot but I dunno - where it is defined */ -#endif - #ifndef EM_X86_64 #define EM_X86_64 62 // elf.h doesn't define this on some older systems #endif @@ -99,8 +94,9 @@ static const char *find_client(const char *clientname) strcat(fullname, "/"); strcat(fullname, clientname); - if (access(fullname, R_OK|X_OK) == 0) + if (access(fullname, R_OK|X_OK) == 0) { return fullname; + } } return clientname; @@ -116,11 +112,13 @@ static const char *select_platform(const char *clientname) VG_(debugLog)(2, "launcher", "selecting platform for '%s'\n", clientname); - if (strchr(clientname, '/') == NULL) + if (strchr(clientname, '/') == NULL) { clientname = find_client(clientname); + } - if ((fd = open(clientname, O_RDONLY)) < 0) + if ((fd = open(clientname, O_RDONLY)) < 0) { return NULL; + } // barf("open(%s): %s", clientname, strerror(errno)); n_bytes = read(fd, header, sizeof(header)); @@ -135,19 +133,29 @@ static const char *select_platform(const char *clientname) // Skip whitespace. while (1) { - if (i == n_bytes) return NULL; - if (' ' != header[i] && '\t' == header[i]) break; + if (i == n_bytes) { + return NULL; + } + if (' ' != header[i] && '\t' != header[i]) { + break; + } i++; } // Get the interpreter name. interp = &header[i]; while (1) { - if (i == n_bytes) break; - if (isspace(header[i])) break; + if (i == n_bytes) { + break; + } + if (isspace(header[i])) { + break; + } i++; } - if (i == n_bytes) return NULL; + if (i == n_bytes) { + return NULL; + } header[i] = '\0'; platform = select_platform(interp); @@ -209,14 +217,17 @@ int main(int argc, char** argv, char** envp) break; } if (0 == strcmp(argv[i], "--")) { - if (i+1 < argc) + if (i+1 < argc) { clientname = argv[i+1]; + } break; } - if (0 == strcmp(argv[i], "-d")) + if (0 == strcmp(argv[i], "-d")) { loglevel++; - if (0 == strncmp(argv[i], "--tool=", 7)) + } + if (0 == strncmp(argv[i], "--tool=", 7)) { toolname = argv[i] + 7; + } } /* ... and start the debug logger. Now we can safely emit logging @@ -241,12 +252,13 @@ int main(int argc, char** argv, char** envp) target, because on most ppc64-linux setups, the basic /bin, /usr/bin, etc, stuff is built in 32-bit mode, not 64-bit mode. */ - if (0==strcmp(VG_PLATFORM,"x86-freebsd")) + if (0==strcmp(VG_PLATFORM,"x86-freebsd")) { default_platform = "x86-freebsd"; - else if (0==strcmp(VG_PLATFORM,"amd64-freebsd")) + } else if (0==strcmp(VG_PLATFORM,"amd64-freebsd")) { default_platform = "amd64-freebsd"; - else + } else { barf("Unknown VG_PLATFORM '%s'", VG_PLATFORM); + } /* Work out what platform to use, or use the default platform if not possible. */ @@ -285,19 +297,23 @@ int main(int argc, char** argv, char** envp) /* tediously augment the env: VALGRIND_LAUNCHER=launcher_name */ new_line = malloc(strlen(VALGRIND_LAUNCHER) + 1 + strlen(launcher_name) + 1); - if (new_line == NULL) + if (new_line == NULL) { barf("malloc of new_line failed."); + } strcpy(new_line, VALGRIND_LAUNCHER); strcat(new_line, "="); strcat(new_line, launcher_name); - for (j = 0; envp[j]; j++) - ; + for (j = 0; envp[j]; j++) { + // do nothing + } new_env = malloc((j+2) * sizeof(char*)); - if (new_env == NULL) + if (new_env == NULL) { barf("malloc of new_env failed."); - for (i = 0; i < j; i++) + } + for (i = 0; i < j; i++) { new_env[i] = envp[i]; + } new_env[i++] = new_line; new_env[i++] = NULL; assert(i == j+2); @@ -305,13 +321,15 @@ int main(int argc, char** argv, char** envp) /* Establish the correct VALGRIND_LIB. */ cp = getenv(VALGRIND_LIB); - if (cp != NULL) + if (cp != NULL) { valgrind_lib = cp; + } /* Build the stage2 invocation, and execve it. Bye! */ toolfile = malloc(strlen(valgrind_lib) + strlen(toolname) + strlen(platform) + 3); - if (toolfile == NULL) + if (toolfile == NULL) { barf("malloc of toolfile failed."); + } sprintf(toolfile, "%s/%s-%s", valgrind_lib, toolname, platform); VG_(debugLog)(1, "launcher", "launching %s\n", toolfile); |
|
From: Paul F. <pa...@so...> - 2023-02-01 20:48:23
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bca6837b1525a5abfde593019ddf489620d92153 commit bca6837b1525a5abfde593019ddf489620d92153 Author: Paul Floyd <pj...@wa...> Date: Wed Feb 1 21:44:31 2023 +0100 Pack Lackey Event structure Seen by cppcheck. Will reduced size from 4 to 3 words on 64bit platforms. Diff: --- lackey/lk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lackey/lk_main.c b/lackey/lk_main.c index e19b39f16f..8ee62a78bb 100644 --- a/lackey/lk_main.c +++ b/lackey/lk_main.c @@ -408,8 +408,8 @@ typedef typedef struct { - EventKind ekind; IRAtom* addr; + EventKind ekind; Int size; IRAtom* guard; /* :: Ity_I1, or NULL=="always True" */ } |