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: Paul F. <pa...@so...> - 2024-12-15 14:12:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d08b181d9418d9d700c43307664cfef3c1f2ad86 commit d08b181d9418d9d700c43307664cfef3c1f2ad86 Author: Paul Floyd <pj...@wa...> Date: Sun Dec 15 15:10:33 2024 +0100 Bug 497455 - Update drd/scripts/download-and-build-gcc The other script also are likely to need some attention. This one is probably the most useful for users that want to test OpenMP aplications with DRD or Helgrind. Diff: --- NEWS | 1 + drd/scripts/download-and-build-gcc | 95 ++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/NEWS b/NEWS index 06e42e577f..eb12b115cc 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 495488 Add FreeBSD getrlimitusage syscall wrapper 496571 False positive for null key passed to bpf_map_get_next_key syscall. 497130 Recognize new DWARF5 DW_LANG constants +497455 Update drd/scripts/download-and-build-gcc To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/drd/scripts/download-and-build-gcc b/drd/scripts/download-and-build-gcc index 8b8cd4d9d2..025a507cf6 100755 --- a/drd/scripts/download-and-build-gcc +++ b/drd/scripts/download-and-build-gcc @@ -1,73 +1,56 @@ -#!/bin/bash +#!/usr/bin/env bash -# Make sure that libgmp and libmpfr are installed before you run this script. -# On Debian systems, e.g. Ubuntu, you can install these libraries as follows: -# sudo apt-get install libgmp3-dev libmpfr-dev. In openSUSE these packages -# are called gmp-devel and mpfr-devel. - - -GCC_VERSION=4.5.0 -FSF_MIRROR=ftp://ftp.easynet.be/gnu -SRCDIR=$HOME/software -DOWNLOADS=$SRCDIR/downloads -SRC=$HOME/software/gcc-${GCC_VERSION} -BUILD=${SRC}-build -TAR=gcc-${GCC_VERSION}.tar.bz2 -PREFIX=$HOME/gcc-${GCC_VERSION} -GMP_PREFIX=/usr -#GMP_PREFIX=$HOME/gmp-5.0.1 -MPFR_PREFIX=/usr -#MPFR_PREFIX=$HOME/mpfr-2.4.2 -MPC_PREFIX=/usr -#MPC_PREFIX=$HOME/mpc-0.8.1 -export LC_ALL=C -export MAKEFLAGS="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))" - -if [ ! -e $GMP_PREFIX/include/gmp.h ]; then - echo "Please install the gmp library development package first." - exit 1 -fi - -if [ ! -e $MPFR_PREFIX/include/mpfr.h ]; then - echo "Please install the mpfr library development package first." - exit 1 +GCC_VERSION=13.3.0 +if [[ $# -eq 1 ]] ; then + GCC_VERSION=$1 fi +GIT_REPO=git://gcc.gnu.org/git/gcc.git +SRCDIR=${HOME}/software +REPO=${SRCDIR}/gcc +BUILD=${REPO}/build +PREFIX=${HOME}/gcc-${GCC_VERSION} +export LC_ALL=C -if [ ! -e $MPC_PREFIX/include/mpc.h ]; then - echo "Please install the mpc library development package first." - exit 1 -fi +OS=$(uname -s) +case ${OS} in + Linux) + MAKE=make + MAKEFLAGS="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))" + ;; + FreeBSD) + MAKE=gmake + MAKEFLAGS="-j$(sysctl -n hw.ncpu)" + ;; + *) + echo "Unsupported OS" + exit 1 + ;; +esac +export MAKEFLAGS rm -rf ${BUILD} || exit $? rm -rf ${PREFIX} || exit $? -mkdir -p ${DOWNLOADS} || exit $? -mkdir -p ${BUILD} || exit $? -cd ${BUILD} || exit $? +mkdir -p ${SRCDIR} || exit $? -if [ ! -e $DOWNLOADS/$TAR ]; then -( - if cd $DOWNLOADS; then - wget -q $FSF_MIRROR/gcc/gcc-${GCC_VERSION}/$TAR \ - || { wget -q -O- $FSF_MIRROR/gcc/gcc-${GCC_VERSION}/${TAR%bz2}gz \ - | gzip -cd | bzip2 -9 >${TAR}; } - fi -) +if [ ! -e ${REPO} ]; then + cd ${SRCDIR} + git clone ${GIT_REPO} gcc || exit $? fi -if [ ! -e $SRC ]; then - ( cd $SRCDIR && tar -xjf $DOWNLOADS/$TAR ) -fi +cd ${REPO} || exit $? +git checkout releases/gcc-${GCC_VERSION} || exit $? +rm -rf gmp* mpfr* mpc* isl* || exit $? +./contrib/download_prerequisites +mkdir -p ${BUILD} || exit $? +cd ${BUILD} || exit $? -${SRC}/configure \ +${REPO}/configure \ --disable-linux-futex \ --disable-mudflap \ --disable-nls \ --enable-languages=c,c++ \ --enable-threads=posix \ --enable-tls \ - --prefix=$PREFIX \ - --with-gmp=$GMP_PREFIX \ - --with-mpfr=$MPFR_PREFIX \ - --with-mpc=$MPC_PREFIX + --prefix=$PREFIX -time { make -s && make -s install; } +time { ${MAKE} -s && ${MAKE} -s install; } |
From: Florian K. <fl...@ei...> - 2024-12-14 22:30:47
|
On 14.12.24 21:59, Paul Floyd via Valgrind-developers wrote: > > On 25/11/2024 18:50, Mark Wielaard wrote: >> Mythic Beasts used to run svn.valgrind.org for us but it seems to got >> shut down after the git conversion. >> https://bugs.kde.org/show_bug.cgi?id=387825 >> >> Unfortunately I don't know of any backups. > > Have you tried contacing Mythic Beasts? > Julian seems to have an svn backup and was kind enough to dig out the stuff I was interested in. Florian |
From: Paul F. <pj...@wa...> - 2024-12-14 20:59:17
|
On 25/11/2024 18:50, Mark Wielaard wrote: > Mythic Beasts used to run svn.valgrind.org for us but it seems to got > shut down after the git conversion. > https://bugs.kde.org/show_bug.cgi?id=387825 > > Unfortunately I don't know of any backups. Have you tried contacing Mythic Beasts? A+ Paul |
From: Paul F. <pj...@wa...> - 2024-12-14 18:59:24
|
On 26-10-24 16:58, D. J. Bernstein wrote: > Paul Floyd via Valgrind-developers writes: >> 1. Using a / in environment variables doesn't work with most (all?) shells. > > Also hyphens; but, as noted in my previous message, this is only a minor > disadvantage since one can set the variables using env rather than shell > builtins. This is also what the tests in the patch do, and it works for > the intended use case of simplifying scripts. Sorry to be so difficult, but I think that it's best to get things like this right before letting them out into the wild. How about just having VALGRIND_TRYOPTS or VALGRIND_TRY_OPTS. That would be the same as VALGRIND_OPTS but not result in failure if there's an unrecognized option. A+ Paul |
From: Paul F. <pa...@so...> - 2024-12-14 06:32:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dde2a72c47bb6625868e28896cf4cc0be2017a2b commit dde2a72c47bb6625868e28896cf4cc0be2017a2b Author: Paul Floyd <pj...@wa...> Date: Sat Dec 14 07:31:30 2024 +0100 FreeBSD: add a suppression for reachable from __cxa_exit Diff: --- freebsd.supp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/freebsd.supp b/freebsd.supp index 74e2bf2b28..0a392fecb6 100644 --- a/freebsd.supp +++ b/freebsd.supp @@ -180,3 +180,11 @@ obj:*/lib*/libc.so.7 fun:scanf } +{ + MEMCHECK-LIBC-__CXA_ATEXIT + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + obj:/lib/libc.so.7 + fun:__cxa_atexit +} |
From: 罗勇刚(Yonggang L. <luo...@gm...> - 2024-12-13 18:34:44
|
On Fri, Dec 13, 2024 at 4:55 AM Bart Van Assche <bar...@gm...> wrote: > > On 12/12/24 3:18 AM, 罗勇刚(Yonggang Luo) wrote: > > uintptr is fine, but I am not sure every compiler have ` uintptr_t`, > > that depends on header file > > We can ask Windows users to include <stdint.h> before > <valgrind/valgrind.h>. We can't ask this from Unix users because this > could break existing code bases. In other words, I'm in favor of using > uintptr_t for Win64 instead of unsigned long long. > Update the patch to not affect Unix users, handling cases for PLAT_amd64_win64 in separate code so that it's won't affect Unix users in Patch V5 > Thanks, > > Bart. -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo |
From: Yonggang L. <luo...@gm...> - 2024-12-13 18:32:27
|
Always include uintptr_t for win32, as we use uintptr_t. sizeof(unsigned long int) is 4 on mingw 64bit, use uintptr_t int instead, that's the same with MSVC 64bit __clang__ for MSVC support for GCC inline assembly _MSC_VER for PLAT_amd64_win64 does not support inline assembly, use stub instead, may be fixed use machine code. The compiling for MSVC,CLANG,GCC are checked Signed-off-by: Yonggang Luo <luo...@gm...> --- include/valgrind.h.in | 121 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 116 insertions(+), 5 deletions(-) diff --git a/include/valgrind.h.in b/include/valgrind.h.in index bc18f40f7..e4867c333 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -94,6 +94,10 @@ #include <stdarg.h> +#ifdef _WIN32 +#include <stdint.h> +#endif + /* Nb: this file might be included in a file compiled with -ansi. So we can't use C++ style "//" comments nor the "asm" keyword (instead use "__asm__"). */ @@ -403,12 +407,11 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, #endif /* PLAT_x86_win32 */ -/* ----------------- amd64-{linux,darwin,solaris} --------------- */ +/* ----------------- amd64-{linux,darwin,solaris,freebsd} --------------- */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ || defined(PLAT_amd64_solaris) \ - || defined(PLAT_amd64_freebsd) \ - || (defined(PLAT_amd64_win64) && defined(__GNUC__)) + || defined(PLAT_amd64_freebsd) typedef struct { @@ -468,14 +471,122 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ + || defined(PLAT_amd64_freebsd) */ /* ------------------------- amd64-Win64 ------------------------- */ -#if defined(PLAT_amd64_win64) && !defined(__GNUC__) +#if defined(PLAT_amd64_win64) + +typedef + struct { + uintptr_t nraddr; /* where's the code? */ + } + OrigFn; + +#if defined(__GNUC__) || defined(__clang__) + +#define __SPECIAL_INSTRUCTION_PREAMBLE \ + "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \ + "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + __extension__ \ + ({ volatile uintptr_t _zzq_args[6]; \ + volatile uintptr_t _zzq_result; \ + _zzq_args[0] = (uintptr_t)(_zzq_request); \ + _zzq_args[1] = (uintptr_t)(_zzq_arg1); \ + _zzq_args[2] = (uintptr_t)(_zzq_arg2); \ + _zzq_args[3] = (uintptr_t)(_zzq_arg3); \ + _zzq_args[4] = (uintptr_t)(_zzq_arg4); \ + _zzq_args[5] = (uintptr_t)(_zzq_arg5); \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %RDX = client_request ( %RAX ) */ \ + "xchgq %%rbx,%%rbx" \ + : "=d" (_zzq_result) \ + : "a" (&_zzq_args[0]), "0" (_zzq_default) \ + : "cc", "memory" \ + ); \ + _zzq_result; \ + }) + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile uintptr_t __addr; \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + /* %RAX = guest_NRADDR */ \ + "xchgq %%rcx,%%rcx" \ + : "=a" (__addr) \ + : \ + : "cc", "memory" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_RAX \ + __SPECIAL_INSTRUCTION_PREAMBLE \ + /* call-noredir *%RAX */ \ + "xchgq %%rdx,%%rdx\n\t" + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ + "xchgq %%rdi,%%rdi\n\t" \ + : : : "cc", "memory" \ + ); \ + } while (0) + +#elif defined(_MSC_VER) + +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + valgrind_do_client_request_expr((uintptr_t)(_zzq_default), \ + (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1), \ + (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3), \ + (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5)) + +static __inline uintptr_t +valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, + uintptr_t _zzq_arg1, uintptr_t _zzq_arg2, + uintptr_t _zzq_arg3, uintptr_t _zzq_arg4, + uintptr_t _zzq_arg5) +{ + volatile uintptr_t _zzq_args[6]; + volatile uintptr_t _zzq_result = 0; + _zzq_args[0] = (uintptr_t)(_zzq_request); + _zzq_args[1] = (uintptr_t)(_zzq_arg1); + _zzq_args[2] = (uintptr_t)(_zzq_arg2); + _zzq_args[3] = (uintptr_t)(_zzq_arg3); + _zzq_args[4] = (uintptr_t)(_zzq_arg4); + _zzq_args[5] = (uintptr_t)(_zzq_arg5); + /* TODO: use machine code to support for MSVC 64 bit*/ + return _zzq_result; +} + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile uintptr_t __addr; \ + /* TODO: use machine code to support for MSVC 64 bit*/ \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_RAX ERROR + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + /* TODO: use machine code to support for MSVC 64 bit*/ \ +} while (0) + +#else /* !defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER) */ #error Unsupported compiler. +#endif /* defined(__GNUC__) || defined(__clang__) */ + #endif /* PLAT_amd64_win64 */ /* ------------------------ ppc32-linux ------------------------ */ -- 2.47.1.windows.1 |
From: Bart V. A. <bar...@gm...> - 2024-12-12 20:55:24
|
On 12/12/24 3:18 AM, 罗勇刚(Yonggang Luo) wrote: > uintptr is fine, but I am not sure every compiler have ` uintptr_t`, > that depends on header file We can ask Windows users to include <stdint.h> before <valgrind/valgrind.h>. We can't ask this from Unix users because this could break existing code bases. In other words, I'm in favor of using uintptr_t for Win64 instead of unsigned long long. Thanks, Bart. |
From: Paul F. <pj...@wa...> - 2024-12-12 20:40:52
|
On 12/12/2024 12:18, 罗勇刚(Yonggang Luo) wrote: > > > On Thu, Dec 12, 2024 at 7:24 PM Mark Wielaard <ma...@kl...> wrote: > > > > On Thu, Dec 12, 2024 at 03:36:26PM +0800, 罗勇刚(Yonggang Luo) wrote: > > > Any reviews? I think this can be get merged > > > > There were a couple of questions which I am not sure I saw an answer > > to. Could you explain how you tested? Why aren't you creating a new > > section for win64? You are adding it as a variant of 64bit > This is already the section for win64/mingw > > > linux/freebsd, but then need to change the data type of some, why is > sizeof(unsigned long int) === 8*8 on linux/freebsd, but > sizeof(unsigned long int) === 4*8 on PLAT_amd64_win64(mingw/msvc) > mingw > > > that OK for the existing platforms? The patch Bart added for win32 > > used uintptr, which seems a better data type than long long. > uintptr is fine, but I am not sure every compiler have ` uintptr_t`, that depends on header file > > `unsigned long long it` is always safe for every compiler(without no need the header) No it isn't. All variations of "long long" were added with C99. https://en.cppreference.com/w/c/language/arithmetic_types I would be very surprised if there aren't people still using the Valgrind headers and compiling with c90. I think that the type used should either be compatible with the oldest compilers (along the lines Mark’s suggestion) or else there should be a separate section for win32 non-__GNUC__. I'll have a look at Dr Memory. I think that it uses the same mechanism for client requests and also supports Windows. A+ Paul |
From: Bart V. A. <bar...@gm...> - 2024-12-12 17:08:22
|
On 12/11/24 3:02 AM, Yonggang Luo wrote: > sizeof(unsigned long int) is 4 on mingw 64bit, use unsigned long long int instead > > __clang__ for MSVC support for inline assembly > > _MSC_VER win64 do not support inline assembly, use stub instead Please follow the "one change per patch" rule. There are multiple unrelated changes in this patch. A few examples: - Changing "unsigned long int" into "unsigned long long int" should be a patch by itself. - Adding support for MSVC (_MSC_VER) should be a patch by itself too. Bart. |
From: 罗勇刚(Yonggang L. <luo...@gm...> - 2024-12-12 16:28:45
|
On Thu, Dec 12, 2024 at 7:24 PM Mark Wielaard <ma...@kl...> wrote: > > On Thu, Dec 12, 2024 at 03:36:26PM +0800, 罗勇刚(Yonggang Luo) wrote: > > Any reviews? I think this can be get merged > > There were a couple of questions which I am not sure I saw an answer > to. Could you explain how you tested? Why aren't you creating a new > section for win64? You are adding it as a variant of 64bit This is already the section for win64/mingw > linux/freebsd, but then need to change the data type of some, why is sizeof(unsigned long int) === 8*8 on linux/freebsd, but sizeof(unsigned long int) === 4*8 on PLAT_amd64_win64(mingw/msvc) mingw > that OK for the existing platforms? The patch Bart added for win32 > used uintptr, which seems a better data type than long long. uintptr is fine, but I am not sure every compiler have ` uintptr_t`, that depends on header file `unsigned long long it` is always safe for every compiler(without no need the header) PLAT_amd64_win64 > > Thanks, > > Mark -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo |
From: Mark W. <ma...@kl...> - 2024-12-12 11:24:20
|
On Thu, Dec 12, 2024 at 03:36:26PM +0800, 罗勇刚(Yonggang Luo) wrote: > Any reviews? I think this can be get merged There were a couple of questions which I am not sure I saw an answer to. Could you explain how you tested? Why aren't you creating a new section for win64? You are adding it as a variant of 64bit linux/freebsd, but then need to change the data type of some, why is that OK for the existing platforms? The patch Bart added for win32 used uintptr, which seems a better data type than long long. Thanks, Mark |
From: 罗勇刚(Yonggang L. <luo...@gm...> - 2024-12-12 07:36:45
|
Any reviews? I think this can be get merged On Thu, Dec 12, 2024 at 2:27 AM Bart Van Assche via Valgrind-developers < val...@li...> wrote: > > On 12/10/24 11:43 PM, Paul Floyd via Valgrind-developers wrote: > > Is anybody using the client requests on Windows (with a tool such as > > Valgrind or Dr Memory)? Or is it just for compatibility when building? > > I added Windows support in this header file a long time ago to support > the Valgrind + Wine + Windows software combination. I'm not sure > whether anyone is still using this combination. > > Bart. > > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo |
From: Bart V. A. <bva...@ac...> - 2024-12-11 18:25:17
|
On 12/10/24 11:43 PM, Paul Floyd via Valgrind-developers wrote: > Is anybody using the client requests on Windows (with a tool such as > Valgrind or Dr Memory)? Or is it just for compatibility when building? I added Windows support in this header file a long time ago to support the Valgrind + Wine + Windows software combination. I'm not sure whether anyone is still using this combination. Bart. |
From: Yonggang L. <luo...@gm...> - 2024-12-11 11:03:21
|
sizeof(unsigned long int) is 4 on mingw 64bit, use unsigned long long int instead __clang__ for MSVC support for inline assembly _MSC_VER win64 do not support inline assembly, use stub instead Signed-off-by: Yonggang Luo <luo...@gm...> --- include/valgrind.h.in | 76 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/include/valgrind.h.in b/include/valgrind.h.in index bc18f40f7..12da318ea 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -403,19 +403,20 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, #endif /* PLAT_x86_win32 */ -/* ----------------- amd64-{linux,darwin,solaris} --------------- */ +/* ----------------- amd64-{linux,darwin,solaris,freebsd,win64} --------------- */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ || defined(PLAT_amd64_solaris) \ || defined(PLAT_amd64_freebsd) \ - || (defined(PLAT_amd64_win64) && defined(__GNUC__)) + || defined(PLAT_amd64_win64) typedef struct { - unsigned long int nraddr; /* where's the code? */ + unsigned long long int nraddr; /* where's the code? */ } OrigFn; +#if defined(__GNUC__) || defined(__clang__) #define __SPECIAL_INSTRUCTION_PREAMBLE \ "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \ "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" @@ -424,14 +425,14 @@ typedef _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ __extension__ \ - ({ volatile unsigned long int _zzq_args[6]; \ - volatile unsigned long int _zzq_result; \ - _zzq_args[0] = (unsigned long int)(_zzq_request); \ - _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ - _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ - _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ - _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ - _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + ({ volatile unsigned long long int _zzq_args[6]; \ + volatile unsigned long long int _zzq_result; \ + _zzq_args[0] = (unsigned long long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RDX = client_request ( %RAX ) */ \ "xchgq %%rbx,%%rbx" \ @@ -444,7 +445,7 @@ typedef #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ - volatile unsigned long int __addr; \ + volatile unsigned long long int __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RAX = guest_NRADDR */ \ "xchgq %%rcx,%%rcx" \ @@ -468,15 +469,58 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#elif defined(_MSC_VER) -/* ------------------------- amd64-Win64 ------------------------- */ +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + valgrind_do_client_request_expr((uintptr_t)(_zzq_default), \ + (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1), \ + (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3), \ + (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5)) -#if defined(PLAT_amd64_win64) && !defined(__GNUC__) +static __inline uintptr_t +valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, + uintptr_t _zzq_arg1, uintptr_t _zzq_arg2, + uintptr_t _zzq_arg3, uintptr_t _zzq_arg4, + uintptr_t _zzq_arg5) +{ + volatile uintptr_t _zzq_args[6]; + volatile uintptr_t _zzq_result = 0; + _zzq_args[0] = (uintptr_t)(_zzq_request); + _zzq_args[1] = (uintptr_t)(_zzq_arg1); + _zzq_args[2] = (uintptr_t)(_zzq_arg2); + _zzq_args[3] = (uintptr_t)(_zzq_arg3); + _zzq_args[4] = (uintptr_t)(_zzq_arg4); + _zzq_args[5] = (uintptr_t)(_zzq_arg5); + /* TODO: use machine code to support for MSVC 64 bit*/ + return _zzq_result; +} + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile uintptr_t __addr; \ + /* TODO: use machine code to support for MSVC 64 bit*/ \ + _zzq_orig->nraddr = __addr; \ + } + +#define VALGRIND_CALL_NOREDIR_RAX ERROR + +#define VALGRIND_VEX_INJECT_IR() \ + do { \ + /* TODO: use machine code to support for MSVC 64 bit*/ \ +} while (0) + +#else /* !defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER) */ #error Unsupported compiler. -#endif /* PLAT_amd64_win64 */ +#endif /* defined(__GNUC__) || defined(__clang__) */ + +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ + || defined(PLAT_amd64_freebsd) \ + || defined(PLAT_amd64_win64) */ /* ------------------------ ppc32-linux ------------------------ */ -- 2.46.0.windows.1 |
From: Paul F. <pj...@wa...> - 2024-12-11 07:43:18
|
On 10-12-24 16:21, 罗勇刚(Yonggang Luo) wrote: > For jerryscript on windows https://github.com/jerryscript-project/ > jerryscript <https://github.com/jerryscript-project/jerryscript> > > and maybe also others Hi It looks to me as though this is using client requests for a custom memory allocator. Is anybody using the client requests on Windows (with a tool such as Valgrind or Dr Memory)? Or is it just for compatibility when building? A+ Paul |
From: 罗勇刚(Yonggang L. <luo...@gm...> - 2024-12-10 15:24:59
|
On Mon, Dec 9, 2024 at 8:29 PM Mark Wielaard <ma...@kl...> wrote: > > Hi Yonggang, > > On Sun, 2024-12-08 at 05:44 +0800, Yonggang Luo wrote: > > @@ -468,7 +468,10 @@ typedef > > ); \ > > } while (0) > > > > -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ > > +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ > > + || defined(PLAT_amd64_solaris) \ > > + || defined(PLAT_amd64_freebsd) \ > > + || (defined(PLAT_amd64_win64) && defined(__GNUC__)) */ > > > > /* ------------------------- amd64-Win64 ------------------------- */ > > Should this be its own thing? > > We do have some minimal PLAT_amd64_win32 support see > https://bugs.kde.org/show_bug.cgi?id=210935 > but that is its own thing and only works for compiling client requests > that are triggered under Wine. > > The original support for mingw64 seemed to use uintptr instead. > See commit 045b8ab23eca0881b9847aa09c74bbacd19a55d7 There is no uintptr in 045b8ab23eca0881b9847aa09c74bbacd19a55d7 > > Thanks, > > Mark -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo |
From: 罗勇刚(Yonggang L. <luo...@gm...> - 2024-12-10 15:21:45
|
On Mon, Dec 9, 2024 at 2:41 PM Paul Floyd via Valgrind-developers < val...@li...> wrote: > > Hi > > What are you using Valgrind for on Windows? For jerryscript on windows https://github.com/jerryscript-project/jerryscript and maybe also others > > > A+ > Paul > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo |
From: Paul F. <pa...@so...> - 2024-12-10 07:51:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d9f4746a8815ca4a57639f5213405c81d13ab8cd commit d9f4746a8815ca4a57639f5213405c81d13ab8cd Author: Paul Floyd <pj...@wa...> Date: Tue Dec 10 08:49:04 2024 +0100 FreeBSD regtest: update getrlimit for FreeBSD 14.2 More output and memory counts are quite variable. Diff: --- memcheck/tests/freebsd/getrlimitusage.c | 6 ++++-- memcheck/tests/freebsd/getrlimitusage.stderr.exp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/memcheck/tests/freebsd/getrlimitusage.c b/memcheck/tests/freebsd/getrlimitusage.c index 123ab18ad8..2006de00da 100644 --- a/memcheck/tests/freebsd/getrlimitusage.c +++ b/memcheck/tests/freebsd/getrlimitusage.c @@ -87,14 +87,16 @@ int main(int argc, char *argv[]) case 7: case 9: case 12: + case 13: + case 14: case 15: res = 0U; break; case 5: - res = res/100000 * 100000; + res = res/10000000 * 10000000; break; case 10: - res = res/1000 * 1000; + res = res/100000000 * 100000000; break; default: break; diff --git a/memcheck/tests/freebsd/getrlimitusage.stderr.exp b/memcheck/tests/freebsd/getrlimitusage.stderr.exp index 2a1ecb3eaa..a5b5f33bb2 100644 --- a/memcheck/tests/freebsd/getrlimitusage.stderr.exp +++ b/memcheck/tests/freebsd/getrlimitusage.stderr.exp @@ -3,12 +3,12 @@ fsize (1): -1 data (2): 4096 stack (3): 16777216 core (4): -1 -rss (5): 41800000 +rss (5): 40000000 memlock (6): 0 nproc (7): 0 nofile (8): 3 sbsize (9): 0 -vmem (10): 106414000 +vmem (10): 100000000 npts (11): 0 swap (12): 0 kqueues (13): 0 |
From: Mark W. <ma...@kl...> - 2024-12-09 12:29:23
|
Hi Yonggang, On Sun, 2024-12-08 at 05:44 +0800, Yonggang Luo wrote: > @@ -468,7 +468,10 @@ typedef > ); \ > } while (0) > > -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ > +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ > + || defined(PLAT_amd64_solaris) \ > + || defined(PLAT_amd64_freebsd) \ > + || (defined(PLAT_amd64_win64) && defined(__GNUC__)) */ > > /* ------------------------- amd64-Win64 ------------------------- */ Should this be its own thing? We do have some minimal PLAT_amd64_win32 support see https://bugs.kde.org/show_bug.cgi?id=210935 but that is its own thing and only works for compiling client requests that are triggered under Wine. The original support for mingw64 seemed to use uintptr instead. See commit 045b8ab23eca0881b9847aa09c74bbacd19a55d7 Thanks, Mark |
From: Mark W. <ma...@so...> - 2024-12-09 12:12:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a2c30f44ac39eb36baa4e831b041fe7cdf25e481 commit a2c30f44ac39eb36baa4e831b041fe7cdf25e481 Author: Mark Wielaard <ma...@kl...> Date: Fri Dec 6 15:39:25 2024 +0100 Recognize new DWARF5 DW_LANG constants When using --read-var-info=yes readdwarf3 will try to read and interpret the CU DW_AT_langauge attribute. Since DWARF5 was released a number if new language constants have been introduced. See https://dwarfstd.org/languages.html GCC15 might start emitting some of these when switching to C23 by default. When valgrind --read-var-info=yes encounters an unknown DW_LANG constant it will produce an error and stop processing any further DWARF. Recognize all currently known language constants. In particular recognize DW_LANG_C17, DW_LANG_C23, DW_LANG_C_plus_plus_17, DW_LANG_C_plus_plus_20, DW_LANG_C_plus_plus_23, DW_LANG_Fortran18, DW_LANG_Fortran23, DW_LANG_Ada2005, DW_LANG_Ada2012 and DW_LANG_Rust. https://bugs.kde.org/show_bug.cgi?id=497130 (cherry picked from commit 7136316123c54aba37fdab166e1bf860e452a4ae) Diff: --- NEWS | 1 + coregrind/m_debuginfo/priv_d3basics.h | 31 +++++++++++++++++++++++++++++++ coregrind/m_debuginfo/readdwarf3.c | 27 +++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7f1334aa0f..a25f9b6630 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ The following bugs have been fixed or resolved on this branch. 489913 WARNING: unhandled amd64-linux syscall: 444 (landlock_create_ruleset) 494246 syscall fsopen not wrapped +497130 Recognize new DWARF5 DW_LANG constants To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_debuginfo/priv_d3basics.h b/coregrind/m_debuginfo/priv_d3basics.h index 3f6e5c72c9..34c9872871 100644 --- a/coregrind/m_debuginfo/priv_d3basics.h +++ b/coregrind/m_debuginfo/priv_d3basics.h @@ -179,6 +179,7 @@ typedef enum dwarf_source_language /* DWARF 4. */ DW_LANG_Python = 0x0014, /* DWARF 5. */ + DW_LANG_OpenCL = 0x0015, DW_LANG_Go = 0x0016, DW_LANG_Modula3 = 0x0017, DW_LANG_Haskell = 0x0018, @@ -195,6 +196,36 @@ typedef enum dwarf_source_language DW_LANG_Fortran08 = 0x0023, DW_LANG_RenderScript = 0x0024, DW_LANG_BLISS = 0x0025, + /* Language codes added since DWARF 5. + https://dwarfstd.org/languages.html */ + DW_LANG_Kotlin = 0x0026, + DW_LANG_Zig = 0x0027, + DW_LANG_Crystal = 0x0028, + DW_LANG_C_plus_plus_17 = 0x002a, + DW_LANG_C_plus_plus_20 = 0x002b, + DW_LANG_C17 = 0x002c, + DW_LANG_Fortran18 = 0x002d, + DW_LANG_Ada2005 = 0x002e, + DW_LANG_Ada2012 = 0x002f, + DW_LANG_HIP = 0x0030, + DW_LANG_Assembly = 0x0031, + DW_LANG_C_sharp = 0x0032, + DW_LANG_Mojo = 0x0033, + DW_LANG_GLSL = 0x0034, + DW_LANG_GLSL_ES = 0x0035, + DW_LANG_HLSL = 0x0036, + DW_LANG_OpenCL_CPP = 0x0037, + DW_LANG_CPP_for_OpenCL = 0x0038, + DW_LANG_SYCL = 0x0039, + DW_LANG_C_plus_plus_23 = 0x003a, + DW_LANG_Odin = 0x003b, + DW_LANG_P4 = 0x003c, + DW_LANG_Metal = 0x003d, + DW_LANG_C23 = 0x003e, + DW_LANG_Fortran23 = 0x003f, + DW_LANG_Ruby = 0x0040, + DW_LANG_Move = 0x0041, + DW_LANG_Hylo = 0x0042, /* MIPS. */ DW_LANG_Mips_Assembler = 0x8001, /* UPC. */ diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index a4b75a8c53..735896f7c0 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -3972,19 +3972,42 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, case DW_LANG_C_plus_plus: case DW_LANG_ObjC: case DW_LANG_ObjC_plus_plus: case DW_LANG_UPC: case DW_LANG_Upc: case DW_LANG_C99: case DW_LANG_C11: + case DW_LANG_C17: case DW_LANG_C23: case DW_LANG_C_plus_plus_11: case DW_LANG_C_plus_plus_14: + case DW_LANG_C_plus_plus_17: case DW_LANG_C_plus_plus_20: + case DW_LANG_C_plus_plus_23: parser->language = 'C'; break; case DW_LANG_Fortran77: case DW_LANG_Fortran90: case DW_LANG_Fortran95: case DW_LANG_Fortran03: - case DW_LANG_Fortran08: + case DW_LANG_Fortran08: case DW_LANG_Fortran18: + case DW_LANG_Fortran23: parser->language = 'F'; break; case DW_LANG_Ada83: case DW_LANG_Ada95: + case DW_LANG_Ada2005: case DW_LANG_Ada2012: parser->language = 'A'; break; case DW_LANG_Cobol74: case DW_LANG_Cobol85: case DW_LANG_Pascal83: case DW_LANG_Modula2: case DW_LANG_Java: case DW_LANG_PLI: - case DW_LANG_D: case DW_LANG_Python: case DW_LANG_Go: + case DW_LANG_D: case DW_LANG_Python: + case DW_LANG_OpenCL: case DW_LANG_Go: + case DW_LANG_Modula3: case DW_LANG_Haskell: + case DW_LANG_OCaml: case DW_LANG_Rust: case DW_LANG_Swift: + case DW_LANG_Julia: case DW_LANG_Dylan: + case DW_LANG_RenderScript: case DW_LANG_BLISS: + case DW_LANG_Kotlin: case DW_LANG_Zig: + case DW_LANG_Crystal: case DW_LANG_HIP: + case DW_LANG_Assembly: case DW_LANG_C_sharp: + case DW_LANG_Mojo: case DW_LANG_GLSL: + case DW_LANG_GLSL_ES: case DW_LANG_HLSL: + case DW_LANG_OpenCL_CPP: case DW_LANG_CPP_for_OpenCL: + case DW_LANG_SYCL: + case DW_LANG_Odin: + case DW_LANG_P4: + case DW_LANG_Metal: + case DW_LANG_Ruby: + case DW_LANG_Move: + case DW_LANG_Hylo: case DW_LANG_Mips_Assembler: parser->language = '?'; break; default: |
From: Mark W. <ma...@so...> - 2024-12-09 12:07:33
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7136316123c54aba37fdab166e1bf860e452a4ae commit 7136316123c54aba37fdab166e1bf860e452a4ae Author: Mark Wielaard <ma...@kl...> Date: Fri Dec 6 15:39:25 2024 +0100 Recognize new DWARF5 DW_LANG constants When using --read-var-info=yes readdwarf3 will try to read and interpret the CU DW_AT_langauge attribute. Since DWARF5 was released a number if new language constants have been introduced. See https://dwarfstd.org/languages.html GCC15 might start emitting some of these when switching to C23 by default. When valgrind --read-var-info=yes encounters an unknown DW_LANG constant it will produce an error and stop processing any further DWARF. Recognize all currently known language constants. In particular recognize DW_LANG_C17, DW_LANG_C23, DW_LANG_C_plus_plus_17, DW_LANG_C_plus_plus_20, DW_LANG_C_plus_plus_23, DW_LANG_Fortran18, DW_LANG_Fortran23, DW_LANG_Ada2005, DW_LANG_Ada2012 and DW_LANG_Rust. https://bugs.kde.org/show_bug.cgi?id=497130 Diff: --- NEWS | 1 + coregrind/m_debuginfo/priv_d3basics.h | 31 +++++++++++++++++++++++++++++++ coregrind/m_debuginfo/readdwarf3.c | 27 +++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2651600222..06e42e577f 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 494337 All threaded applications cause still holding lock errors 495488 Add FreeBSD getrlimitusage syscall wrapper 496571 False positive for null key passed to bpf_map_get_next_key syscall. +497130 Recognize new DWARF5 DW_LANG constants To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_debuginfo/priv_d3basics.h b/coregrind/m_debuginfo/priv_d3basics.h index 3f6e5c72c9..34c9872871 100644 --- a/coregrind/m_debuginfo/priv_d3basics.h +++ b/coregrind/m_debuginfo/priv_d3basics.h @@ -179,6 +179,7 @@ typedef enum dwarf_source_language /* DWARF 4. */ DW_LANG_Python = 0x0014, /* DWARF 5. */ + DW_LANG_OpenCL = 0x0015, DW_LANG_Go = 0x0016, DW_LANG_Modula3 = 0x0017, DW_LANG_Haskell = 0x0018, @@ -195,6 +196,36 @@ typedef enum dwarf_source_language DW_LANG_Fortran08 = 0x0023, DW_LANG_RenderScript = 0x0024, DW_LANG_BLISS = 0x0025, + /* Language codes added since DWARF 5. + https://dwarfstd.org/languages.html */ + DW_LANG_Kotlin = 0x0026, + DW_LANG_Zig = 0x0027, + DW_LANG_Crystal = 0x0028, + DW_LANG_C_plus_plus_17 = 0x002a, + DW_LANG_C_plus_plus_20 = 0x002b, + DW_LANG_C17 = 0x002c, + DW_LANG_Fortran18 = 0x002d, + DW_LANG_Ada2005 = 0x002e, + DW_LANG_Ada2012 = 0x002f, + DW_LANG_HIP = 0x0030, + DW_LANG_Assembly = 0x0031, + DW_LANG_C_sharp = 0x0032, + DW_LANG_Mojo = 0x0033, + DW_LANG_GLSL = 0x0034, + DW_LANG_GLSL_ES = 0x0035, + DW_LANG_HLSL = 0x0036, + DW_LANG_OpenCL_CPP = 0x0037, + DW_LANG_CPP_for_OpenCL = 0x0038, + DW_LANG_SYCL = 0x0039, + DW_LANG_C_plus_plus_23 = 0x003a, + DW_LANG_Odin = 0x003b, + DW_LANG_P4 = 0x003c, + DW_LANG_Metal = 0x003d, + DW_LANG_C23 = 0x003e, + DW_LANG_Fortran23 = 0x003f, + DW_LANG_Ruby = 0x0040, + DW_LANG_Move = 0x0041, + DW_LANG_Hylo = 0x0042, /* MIPS. */ DW_LANG_Mips_Assembler = 0x8001, /* UPC. */ diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index a4b75a8c53..735896f7c0 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -3972,19 +3972,42 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, case DW_LANG_C_plus_plus: case DW_LANG_ObjC: case DW_LANG_ObjC_plus_plus: case DW_LANG_UPC: case DW_LANG_Upc: case DW_LANG_C99: case DW_LANG_C11: + case DW_LANG_C17: case DW_LANG_C23: case DW_LANG_C_plus_plus_11: case DW_LANG_C_plus_plus_14: + case DW_LANG_C_plus_plus_17: case DW_LANG_C_plus_plus_20: + case DW_LANG_C_plus_plus_23: parser->language = 'C'; break; case DW_LANG_Fortran77: case DW_LANG_Fortran90: case DW_LANG_Fortran95: case DW_LANG_Fortran03: - case DW_LANG_Fortran08: + case DW_LANG_Fortran08: case DW_LANG_Fortran18: + case DW_LANG_Fortran23: parser->language = 'F'; break; case DW_LANG_Ada83: case DW_LANG_Ada95: + case DW_LANG_Ada2005: case DW_LANG_Ada2012: parser->language = 'A'; break; case DW_LANG_Cobol74: case DW_LANG_Cobol85: case DW_LANG_Pascal83: case DW_LANG_Modula2: case DW_LANG_Java: case DW_LANG_PLI: - case DW_LANG_D: case DW_LANG_Python: case DW_LANG_Go: + case DW_LANG_D: case DW_LANG_Python: + case DW_LANG_OpenCL: case DW_LANG_Go: + case DW_LANG_Modula3: case DW_LANG_Haskell: + case DW_LANG_OCaml: case DW_LANG_Rust: case DW_LANG_Swift: + case DW_LANG_Julia: case DW_LANG_Dylan: + case DW_LANG_RenderScript: case DW_LANG_BLISS: + case DW_LANG_Kotlin: case DW_LANG_Zig: + case DW_LANG_Crystal: case DW_LANG_HIP: + case DW_LANG_Assembly: case DW_LANG_C_sharp: + case DW_LANG_Mojo: case DW_LANG_GLSL: + case DW_LANG_GLSL_ES: case DW_LANG_HLSL: + case DW_LANG_OpenCL_CPP: case DW_LANG_CPP_for_OpenCL: + case DW_LANG_SYCL: + case DW_LANG_Odin: + case DW_LANG_P4: + case DW_LANG_Metal: + case DW_LANG_Ruby: + case DW_LANG_Move: + case DW_LANG_Hylo: case DW_LANG_Mips_Assembler: parser->language = '?'; break; default: |
From: Paul F. <pj...@wa...> - 2024-12-09 06:40:53
|
Hi What are you using Valgrind for on Windows? A+ Paul |
From: Yonggang L. <luo...@gm...> - 2024-12-07 23:01:29
|
sizeof(unsigned long int) is 4 on mingw 64bit, use unsigned long long int instead __clang__ for MSVC support for inline assembly _MSC_VER win64 do not support inline assembly, use stub instead Signed-off-by: Yonggang Luo <luo...@gm...> --- include/valgrind.h.in | 67 ++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/include/valgrind.h.in b/include/valgrind.h.in index bc18f40f7..a6c6d429b 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -403,19 +403,20 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, #endif /* PLAT_x86_win32 */ -/* ----------------- amd64-{linux,darwin,solaris} --------------- */ +/* ----------------- amd64-{linux,darwin,solaris,freebsd,win64} --------------- */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ || defined(PLAT_amd64_solaris) \ || defined(PLAT_amd64_freebsd) \ - || (defined(PLAT_amd64_win64) && defined(__GNUC__)) + || defined(PLAT_amd64_win64) typedef struct { - unsigned long int nraddr; /* where's the code? */ + unsigned long long int nraddr; /* where's the code? */ } OrigFn; +#if defined(__GNUC__) || defined(__clang__) #define __SPECIAL_INSTRUCTION_PREAMBLE \ "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \ "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" @@ -424,14 +425,14 @@ typedef _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ __extension__ \ - ({ volatile unsigned long int _zzq_args[6]; \ - volatile unsigned long int _zzq_result; \ - _zzq_args[0] = (unsigned long int)(_zzq_request); \ - _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ - _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ - _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ - _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ - _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + ({ volatile unsigned long long int _zzq_args[6]; \ + volatile unsigned long long int _zzq_result; \ + _zzq_args[0] = (unsigned long long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RDX = client_request ( %RAX ) */ \ "xchgq %%rbx,%%rbx" \ @@ -444,7 +445,7 @@ typedef #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ - volatile unsigned long int __addr; \ + volatile unsigned long long int __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RAX = guest_NRADDR */ \ "xchgq %%rcx,%%rcx" \ @@ -468,15 +469,49 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#elif defined(_MSC_VER) -/* ------------------------- amd64-Win64 ------------------------- */ +#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ + _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ + valgrind_do_client_request_expr((uintptr_t)(_zzq_default), \ + (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1), \ + (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3), \ + (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5)) -#if defined(PLAT_amd64_win64) && !defined(__GNUC__) +static __inline uintptr_t +valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, + uintptr_t _zzq_arg1, uintptr_t _zzq_arg2, + uintptr_t _zzq_arg3, uintptr_t _zzq_arg4, + uintptr_t _zzq_arg5) +{ + volatile uintptr_t _zzq_args[6]; + volatile unsigned int _zzq_result = 0; + _zzq_args[0] = (uintptr_t)(_zzq_request); + _zzq_args[1] = (uintptr_t)(_zzq_arg1); + _zzq_args[2] = (uintptr_t)(_zzq_arg2); + _zzq_args[3] = (uintptr_t)(_zzq_arg3); + _zzq_args[4] = (uintptr_t)(_zzq_arg4); + _zzq_args[5] = (uintptr_t)(_zzq_arg5); + return _zzq_result; +} + +#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ + { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ + volatile unsigned int __addr = _ReturnAddress(); \ + _zzq_orig->nraddr = __addr; \ + } + +#else /* !defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER) */ #error Unsupported compiler. -#endif /* PLAT_amd64_win64 */ +#endif /* defined(__GNUC__) || defined(__clang__) */ + +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ + || defined(PLAT_amd64_freebsd) \ + || defined(PLAT_amd64_win64) */ /* ------------------------ ppc32-linux ------------------------ */ -- 2.46.0.windows.1 |
From: Yonggang L. <luo...@gm...> - 2024-12-07 21:47:49
|
Signed-off-by: Yonggang Luo <luo...@gm...> --- include/valgrind.h.in | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/include/valgrind.h.in b/include/valgrind.h.in index bc18f40f7..157b9559d 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -412,7 +412,7 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, typedef struct { - unsigned long int nraddr; /* where's the code? */ + unsigned long long int nraddr; /* where's the code? */ } OrigFn; @@ -424,14 +424,14 @@ typedef _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ __extension__ \ - ({ volatile unsigned long int _zzq_args[6]; \ - volatile unsigned long int _zzq_result; \ - _zzq_args[0] = (unsigned long int)(_zzq_request); \ - _zzq_args[1] = (unsigned long int)(_zzq_arg1); \ - _zzq_args[2] = (unsigned long int)(_zzq_arg2); \ - _zzq_args[3] = (unsigned long int)(_zzq_arg3); \ - _zzq_args[4] = (unsigned long int)(_zzq_arg4); \ - _zzq_args[5] = (unsigned long int)(_zzq_arg5); \ + ({ volatile unsigned long long int _zzq_args[6]; \ + volatile unsigned long long int _zzq_result; \ + _zzq_args[0] = (unsigned long long int)(_zzq_request); \ + _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ + _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ + _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ + _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ + _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RDX = client_request ( %RAX ) */ \ "xchgq %%rbx,%%rbx" \ @@ -444,7 +444,7 @@ typedef #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ - volatile unsigned long int __addr; \ + volatile unsigned long long int __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RAX = guest_NRADDR */ \ "xchgq %%rcx,%%rcx" \ @@ -468,7 +468,10 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#endif /* defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ + || defined(PLAT_amd64_freebsd) \ + || (defined(PLAT_amd64_win64) && defined(__GNUC__)) */ /* ------------------------- amd64-Win64 ------------------------- */ -- 2.46.0.windows.1 |