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
(32) |
Oct
|
Nov
|
Dec
|
|
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" */ } |
|
From: Paul F. <pa...@so...> - 2023-01-31 21:01:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b1aba91160c53326eb3b41e8fd6c9a5c00902b24 commit b1aba91160c53326eb3b41e8fd6c9a5c00902b24 Author: Paul Floyd <pj...@wa...> Date: Tue Jan 31 21:52:36 2023 +0100 FreeBSD: cleanup and refactor syscalls readlink and readlinkat There was some code to handle /proc/curproc/file (a symlink to the exe that wee need to bodge as it refers to the tool exe). But it was neither tested nor working. Can't use the same technique as Linux and Solaris which have more complete /proc filesystems where each pid has symlinks for each open file, which we use for the guest. Instead need to copy the path ourselves. So move sys_readlink out of generic. Simplify the handling of the resolved guest exe name - store it in a global like VG_(args_the_exename). Diff: --- .gitignore | 1 + coregrind/m_clientstate.c | 4 ++ coregrind/m_initimg/initimg-freebsd.c | 22 ++++---- coregrind/m_main.c | 7 +++ coregrind/m_syswrap/priv_syswrap-freebsd.h | 2 +- coregrind/m_syswrap/syswrap-freebsd.c | 78 ++++++++++++++++++++++------- include/pub_tool_clientstate.h | 1 + none/tests/freebsd/Makefile.am | 9 +++- none/tests/freebsd/proc_pid_file.cpp | 27 ++++++++++ none/tests/freebsd/proc_pid_file.stderr.exp | 0 none/tests/freebsd/proc_pid_file.vgtest | 3 ++ 11 files changed, 125 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index ae71cbbbdd..cc6b189b4b 100644 --- a/.gitignore +++ b/.gitignore @@ -2101,6 +2101,7 @@ /none/tests/freebsd/hello_world /none/tests/freebsd/452275 /none/tests/freebsd/usrstack +/none/tests/freebsd/proc_pid_file # /none/tests/x86/ /none/tests/x86/*.dSYM diff --git a/coregrind/m_clientstate.c b/coregrind/m_clientstate.c index 7b343f27a5..404a60f372 100644 --- a/coregrind/m_clientstate.c +++ b/coregrind/m_clientstate.c @@ -93,6 +93,10 @@ Int VG_(args_for_valgrind_noexecpass) = 0; line. */ const HChar* VG_(args_the_exename) = NULL; +/* The real name of the executable, with resolved + * relative paths and symlinks */ +const HChar* VG_(resolved_exename) = NULL; + // Client's original rlimit data and rlimit stack struct vki_rlimit VG_(client_rlimit_data); struct vki_rlimit VG_(client_rlimit_stack); diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 22c210cdeb..53a9aca873 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -362,8 +362,7 @@ static HChar *copy_bytes(HChar **tab, const HChar *src, SizeT size) ---------------------------------------------------------------- */ -static -struct auxv *find_auxv(UWord* sp) +static struct auxv *find_auxv(UWord* sp) { sp++; // skip argc (Nb: is word-sized, not int-sized!) @@ -380,13 +379,12 @@ struct auxv *find_auxv(UWord* sp) return (struct auxv *)sp; } -static -Addr setup_client_stack( void* init_sp, - HChar** orig_envp, - const ExeInfo* info, - UInt** client_auxv, - Addr clstack_end, - SizeT clstack_max_size ) +static Addr setup_client_stack(void* init_sp, + HChar** orig_envp, + const ExeInfo* info, + UInt** client_auxv, + Addr clstack_end, + SizeT clstack_max_size ) { SysRes res; HChar **cpp; @@ -690,6 +688,7 @@ Addr setup_client_stack( void* init_sp, case VKI_AT_EXECPATH: auxv->u.a_ptr = copy_str(&strtab, resolved_name); + VG_(resolved_exename) = auxv->u.a_ptr; break; case VKI_AT_CANARY: if (canarylen >= 1) { @@ -795,6 +794,11 @@ Addr setup_client_stack( void* init_sp, if (0) { VG_(printf)("startup SP = %#lx\n", client_SP); } + + if (VG_(resolved_exename) == NULL) { + VG_(resolved_exename) = VG_(strdup)("initimg-freebsd.sre.1", resolved_name); + } + return client_SP; } diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 4316e625fa..0a7e96e500 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1724,6 +1724,13 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) if (!sr_isError(statres) || VKI_S_ISLNK(statbuf.mode)) { VG_(have_slash_proc) = True; } + // each directory contains the following that might get read + // file - a symlink to the exe + // cmdline - null separate command line + // etype - the executable type e.g., FreeBSD ELF64 (same for guest and host) + // map - a memory map, tricky to synthesize + // rlimit - list of process limits + // status - process, pid, ppid pts cty uid gid and some other stuff } #endif diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index dd065c6f58..8822f22f21 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -90,7 +90,7 @@ DECL_TEMPLATE(freebsd, sys_ioctl) // 54 DECL_TEMPLATE(freebsd, sys_reboot) // 55 DECL_TEMPLATE(freebsd, sys_revoke) // 56 // generic symlink 57 -// generic readlink 58 +DECL_TEMPLATE(freebsd, sys_readlink) // 58 // generic execve 59 // generic umask 60 // generic chroot 61 diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 13d3b6bf25..1ab63ba491 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -1139,8 +1139,52 @@ PRE(sys_revoke) // SYS_symlink 57 // generic +static void do_readlink(const HChar* path, HChar *buf, SizeT bufsize, SyscallStatus* status, Bool* curproc_file) +{ + HChar name[30]; + VG_(sprintf)(name, "/proc/%d/file", VG_(getpid)()); + if (ML_(safe_to_deref)(path, 1) + && (VG_(strcmp)(path, name) == 0 + || VG_(strcmp)(path, "/proc/curproc/file") == 0)) { + vg_assert(VG_(resolved_exename)); + Int len = VG_(snprintf)(buf, bufsize, "%s", VG_(resolved_exename)); + SET_STATUS_Success(len); + *curproc_file = True; + } +} + // SYS_readlink 58 -// generic +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsiz); +PRE(sys_readlink) +{ + FUSE_COMPATIBLE_MAY_BLOCK(); + Word saved = SYSNO; + Bool curproc_file = False; + + PRINT("sys_readlink ( %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, %llu )", + ARG1, (char*)(Addr)ARG1, ARG2, (ULong)ARG3); + PRE_REG_READ3(long, "readlink", + const char *, path, char *, buf, int, bufsiz); + PRE_MEM_RASCIIZ( "readlink(path)", ARG1 ); + PRE_MEM_WRITE( "readlink(buf)", ARG2,ARG3 ); + + if (VG_(have_slash_proc) == True) + { + /* + * Handle the case where readlink is looking at /proc/curproc/file or + * /proc/<pid>/file + */ + do_readlink((const HChar *)ARG1, (HChar *)ARG2, (SizeT)ARG3, status, &curproc_file); + } + + if (!curproc_file) { + /* Normal case */ + SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, ARG1, ARG2, ARG3)); + } + if (SUCCESS && RES > 0) { + POST_MEM_WRITE( ARG2, RES ); + } +} // SYS_execve 59 // generic @@ -1941,8 +1985,7 @@ static void sysctl_kern_usrstack(SizeT* out, SizeT* outlen) static Bool sysctl_kern_proc_pathname(HChar *out, SizeT *len) { - // is this stashed somewhere? - const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); + const HChar *exe_name = VG_(resolved_exename); if (!VG_(realpath)(exe_name, out)) { return False; @@ -5325,8 +5368,8 @@ POST(sys_openat) // size_t bufsize); PRE(sys_readlinkat) { - HChar name[25]; Word saved = SYSNO; + Bool curproc_file = False; PRINT("sys_readlinkat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, %llu )", ARG1,ARG2,(char*)ARG2,ARG3,(ULong)ARG4); PRE_REG_READ4(ssize_t, "readlinkat", @@ -5334,23 +5377,24 @@ PRE(sys_readlinkat) PRE_MEM_RASCIIZ( "readlinkat(path)", ARG2 ); PRE_MEM_WRITE( "readlinkat(buf)", ARG3,ARG4 ); - if (VG_(have_slash_proc) == True) { + if (VG_(have_slash_proc) == True && (Int)ARG1 == VKI_AT_FDCWD) { /* * Handle the case where readlinkat is looking at /proc/curproc/file or * /proc/<pid>/file. */ - VG_(sprintf)(name, "/proc/%d/file", VG_(getpid)()); - if (ML_(safe_to_deref)((void*)ARG2, 1) - && (VG_(strcmp)((HChar *)ARG2, name) == 0 - || VG_(strcmp)((HChar *)ARG2, "/proc/curproc/file") == 0)) { - VG_(sprintf)(name, "/proc/curproc/fd/%d", VG_(cl_exec_fd)); - SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, (UWord)name, - ARG3, ARG4)); - return; - } + do_readlink((const HChar *)ARG2, (HChar *)ARG3, (SizeT)ARG4, status, &curproc_file); + } + + // @todo PJF there is still the case where fd refers to /proc or /proc/pid + // or /proc/curproc and path is relative pid/file, curptoc/file or just file + + if (!curproc_file) { + /* Normal case */ + SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, ARG2, ARG3, ARG4)); + } + if (SUCCESS && RES > 0) { + POST_MEM_WRITE( ARG3, RES ); } - /* Normal case */ - SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, ARG2, ARG3, ARG4)); } POST(sys_readlinkat) @@ -6696,7 +6740,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { BSDX_(__NR_revoke, sys_revoke), // 56 GENX_(__NR_symlink, sys_symlink), // 57 - GENX_(__NR_readlink, sys_readlink), // 58 + BSDX_(__NR_readlink, sys_readlink), // 58 GENX_(__NR_execve, sys_execve), // 59 GENX_(__NR_umask, sys_umask), // 60 diff --git a/include/pub_tool_clientstate.h b/include/pub_tool_clientstate.h index 556ab03dd5..e25a59702a 100644 --- a/include/pub_tool_clientstate.h +++ b/include/pub_tool_clientstate.h @@ -63,6 +63,7 @@ extern Int VG_(args_for_valgrind_noexecpass); line. */ extern const HChar* VG_(args_the_exename); +extern const HChar* VG_(resolved_exename); #endif // __PUB_TOOL_CLIENTSTATE_H diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 5fe5de3627..f956078d68 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -35,10 +35,13 @@ EXTRA_DIST = \ 452275.stderr.exp \ usrstack.vgtest \ usrstack.stderr.exp \ - usrstack.stdout.exp + usrstack.stdout.exp \ + proc_pid_file.vgtest \ + proc_pid_file.stderr.exp check_PROGRAMS = \ - auxv osrel swapcontext hello_world fexecve 452275 usrstack + auxv osrel swapcontext hello_world fexecve 452275 usrstack \ + proc_pid_file AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @@ -48,3 +51,5 @@ osrel_CFLAGS = ${AM_CFLAGS} swapcontext_CFLAGS = ${AM_CFLAGS} hello_world_SOURCES = hello_world.cpp + +proc_pid_file_SOURCES = proc_pid_file.cpp diff --git a/none/tests/freebsd/proc_pid_file.cpp b/none/tests/freebsd/proc_pid_file.cpp new file mode 100644 index 0000000000..cf9d185381 --- /dev/null +++ b/none/tests/freebsd/proc_pid_file.cpp @@ -0,0 +1,27 @@ +#include <iostream> +//#include <fstream> +#include <string> +//#include <cstdlib> +#include <unistd.h> +#include <fcntl.h> +#include <cassert> + +int main() +{ + char resolvedPath[PATH_MAX]; + auto count = readlink("/proc/curproc/file", resolvedPath, PATH_MAX); + resolvedPath[count] = '\0'; + //std::cout << "resolvedPath: " << resolvedPath << '\n'; + char resolvedPath2[PATH_MAX]; + auto count2 = readlinkat(AT_FDCWD, "/proc/curproc/file", resolvedPath2, PATH_MAX); + resolvedPath2[count2] = '\0'; + //std::cout << "resolvedPath2: " << resolvedPath2 << '\n'; + std::string rp(resolvedPath); + assert(rp == resolvedPath2); + + auto n = rp.rfind("proc_pid_file"); + + std::string filename(rp.substr(n)); + //std::cout << "filename: " << filename << '\n'; + assert(filename == "proc_pid_file"); +} diff --git a/none/tests/freebsd/proc_pid_file.stderr.exp b/none/tests/freebsd/proc_pid_file.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/freebsd/proc_pid_file.vgtest b/none/tests/freebsd/proc_pid_file.vgtest new file mode 100644 index 0000000000..0361a5982b --- /dev/null +++ b/none/tests/freebsd/proc_pid_file.vgtest @@ -0,0 +1,3 @@ +prog: proc_pid_file +vgopts: -q + |
|
From: Paul F. <pj...@wa...> - 2023-01-30 21:33:13
|
On 30-01-23 22:20, Philippe Waroquiers wrote:
> What is the problem/error message/.... ?
<inline asm>:1:14: error: mach-o section specifier uses an unknown
section type
.pushsection ".debug_gdb_scripts", "MS",@progbits,1
^
<inline asm>:4:13: error: .popsection without corresponding .pushsection
.popsection
This is macOS, so it's mach-o rather than ELF object format.
I tried to search to see if there is an equivalent, but couldn't find
anything. I don't think that gdb gets much use on macOS these days,
mostly lldb under XCode.
A+
Paul
|
|
From: Philippe W. <phi...@sk...> - 2023-01-30 21:20:36
|
What is the problem/error message/.... ? On Sun, 2023-01-29 at 16:35 +0000, Paul Floyd wrote: > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ea733f262e37ae691d27122b534a141fc6854ba8 > > commit ea733f262e37ae691d27122b534a141fc6854ba8 > Author: Paul Floyd <pj...@wa...> > Date: Sun Jan 29 17:35:08 2023 +0100 > > macOS: Try to fix build, doesn't like .debug_gdb_scripts > > Diff: > --- > coregrind/vg_preloaded.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c > index 75a3b7ed0c..d6e05898c9 100644 > --- a/coregrind/vg_preloaded.c > +++ b/coregrind/vg_preloaded.c > @@ -49,6 +49,7 @@ > #include <features.h> > #endif > > > +#if !defined(VGO_darwin) > /* Instruct GDB via a .debug_gdb_scripts section to load the valgrind and tool > front-end commands. */ > /* Note: The "MS" section flags are to remove duplicates. */ > @@ -61,6 +62,7 @@ > "); > > > DEFINE_GDB_PY_SCRIPT(VG_LIBDIR "/valgrind-monitor.py") > +#endif > > > #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Mark W. <ma...@kl...> - 2023-01-30 20:14:37
|
We've received word from our data centre hosts that they will have a network infrastructure outage tomorrow, Tuesday 2023-01-31, between 8am and 12am EST (UTC-5). We may follow that up with a server firmware-related update/boot. This impacts sourceware.org, builder.sourceware.org, patchwork.sourceware.org, inbox.sourceware.org, valgrind.org, elfutils.org, cygwin.com and gcc.gnu.org, which all may be unreachable for a couple of hours. Note that there are read-only mirrors of the git repositories at https://sr.ht/~sourceware/ if you need access during the outage. Please feel free to hang out at irc.libera.chat #overseers to follow the current status. |
|
From: Paul F. <pa...@so...> - 2023-01-30 20:13:53
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a4e5942b32427ca2c22da2c19263fd6d26e039ef commit a4e5942b32427ca2c22da2c19263fd6d26e039ef Author: Paul Floyd <pj...@wa...> Date: Mon Jan 30 21:13:13 2023 +0100 Remove warning caused by D demangle testcase Diff: --- memcheck/tests/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 1be744ebac..e5b2ae5863 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -466,6 +466,7 @@ check_PROGRAMS += dw4 endif bug464969_d_demangle_SOURCES = bug464969_d_demangle.cpp +bug464969_d_demangle_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNINITIALIZED@ if GZ_ZLIB check_PROGRAMS += cdebug_zlib @@ -526,12 +527,12 @@ leak_cpp_interior_SOURCES = leak_cpp_interior.cpp # Suppress various gcc warnings which are correct, but for things # we are actually testing for at runtime. accounting_CFLAGS = $(AM_CFLAGS) -Wno-alloc-size-larger-than -badfree_CFLAGS = $(AM_CFLAGS) -Wno-free-nonheap-object +badfree_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ bug155125_CFLAGS = $(AM_CFLAGS) -Wno-unused-result -Wno-alloc-size-larger-than mallinfo_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations malloc3_CFLAGS = $(AM_CFLAGS) -Wno-alloc-size-larger-than sbfragment_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations -strchr_CFLAGS = $(AM_CFLAGS) -Wno-uninitialized +strchr_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ big_debuginfo_symbol_SOURCES = big_debuginfo_symbol.cpp big_debuginfo_symbol_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x |
|
From: Mark W. <ma...@so...> - 2023-01-30 09:32:02
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=42d35e6d2ad7e83414e82a691956777064106624 commit 42d35e6d2ad7e83414e82a691956777064106624 Author: Mark Wielaard <ma...@kl...> Date: Mon Jan 30 10:21:01 2023 +0100 bug464969_d_demangle.cpp: Always print "Xa" bug464969_d_demangle depends on producing an error about an uninitialized variable. But it prints something different to stdout based on the value of that variable. Which can produce failures. Make sure to always print the same thing to stdout. Diff: --- memcheck/tests/bug464969_d_demangle.cpp | 4 ++-- memcheck/tests/bug464969_d_demangle.stdout.exp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/memcheck/tests/bug464969_d_demangle.cpp b/memcheck/tests/bug464969_d_demangle.cpp index b66c79b387..00155ce048 100644 --- a/memcheck/tests/bug464969_d_demangle.cpp +++ b/memcheck/tests/bug464969_d_demangle.cpp @@ -4,9 +4,9 @@ extern "C" void _D4test4findFiPxaZPxa() { int a; if (a) - std::cout << "a\n"; + std::cout << "Xa\n"; else - std::cout << "!a\n"; + std::cout << "X" << "a\n"; } int main() diff --git a/memcheck/tests/bug464969_d_demangle.stdout.exp b/memcheck/tests/bug464969_d_demangle.stdout.exp index 60fc874768..987e3267a0 100644 --- a/memcheck/tests/bug464969_d_demangle.stdout.exp +++ b/memcheck/tests/bug464969_d_demangle.stdout.exp @@ -1 +1 @@ -!a +Xa |
|
From: Bart V. A. <bva...@so...> - 2023-01-29 23:42:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4978c9f65742ced9cce4732bf4da40bc7324a8e4 commit 4978c9f65742ced9cce4732bf4da40bc7324a8e4 Author: Bart Van Assche <bva...@ac...> Date: Sun Jan 29 14:42:17 2023 -0800 drd/tests/pth_mutex_signal: Port to Darwin This patch includes a revert of commit 2e873534bb49 ("macOS: drd pth_mutex_signal test doesn't build"). Diff: --- drd/tests/Makefile.am | 5 +---- drd/tests/pth_mutex_signal.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 157bedcf48..e3366a18a0 100755 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -418,6 +418,7 @@ check_PROGRAMS = \ pth_detached3 \ pth_inconsistent_cond_wait \ pth_mutex_reinit \ + pth_mutex_signal \ pth_process_shared_mutex \ recursive_mutex \ rwlock_race \ @@ -502,10 +503,6 @@ if HAVE_PTHREAD_CREATE_GLIBC_2_0 check_PROGRAMS += pth_create_glibc_2_0 endif -if !VGCONF_OS_IS_DARWIN -check_PROGRAMS += pth_mutex_signal -endif - if HAVE_PTHREAD_SPINLOCK check_PROGRAMS += pth_spinlock endif diff --git a/drd/tests/pth_mutex_signal.c b/drd/tests/pth_mutex_signal.c index ec74696953..38fafdba8a 100644 --- a/drd/tests/pth_mutex_signal.c +++ b/drd/tests/pth_mutex_signal.c @@ -1,4 +1,6 @@ /* + * Verify that pthread_mutex_lock() is not interrupted by a signal. + * * See also https://bugs.kde.org/show_bug.cgi?id=445743. */ @@ -11,7 +13,6 @@ #include <unistd.h> #define STACK_SIZE 1024 * 512 -#define NATIVE_IO_INTERRUPT_SIGNAL (SIGRTMAX - 2) #define LONG_SLEEP_TIME 1000000 void *contender_start(void *arg) @@ -47,7 +48,7 @@ int main () signalAction.sa_sigaction = nullHandler; sigfillset(&signalAction.sa_mask); signalAction.sa_flags = 0; - sigaction(NATIVE_IO_INTERRUPT_SIGNAL, &signalAction, NULL); + sigaction(SIGINT, &signalAction, NULL); // initialize the mutex pthread_mutexattr_init(&mutex_attr); @@ -70,14 +71,22 @@ int main () } fprintf(stderr, "thread created\n"); pthread_attr_destroy(&thread_attr_contender); - + + // Block signals in the current thread such that signals are delivered to the + // 'contender' thread. + { + sigset_t mask; + sigfillset(&mask); + pthread_sigmask(SIG_BLOCK, &mask, NULL); + } + // wait until the thread is sleeping inside pthread_mutex_lock(). fprintf(stderr, "sleeping\n"); usleep(LONG_SLEEP_TIME); // signal thread fprintf(stderr, "signalling\n"); - pthread_kill(contender, NATIVE_IO_INTERRUPT_SIGNAL); + pthread_kill(contender, SIGINT); fprintf(stderr, "sleeping\n"); usleep(LONG_SLEEP_TIME); |
|
From: Paul F. <pa...@so...> - 2023-01-29 21:08:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=82282a6676a5c1b3784fd22fc097a0076dfcb7ca commit 82282a6676a5c1b3784fd22fc097a0076dfcb7ca Author: Paul Floyd <pj...@wa...> Date: Sun Jan 29 22:05:27 2023 +0100 Bug 464969 - D language demangling Patch from wit...@gm... (also added a testcase) Diff: --- .gitignore | 1 + NEWS | 1 + coregrind/m_demangle/demangle.c | 10 ++++++++-- memcheck/tests/Makefile.am | 5 +++++ memcheck/tests/bug464969_d_demangle.cpp | 17 +++++++++++++++++ memcheck/tests/bug464969_d_demangle.stderr.exp | 4 ++++ memcheck/tests/bug464969_d_demangle.stdout.exp | 1 + memcheck/tests/bug464969_d_demangle.vgtest | 2 ++ 8 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6c2852345..ae71cbbbdd 100644 --- a/.gitignore +++ b/.gitignore @@ -839,6 +839,7 @@ /memcheck/tests/bug155125 /memcheck/tests/bug287260 /memcheck/tests/bug340392 +/memcheck/tests/bug464969_d_demangle /memcheck/tests/calloc-overflow /memcheck/tests/cdebug_zlib /memcheck/tests/cdebug_zlib_gnu diff --git a/NEWS b/NEWS index 7990a8a56f..5e61efbbfe 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 463027 broken check for MPX instruction support in assembler 464476 Firefox fails to start under Valgrind 464859 Build failures with GCC-13 (drd tsan_unittest) +464969 D language demangling To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_demangle/demangle.c b/coregrind/m_demangle/demangle.c index 3fd7cb75f5..a4031dc8ac 100644 --- a/coregrind/m_demangle/demangle.c +++ b/coregrind/m_demangle/demangle.c @@ -121,10 +121,12 @@ void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling, // - C++ mangled symbols start with "_Z" (possibly with exceptions?) // - Rust "legacy" mangled symbols start with "_Z". // - Rust "v0" mangled symbols start with "_R". + // - D programming language mangled symbols start with "_D". // XXX: the Java/Rust/Ada demangling here probably doesn't work. See // https://bugs.kde.org/show_bug.cgi?id=445235 for details. if (do_cxx_demangling && VG_(clo_demangle) - && orig != NULL && orig[0] == '_' && (orig[1] == 'Z' || orig[1] == 'R')) { + && orig != NULL && orig[0] == '_' + && (orig[1] == 'Z' || orig[1] == 'R' || orig[1] == 'D')) { /* !!! vvv STATIC vvv !!! */ static HChar* demangled = NULL; /* !!! ^^^ STATIC ^^^ !!! */ @@ -134,7 +136,11 @@ void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling, VG_(arena_free) (VG_AR_DEMANGLE, demangled); demangled = NULL; } - demangled = ML_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS ); + if (orig[1] == 'D') { + demangled = dlang_demangle ( orig, DMGL_ANSI | DMGL_PARAMS ); + } else { + demangled = ML_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS ); + } *result = (demangled == NULL) ? orig : demangled; } else { diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index aa936ac05e..1be744ebac 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -114,6 +114,8 @@ EXTRA_DIST = \ bug155125.stderr.exp bug155125.vgtest \ bug287260.stderr.exp bug287260.vgtest \ bug340392.stderr.exp bug340392.vgtest \ + bug464969_d_demangle.stderr.exp bug464969_d_demangle.vgtest \ + bug464969_d_demangle.stdout.exp \ calloc-overflow.stderr.exp calloc-overflow.vgtest\ cdebug_zlib.stderr.exp cdebug_zlib.vgtest \ cdebug_zlib_gnu.stderr.exp cdebug_zlib_gnu.vgtest \ @@ -381,6 +383,7 @@ check_PROGRAMS = \ bug155125 \ bug287260 \ bug340392 \ + bug464969_d_demangle \ calloc-overflow \ client-msg \ clientperm \ @@ -462,6 +465,8 @@ if DWARF4 check_PROGRAMS += dw4 endif +bug464969_d_demangle_SOURCES = bug464969_d_demangle.cpp + if GZ_ZLIB check_PROGRAMS += cdebug_zlib cdebug_zlib_SOURCES = cdebug.c diff --git a/memcheck/tests/bug464969_d_demangle.cpp b/memcheck/tests/bug464969_d_demangle.cpp new file mode 100644 index 0000000000..b66c79b387 --- /dev/null +++ b/memcheck/tests/bug464969_d_demangle.cpp @@ -0,0 +1,17 @@ +#include <iostream> + +extern "C" void _D4test4findFiPxaZPxa() +{ + int a; + if (a) + std::cout << "a\n"; + else + std::cout << "!a\n"; +} + +int main() +{ + _D4test4findFiPxaZPxa(); +} + + diff --git a/memcheck/tests/bug464969_d_demangle.stderr.exp b/memcheck/tests/bug464969_d_demangle.stderr.exp new file mode 100644 index 0000000000..e2c5b0b254 --- /dev/null +++ b/memcheck/tests/bug464969_d_demangle.stderr.exp @@ -0,0 +1,4 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: test.find(int, const(char)*) (bug464969_d_demangle.cpp:6) + by 0x........: main (bug464969_d_demangle.cpp:14) + diff --git a/memcheck/tests/bug464969_d_demangle.stdout.exp b/memcheck/tests/bug464969_d_demangle.stdout.exp new file mode 100644 index 0000000000..60fc874768 --- /dev/null +++ b/memcheck/tests/bug464969_d_demangle.stdout.exp @@ -0,0 +1 @@ +!a diff --git a/memcheck/tests/bug464969_d_demangle.vgtest b/memcheck/tests/bug464969_d_demangle.vgtest new file mode 100644 index 0000000000..bf20ace9ef --- /dev/null +++ b/memcheck/tests/bug464969_d_demangle.vgtest @@ -0,0 +1,2 @@ +prog: bug464969_d_demangle +vgopts: -q |
|
From: Paul F. <pa...@so...> - 2023-01-29 17:02:21
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2e873534bb49b7ea9310f7b799f8cbbc5fdc7470 commit 2e873534bb49b7ea9310f7b799f8cbbc5fdc7470 Author: Paul Floyd <pj...@wa...> Date: Sun Jan 29 18:00:59 2023 +0100 macOS: drd pth_mutex_signal test doesn't build pth_mutex_signal.c:50:13: error: use of undeclared identifier 'SIGRTMAX' sigaction(NATIVE_IO_INTERRUPT_SIGNAL, &signalAction, NULL); Put this target under a condition for the moment. Diff: --- drd/tests/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index e3366a18a0..157bedcf48 100755 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -418,7 +418,6 @@ check_PROGRAMS = \ pth_detached3 \ pth_inconsistent_cond_wait \ pth_mutex_reinit \ - pth_mutex_signal \ pth_process_shared_mutex \ recursive_mutex \ rwlock_race \ @@ -503,6 +502,10 @@ if HAVE_PTHREAD_CREATE_GLIBC_2_0 check_PROGRAMS += pth_create_glibc_2_0 endif +if !VGCONF_OS_IS_DARWIN +check_PROGRAMS += pth_mutex_signal +endif + if HAVE_PTHREAD_SPINLOCK check_PROGRAMS += pth_spinlock endif |
|
From: Paul F. <pa...@so...> - 2023-01-29 16:50:22
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=44a6e87492a3c83f25e1d7b3158264121df0632e commit 44a6e87492a3c83f25e1d7b3158264121df0632e Author: Paul Floyd <pj...@wa...> Date: Sun Jan 29 17:49:11 2023 +0100 Compiler warning expansion to defined Clang doesn't like m_debuginfo/tinfl.c:182:45: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] Diff: --- coregrind/m_debuginfo/tinfl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coregrind/m_debuginfo/tinfl.c b/coregrind/m_debuginfo/tinfl.c index 890e0c4dd4..970e0b8275 100644 --- a/coregrind/m_debuginfo/tinfl.c +++ b/coregrind/m_debuginfo/tinfl.c @@ -51,7 +51,6 @@ typedef ULong mz_uint64; #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #endif -#define MINIZ_LITTLE_ENDIAN ( defined(VG_LITTLEENDIAN) ) #define MINIZ_HAS_64BIT_REGISTERS ( VG_WORDSIZE == 8 ) // Works around MSVC's spammy "warning C4127: conditional expression is @@ -179,7 +178,7 @@ struct tinfl_decompressor_tag #define MZ_MIN(a,b) (((a)<(b))?(a):(b)) #define MZ_CLEAR_OBJ(obj) VG_(memset)(&(obj), 0, sizeof(obj)) -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && defined(VG_LITTLEENDIAN) #define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) #define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) #else |
|
From: Paul F. <pa...@so...> - 2023-01-29 16:36:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ea733f262e37ae691d27122b534a141fc6854ba8 commit ea733f262e37ae691d27122b534a141fc6854ba8 Author: Paul Floyd <pj...@wa...> Date: Sun Jan 29 17:35:08 2023 +0100 macOS: Try to fix build, doesn't like .debug_gdb_scripts Diff: --- coregrind/vg_preloaded.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c index 75a3b7ed0c..d6e05898c9 100644 --- a/coregrind/vg_preloaded.c +++ b/coregrind/vg_preloaded.c @@ -49,6 +49,7 @@ #include <features.h> #endif +#if !defined(VGO_darwin) /* Instruct GDB via a .debug_gdb_scripts section to load the valgrind and tool front-end commands. */ /* Note: The "MS" section flags are to remove duplicates. */ @@ -61,6 +62,7 @@ "); DEFINE_GDB_PY_SCRIPT(VG_LIBDIR "/valgrind-monitor.py") +#endif #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) |
|
From: Paul F. <pa...@so...> - 2023-01-28 21:08:55
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a1f365150565e3dd69666ebac85bf535bbe194a1 commit a1f365150565e3dd69666ebac85bf535bbe194a1 Author: Paul Floyd <pj...@wa...> Date: Sat Jan 28 22:08:29 2023 +0100 Remove one lingering trace of tilegx Diff: --- drd/drd_bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drd/drd_bitmap.h b/drd/drd_bitmap.h index d88811e41e..3b71d749a9 100644 --- a/drd/drd_bitmap.h +++ b/drd/drd_bitmap.h @@ -140,7 +140,7 @@ Addr make_address(const UWord a1, const UWord a0) #define BITS_PER_BITS_PER_UWORD 5 #elif defined(VGA_amd64) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ || defined(VGA_s390x) || (defined(VGA_mips64) && !defined(VGABI_N32)) \ - || defined(VGA_arm64) || defined(VGA_tilegx) + || defined(VGA_arm64) #define BITS_PER_BITS_PER_UWORD 6 #else #error Unknown platform. |
|
From: Mark W. <ma...@so...> - 2023-01-28 20:54:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=3155bacf26237beb65edb4a572402492b2f1b050 commit 3155bacf26237beb65edb4a572402492b2f1b050 Author: Mark Wielaard <ma...@kl...> Date: Sat Jan 28 21:53:44 2023 +0100 tsan_thread_wrappers_pthread.h: Only include cstdint for C++11 Fixes build on older g++. Diff: --- drd/tests/tsan_thread_wrappers_pthread.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drd/tests/tsan_thread_wrappers_pthread.h b/drd/tests/tsan_thread_wrappers_pthread.h index 4cc8062069..e022e5dece 100644 --- a/drd/tests/tsan_thread_wrappers_pthread.h +++ b/drd/tests/tsan_thread_wrappers_pthread.h @@ -55,7 +55,9 @@ #define NO_TLS #endif +#if __cplusplus >= 201103L #include <cstdint> +#endif #include <string> using namespace std; |
|
From: Mark W. <ma...@so...> - 2023-01-28 20:14:47
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=092d9085442a2519d7b1bdbc79334a307ad55574 commit 092d9085442a2519d7b1bdbc79334a307ad55574 Author: Mark Wielaard <ma...@kl...> Date: Sat Jan 28 21:11:35 2023 +0100 configure.ac: Update AC_PROG_CC checks AM_PROG_CC_C_O has been obsolete since automake 1.14. AC_PROG_CC does the same check. With autoconf 2.70 we must use AC_PROG_CC (which will check for c11 and c99), for earlier versions we'll use AC_PROG_CC_C99. Diff: --- configure.ac | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 47b2a5fe8f..625063beb4 100755 --- a/configure.ac +++ b/configure.ac @@ -50,8 +50,11 @@ CXXFLAGS="$CXXFLAGS" #---------------------------------------------------------------------------- AC_PROG_LN_S -AC_PROG_CC -AM_PROG_CC_C_O +m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99]) +# Make sure we can compile in C99 mode. +if test "$ac_cv_prog_cc_c99" = "no"; then + AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99]) +fi AC_PROG_CPP AC_PROG_CXX # AC_PROG_OBJC apparently causes problems on older Linux distros (eg. with @@ -136,12 +139,6 @@ else fi rm $tmpfile -# Make sure we can compile in C99 mode. -AC_PROG_CC_C99 -if test "$ac_cv_prog_cc_c99" = "no"; then - AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99]) -fi - # We don't want gcc < 3.0 AC_MSG_CHECKING([for a supported version of gcc]) |
|
From: Paul F. <pa...@so...> - 2023-01-28 17:29:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=45c61d598f435d59302dea084912cd3390de1ffc commit 45c61d598f435d59302dea084912cd3390de1ffc Author: Paul Floyd <pj...@wa...> Date: Sat Jan 28 18:27:16 2023 +0100 Illumos: regtest filters and gitignore Filter for the gdb python autoload warnings Filter for another variation of shell abort messages Diff: --- .gitignore | 14 ++++++++++++-- gdbserver_tests/filter_vgdb.in | 1 + tests/filter_stderr_basic.in | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2400b4571a..b6c2852345 100644 --- a/.gitignore +++ b/.gitignore @@ -1213,15 +1213,18 @@ /memcheck/tests/solaris/scalar_frealpathat /memcheck/tests/solaris/scalar_getrandom /memcheck/tests/solaris/scalar_ioctl +/memcheck/tests/solaris/scalar_lwp_kill /memcheck/tests/solaris/scalar_lwp_name /memcheck/tests/solaris/scalar_lwp_sigqueue /memcheck/tests/solaris/scalar_lwp_sigqueue_pid /memcheck/tests/solaris/scalar_modctl_modnvl +/memcheck/tests/solaris/scalar_obsolete /memcheck/tests/solaris/scalar_shm_new /memcheck/tests/solaris/scalar_spawn /memcheck/tests/solaris/scalar_system_stats /memcheck/tests/solaris/scalar_tsol_clearance /memcheck/tests/solaris/scalar_utimensat +/memcheck/tests/solaris/scalar_utimesys /memcheck/tests/solaris/scalar_uuidsys /memcheck/tests/solaris/scalar_zone_defunct /memcheck/tests/solaris/sendfilev @@ -1307,6 +1310,7 @@ /memcheck/tests/x86-solaris/context_sse /memcheck/tests/x86-solaris/ldsoexec /memcheck/tests/x86-solaris/scalar +/memcheck/tests/x86-solaris/scalar_obsolete # /memcheck/tests/freebsd/ /memcheck/tests/freebsd/*.stderr.diff* @@ -1657,6 +1661,8 @@ /none/tests/amd64-solaris/*.stderr.out /none/tests/amd64-solaris/*.stdout.diff /none/tests/amd64-solaris/*.stdout.out +/none/tests/amd64-solaris/*.post.diff +/none/tests/amd64-solaris/*.post.out /none/tests/amd64-solaris/.deps /none/tests/amd64-solaris/Makefile /none/tests/amd64-solaris/Makefile.in @@ -2051,6 +2057,8 @@ /none/tests/solaris/*.stderr.out /none/tests/solaris/*.stdout.diff /none/tests/solaris/*.stdout.out +/none/tests/solaris/*.post.diff +/none/tests/solaris/*.post.out /none/tests/solaris/.deps /none/tests/solaris/Makefile /none/tests/solaris/Makefile.in @@ -2095,9 +2103,9 @@ # /none/tests/x86/ /none/tests/x86/*.dSYM -/none/tests/x86/*.stderr.diff +/none/tests/x86/*.stderr.diff* /none/tests/x86/*.stderr.out -/none/tests/x86/*.stdout.diff +/none/tests/x86/*.stdout.diff* /none/tests/x86/*.stdout.out /none/tests/x86/.deps /none/tests/x86/aad_aam @@ -2196,6 +2204,8 @@ /none/tests/x86-solaris/*.stderr.out /none/tests/x86-solaris/*.stdout.diff /none/tests/x86-solaris/*.stdout.out +/none/tests/x86-solaris/*.post.diff +/none/tests/x86-solaris/*.post.out /none/tests/x86-solaris/.deps /none/tests/x86-solaris/Makefile /none/tests/x86-solaris/Makefile.in diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in index bd593d91c9..c1844e90c0 100755 --- a/gdbserver_tests/filter_vgdb.in +++ b/gdbserver_tests/filter_vgdb.in @@ -37,6 +37,7 @@ $SED -e '/warning: File .*valgrind-monitor.py.*declined.*/d' | $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' | # and filter out any remaining empty lines $SED -e '/^$/d' diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index fc1d19b35b..db83e9f366 100755 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -52,6 +52,8 @@ perl -n -e 'print if !/^(Segmentation fault|Alarm clock|Aborted|Bus error|Killed # Similar as above, but for ksh on Solaris/illumos. perl -n -e 'print if !/^(Memory fault|Killed) $/' | +# bash on Illumos +$SED '/sh: [1-9][0-9]*: Memory fault/d' | # Translate intercepted glibc functions back to their canonical name perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(vg_replace_strmem.c:.*?\)/: memcpy \(vg_replace_strmem.c:...\)/" | |
|
From: Paul F. <pa...@so...> - 2023-01-27 19:02:56
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=cbba7f699a830cab23bc0c0a19937ec93994ac39 commit cbba7f699a830cab23bc0c0a19937ec93994ac39 Author: Paul Floyd <pj...@wa...> Date: Fri Jan 27 20:00:26 2023 +0100 Regtest: broaden suppression for helgrind bug 392331 Inlining differences on different Linux platforms. Diff: --- helgrind/tests/bug392331.supp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/helgrind/tests/bug392331.supp b/helgrind/tests/bug392331.supp index 6b8c5e1174..d19ab70b4a 100644 --- a/helgrind/tests/bug392331.supp +++ b/helgrind/tests/bug392331.supp @@ -1,25 +1,6 @@ { - Check that Dubious suppression works FreeBSD + Check that Dubious suppression works Helgrind:Dubious fun:pthread_cond_signal_WRK - fun:pthread_cond_signal - fun:_ZNSt3__118condition_variable10notify_oneEv -} -{ - Check that Dubious suppression works Linux standalone - Helgrind:Dubious - fun:pthread_cond_signal_WRK - fun:pthread_cond_signal@* - fun:__gthread_cond_signal - fun:UnknownInlinedFun - fun:_ZNSt18condition_variable10notify_oneEv -} -# for some very strange reason the suppression is different -# when running under regtest -{ - Check that Dubious suppression works Linux regtest - Helgrind:Dubious - fun:pthread_cond_signal_WRK - fun:pthread_cond_signal@* - fun:_ZNSt18condition_variable10notify_oneEv + fun:pthread_cond_signal* } |
|
From: Floyd, P. <pj...@wa...> - 2023-01-27 15:08:42
|
Hi On 27/01/2023 08:19, Julian Seward wrote: > On 25/01/2023 21:16, Paul Floyd wrote: >> I'd like some feedback on >> >> https://bugs.kde.org/show_bug.cgi?id=464103 >> >> This allows the user to specify that a block of memory should be >> histogrammed. [..] > > I can see that the request tells dhat to start tracking the area. How > does it > know when to stop tracking? And what happens if the area happens to > overlap > an existing area? I didn't have any plans for stopping - just leave that to DHAT to stop when the memory is feeed/reallocd. > > Rather than specify exactly the bounds of the area in the macro (that > is, both > address and length), would it be preferable to just specify the base > address > of the block, in the expectation that the block is one that the > program has > previously obtained from malloc, and hence one that dhat already knows > about? > Good idea. I was just copying the code that creates the blocks and propagating the arguments back out to the client requests. > In this case, the macro is merely a request to say "please histogram > this block even though it's above the 1024 limit". That seems to me > at least to > be a simple mental model for end users. For the [start, +len) > formulation in > the existing patch, I'm unclear how that interacts with the "normal" > machinery > of tracking only blocks that come from malloc. My intention is this this to be an override for the 1024 limit. I'll remove the size argument. A+ Paul |
|
From: Paul F. <pa...@so...> - 2023-01-27 07:42:40
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=f7e4bb4af294575432b629de4869812fdfee6feb commit f7e4bb4af294575432b629de4869812fdfee6feb Author: Paul Floyd <pj...@wa...> Date: Fri Jan 27 08:42:06 2023 +0100 Bug 382034 - Testcases build fixes for musl Diff: --- NEWS | 1 + memcheck/tests/arm64-linux/scalar.h | 4 ++++ memcheck/tests/x86-linux/scalar.h | 4 ++++ none/tests/x86-linux/seg_override.c | 11 +++++++++-- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9c2410d89a..7990a8a56f 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 170510 Don't warn about ioctl of size 0 without direction hint 241072 List tools in --help output 327548 false positive while destroying mutex +382034 Testcases build fixes for musl 351857 confusing error message about valid command line option 392331 Spurious lock not held error from inside pthread_cond_timedwait 400793 pthread_rwlock_timedwrlock false positive diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h index 9008816d6e..8ef050f4b0 100644 --- a/memcheck/tests/arm64-linux/scalar.h +++ b/memcheck/tests/arm64-linux/scalar.h @@ -12,6 +12,10 @@ #include <sys/types.h> #include <sys/mman.h> +#ifndef __THROW +#define __THROW +#endif + // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to // declare this ourselves. extern long int syscall (long int __sysno, ...) __THROW; diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h index ef28b03550..52f742e4ac 100644 --- a/memcheck/tests/x86-linux/scalar.h +++ b/memcheck/tests/x86-linux/scalar.h @@ -11,6 +11,10 @@ #include <sys/types.h> #include <sys/mman.h> +#ifndef __THROW +#define __THROW +#endif + // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to // declare this ourselves. extern long int syscall (long int __sysno, ...) __THROW; diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c index b7619c9a80..ca8fbfe2b2 100644 --- a/none/tests/x86-linux/seg_override.c +++ b/none/tests/x86-linux/seg_override.c @@ -2,6 +2,8 @@ #include <stdio.h> #include <errno.h> #include <string.h> +#include "../../../config.h" + /* Stuff from Wine. */ @@ -52,14 +54,19 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) /* our copy of the ldt */ LDT_ENTRY ldt_copy[8192]; +#if defined(MUSL_LIBC) +#define MODIFY_LDT(func, ptr, bytecount) syscall(SYS_modify_ldt, (func), (ptr), (bytecount) ); +#else +#define MODIFY_LDT(func, ptr, bytecount) __modify_ldt((func), (ptr), (bytecount) ); /* System call to set LDT entry. */ //extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); extern int __modify_ldt (int, void *, size_t); +#endif void print_ldt ( void ) { int res; - res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); + res = MODIFY_LDT( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); printf("got %d bytes\n", res ); perror("error is"); } @@ -102,7 +109,7 @@ void set_ldt1 ( void* base ) ldt_entry.read_exec_only = 0; ldt_entry.limit_in_pages = 0; ldt_entry.seg_not_present = 0; - stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); + stat = MODIFY_LDT (1, &ldt_entry, sizeof (ldt_entry)); printf("stat = %d\n", stat); } |
|
From: Paul F. <pa...@so...> - 2023-01-27 07:32:04
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dee222c6e818ca43ac45952fc8a020f445d98781 commit dee222c6e818ca43ac45952fc8a020f445d98781 Author: Paul Floyd <pj...@wa...> Date: Fri Jan 27 08:30:41 2023 +0100 Bug 464859 - Build failures with GCC-13 (drd tsan_unittest) Patch submitted by Khem Raj <raj...@gm...> Diff: --- NEWS | 1 + drd/tests/tsan_thread_wrappers_pthread.h | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 02296575c4..9c2410d89a 100644 --- a/NEWS +++ b/NEWS @@ -91,6 +91,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 462830 WARNING: unhandled amd64-freebsd syscall: 474 463027 broken check for MPX instruction support in assembler 464476 Firefox fails to start under Valgrind +464859 Build failures with GCC-13 (drd tsan_unittest) To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/drd/tests/tsan_thread_wrappers_pthread.h b/drd/tests/tsan_thread_wrappers_pthread.h index f15e6ad631..4cc8062069 100644 --- a/drd/tests/tsan_thread_wrappers_pthread.h +++ b/drd/tests/tsan_thread_wrappers_pthread.h @@ -55,6 +55,7 @@ #define NO_TLS #endif +#include <cstdint> #include <string> using namespace std; |
|
From: Paul F. <pa...@so...> - 2023-01-27 07:24:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=57c1641d042e7554143c11af3b52f2efc924ace4 commit 57c1641d042e7554143c11af3b52f2efc924ace4 Author: Paul Floyd <pj...@wa...> Date: Fri Jan 27 08:22:19 2023 +0100 Linux regtest: some extra filtering for helgrind bug392331 Was failing on rhel 7.6 Diff: --- helgrind/tests/Makefile.am | 4 +++- helgrind/tests/bug392331.stderr.exp | 6 ------ helgrind/tests/bug392331.vgtest | 1 + helgrind/tests/filter_bug392331 | 12 ++++++++++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 0a8bd5744b..65f18f1435 100755 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -6,7 +6,9 @@ dist_noinst_SCRIPTS = filter_stderr \ filter_helgrind \ filter_xml \ filter_freebsd.awk \ - filter_stderr_freebsd + filter_stderr_freebsd \ + filter_bug392331 + EXTRA_DIST = \ annotate_hbefore.vgtest annotate_hbefore.stdout.exp \ diff --git a/helgrind/tests/bug392331.stderr.exp b/helgrind/tests/bug392331.stderr.exp index f278e3b089..b61e64f40d 100644 --- a/helgrind/tests/bug392331.stderr.exp +++ b/helgrind/tests/bug392331.stderr.exp @@ -7,15 +7,12 @@ Thread #x is the program's root thread Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...) by 0x........: pthread_cond_signal (hg_intercepts.c:...) - ... by 0x........: main (bug392331.cpp:47) ---Thread-Announcement------------------------------------------ Thread #x was created - ... by 0x........: pthread_create@* (hg_intercepts.c:...) - ... by 0x........: main (bug392331.cpp:38) ---------------------------------------------------------------- @@ -23,9 +20,6 @@ Thread #x was created Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...) by 0x........: pthread_cond_signal (hg_intercepts.c:...) - ... by 0x........: worker_thread() (bug392331.cpp:33) - ... by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... diff --git a/helgrind/tests/bug392331.vgtest b/helgrind/tests/bug392331.vgtest index c160dcd40e..3889b15f77 100644 --- a/helgrind/tests/bug392331.vgtest +++ b/helgrind/tests/bug392331.vgtest @@ -1,3 +1,4 @@ prereq: test -e bug392331 vgopts: -q prog: bug392331 +stderr_filter: filter_bug392331 diff --git a/helgrind/tests/filter_bug392331 b/helgrind/tests/filter_bug392331 new file mode 100755 index 0000000000..9cbd5d04e2 --- /dev/null +++ b/helgrind/tests/filter_bug392331 @@ -0,0 +1,12 @@ +#! /bin/sh + +# at least on fedora 3{6|7} the first stanza contains +# by 0x........: pthread_cond_signal (hg_intercepts.c:...) +# ... +# but on rhel 7.6 at least there is no ellipsis +# To make life easier, filter all of them not just the first + +./filter_stderr "$@" | + +sed '/^ \.\.\./d' + |
|
From: Julian S. <jse...@gm...> - 2023-01-27 07:19:17
|
On 25/01/2023 21:16, Paul Floyd wrote: > I'd like some feedback on > > https://bugs.kde.org/show_bug.cgi?id=464103 > > This allows the user to specify that a block of memory should be histogrammed. [..] I can see that the request tells dhat to start tracking the area. How does it know when to stop tracking? And what happens if the area happens to overlap an existing area? Rather than specify exactly the bounds of the area in the macro (that is, both address and length), would it be preferable to just specify the base address of the block, in the expectation that the block is one that the program has previously obtained from malloc, and hence one that dhat already knows about? In this case, the macro is merely a request to say "please histogram this block even though it's above the 1024 limit". That seems to me at least to be a simple mental model for end users. For the [start, +len) formulation in the existing patch, I'm unclear how that interacts with the "normal" machinery of tracking only blocks that come from malloc. J |
|
From: Paul F. <pa...@so...> - 2023-01-27 06:41:37
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=0df691f9d9a8538ea34a4c535f45d30e0f77d60f commit 0df691f9d9a8538ea34a4c535f45d30e0f77d60f Author: Paul Floyd <pj...@wa...> Date: Fri Jan 27 07:40:31 2023 +0100 Linux regtest: forgot prereq test for scalar_openat2 Diff: --- memcheck/tests/x86-linux/scalar_openat2.vgtest | 1 + 1 file changed, 1 insertion(+) diff --git a/memcheck/tests/x86-linux/scalar_openat2.vgtest b/memcheck/tests/x86-linux/scalar_openat2.vgtest index 517c797e61..8f27ad11d0 100644 --- a/memcheck/tests/x86-linux/scalar_openat2.vgtest +++ b/memcheck/tests/x86-linux/scalar_openat2.vgtest @@ -1,2 +1,3 @@ +prereq: test -e ./scalar_openat2 prog: scalar_openat2 vgopts: -q |