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: Florian K. <fk...@so...> - 2025-03-15 16:51:42
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c069c7a8cfbb90f5dbab915da78aa986743b1295 commit c069c7a8cfbb90f5dbab915da78aa986743b1295 Author: Florian Krohm <fl...@ei...> Date: Sat Mar 15 16:51:00 2025 +0000 s390x: Header file tweak Thou shalt write header files in a way that they are compilable entities on their own. Diff: --- VEX/priv/guest_s390_defs.h | 1 + none/tests/s390x/disasm-test/vex.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/VEX/priv/guest_s390_defs.h b/VEX/priv/guest_s390_defs.h index a64d563ec9..607773ad14 100644 --- a/VEX/priv/guest_s390_defs.h +++ b/VEX/priv/guest_s390_defs.h @@ -34,6 +34,7 @@ #include "libvex_basictypes.h" // offsetof #include "guest_generic_bb_to_IR.h" // DisResult #include "libvex_guest_s390x.h" // VexGuestS390XState +#include "main_util.h" // STATIC_ASSERT /* Convert one s390 insn to IR. See the type DisOneInstrFn in diff --git a/none/tests/s390x/disasm-test/vex.c b/none/tests/s390x/disasm-test/vex.c index fa7b48b7c3..a1847b42b5 100644 --- a/none/tests/s390x/disasm-test/vex.c +++ b/none/tests/s390x/disasm-test/vex.c @@ -24,7 +24,6 @@ #include "libvex_ir.h" // emptyIRSB #include "libvex.h" // LibVEX_Init -#include "main_util.h" // GRRR for guest_s390_defs.h which needs STATIC_ASSERT #include "guest_s390_defs.h" // disInstr_S390 #include "host_s390_defs.h" // s390_host_hwcaps #include "main_globals.h" // vex_traceflags |
From: Paul F. <pa...@so...> - 2025-03-14 20:57:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4d578ef2153133c8480489f2f88a3dc1ffddef85 commit 4d578ef2153133c8480489f2f88a3dc1ffddef85 Author: Paul Floyd <pj...@wa...> Date: Fri Mar 14 21:56:35 2025 +0100 Bug 501479 - Illumos DRD pthread_mutex_init wrapper errors Diff: --- NEWS | 3 ++- drd/drd_pthread_intercepts.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e6a2855852..4d4c7eec46 100644 --- a/NEWS +++ b/NEWS @@ -59,7 +59,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 499212 mmap() with MAP_ALIGNED() returns unaligned pointer 501119 memcheck/tests/pointer-trace fails when run on NFS filesystem 501194 Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any number of segment commands -501348 glibc built with -march=x86-64-v3 does not work due to ld.so memcmp +501348 glibc built with -march=x86-64-v3 does not work due to ld.so memcmp +501479 Illumos DRD pthread_mutex_init wrapper errors To see details of a given bug, visit diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index 7f20b0b4c2..bb92101931 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -876,6 +876,33 @@ PTH_FUNCS(int, pthreadZuonce, pthread_once_intercept, (pthread_once_t *once_control, void (*init_routine)(void)), (once_control, init_routine)); +#if defined(VGO_solaris) +// see https://bugs.kde.org/show_bug.cgi?id=501479 +// temporary (?) workaround +// Helgrind doesn't have this problem because it only redirects mutex_init +// and not thread_mutex_init which also uses pthread_mutexattr_gettype +// maybe DRD should do the same. +typedef struct{ + int pshared; + int protocol; + int prioceiling; + int type; + int robustness; +} workaround_mattr_t; + +static int +pthread_mutexattr_gettype_workaround(const pthread_mutexattr_t *attr, int *typep) +{ + workaround_mattr_t *ap; + + if (attr == NULL || (ap = attr->__pthread_mutexattrp) == NULL || + typep == NULL) + return (EINVAL); + *typep = ap->type; + return (0); +} +#endif + static __always_inline int pthread_mutex_init_intercept(pthread_mutex_t *mutex, const pthread_mutexattr_t* attr) @@ -885,8 +912,13 @@ int pthread_mutex_init_intercept(pthread_mutex_t *mutex, int mt; VALGRIND_GET_ORIG_FN(fn); mt = PTHREAD_MUTEX_DEFAULT; +#if !defined(VGO_solaris) if (attr) pthread_mutexattr_gettype(attr, &mt); +#else + if (attr) + pthread_mutexattr_gettype_workaround(attr, &mt); +#endif VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ_DRD_PRE_MUTEX_INIT, mutex, DRD_(pthread_to_drd_mutex_type)(mt), 0, 0, 0); |
From: Mark W. <ma...@kl...> - 2025-03-14 00:30:56
|
The Sourceware Project Leadership Committee would like to know who our users are, which hosted projects they feel part of, what services they rely on and what the priorities should be for new initiatives. https://nextcloud.sfconservancy.org/apps/forms/s/xmGgmJFzSb2FZNd58cXMtAZp The survey will run till the end of March and contains 20 quick questions (none of the questions are mandatory, please feel free to skip any you find not relevant, but any answer you give is helpful.) The overview page (where we will also publish the summary/results) is here https://sourceware.org/survey-2025 the direct link to the form is https://nextcloud.sfconservancy.org/apps/forms/s/xmGgmJFzSb2FZNd58cXMtAZp Also if you like to discuss this survey or give feedback another way there is the Sourceware Open Office this Friday 14 March at 16:00 UTC in #overseers on irc.libera.chat. To get the right time in your local timezone: $ date -d "Fri Mar 14 16:00 UTC 2025" Thanks, Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor, Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni |
From: Paul F. <pa...@so...> - 2025-03-13 19:52:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7ba2fe4f7d16f5880035e3d4154f72e60df19eea commit 7ba2fe4f7d16f5880035e3d4154f72e60df19eea Author: Paul Floyd <pj...@wa...> Date: Thu Mar 13 20:47:28 2025 +0100 Darwin: close fd after call to ML_(check_macho_and_get_rw_loads) I missed changing the code so that the VG_(close) happens for all platforms, not just non-Darwin. Diff: --- coregrind/m_debuginfo/debuginfo.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 18fd33535c..cd04720902 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1349,26 +1349,22 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) expected_rw_load_count = 0; + Bool check_ok = False; #if defined(VGO_darwin) - if (!ML_(check_macho_and_get_rw_loads)( actual_fd, &expected_rw_load_count )) - return 0; -#endif - + check_ok = ML_(check_macho_and_get_rw_loads)( actual_fd, &expected_rw_load_count ); +#else /* We're only interested in mappings of object files. */ -# if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) - - Bool elf_ok = ML_(check_elf_and_get_rw_loads) ( actual_fd, filename, &expected_rw_load_count, use_fd == -1 ); + check_ok = ML_(check_elf_and_get_rw_loads) ( actual_fd, filename, &expected_rw_load_count, use_fd == -1 ); +#endif if (use_fd == -1) { VG_(close)( actual_fd ); } - if (!elf_ok) { + if (!check_ok) { return 0; } -# endif - /* See if we have a DebugInfo for this filename. If not, create one. */ di = find_or_create_DebugInfo_for( filename ); |
From: Paul F. <pa...@so...> - 2025-03-13 07:37:38
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b65a739f2a63047565ac2d654931c95ae9d44b62 commit b65a739f2a63047565ac2d654931c95ae9d44b62 Author: Paul Floyd <pj...@wa...> Date: Thu Mar 13 08:35:17 2025 +0100 Darwin: change message for failure to open a binary Previously was always ELF, now either ELF or mach-o. Diff: --- coregrind/m_debuginfo/debuginfo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 6c4a692656..18fd33535c 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1329,12 +1329,16 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) SysRes fd = VG_(open)( filename, oflags, 0 ); if (sr_isError(fd)) { if (sr_Err(fd) != VKI_EACCES) { +#if defined(VGO_darwin) + const HChar* message = "can't open file to inspect mach-o header"; +#else + const HChar* message = "can't open file to inspect ELF header"; +#endif DebugInfo fake_di; VG_(memset)(&fake_di, 0, sizeof(fake_di)); fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); - ML_(symerr)(&fake_di, True, - "can't open file to inspect ELF header"); + ML_(symerr)(&fake_di, True, message); } return 0; } |
From: Florian K. <fk...@so...> - 2025-03-12 23:11:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=744e47c8ff5bd9a7908b63b9d053b32bac18d686 commit 744e47c8ff5bd9a7908b63b9d053b32bac18d686 Author: Florian Krohm <fl...@ei...> Date: Wed Mar 12 23:10:06 2025 +0000 s390x: Fix BZ 496950 Adding a new hardware capability requires changes in several places. Generally for a new FOO hardware capability: - add VEX_HWCAPS_S390X_FOO and update VEX_HWCAPS_S390X_ALL in libvex.h - test the corresponding facility bit in m_machine.c - add s390_host_has_foo in host_s390_defs.h - if an insn requiring FOO cannot be implemented on the host by other means - add EmFail_S390X_foo in libvex_emnote.h - handle EmFail_S390X_foo in main_main.c - update function show_hwcaps_s390x Occasionally something gets forgotten and this patch adds the forgotten pieces. Also add new hardware capabilities vxe2, vxd, msa, msa4, msa8, msa9 Fixes: https://bugs.kde.org/show_bug.cgi?id=496950 Diff: --- NEWS | 1 + VEX/priv/host_s390_defs.h | 14 ++++++++++ VEX/priv/main_main.c | 47 ++++++++++++++++++++++++++++++++- VEX/pub/libvex.h | 20 +++++++++++--- VEX/pub/libvex_emnote.h | 36 +++++++++++++++++++++++-- coregrind/m_extension/extension-s390x.c | 3 +-- coregrind/m_machine.c | 8 ++++++ 7 files changed, 120 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 7025d61af7..e6a2855852 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 495816 s390x: Fix disassembler segfault for C[G]RT and CL[G]RT 496370 Illumos: signal handling is broken 496571 False positive for null key passed to bpf_map_get_next_key syscall. +496950 s390x: Fix hardware capabilities and EmFail codes 497130 Recognize new DWARF5 DW_LANG constants 497455 Update drd/scripts/download-and-build-gcc 497723 Enabling Ada demangling breaks callgrind differentiation between diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 957585c396..dcdb6713e9 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -939,6 +939,8 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_VX)) #define s390_host_has_msa5 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA5)) +#define s390_host_has_mi2 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MI2)) #define s390_host_has_lsc2 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC2)) #define s390_host_has_vxe \ @@ -947,6 +949,18 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_NNPA)) #define s390_host_has_dflt \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_DFLT)) +#define s390_host_has_vxe2 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXE2)) +#define s390_host_has_vxd \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXD)) +#define s390_host_has_msa \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA)) +#define s390_host_has_msa4 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA4)) +#define s390_host_has_msa8 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA8)) +#define s390_host_has_msa9 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA9)) #endif /* ndef __VEX_HOST_S390_DEFS_H */ /*---------------------------------------------------------------*/ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 91bb3bbbff..80f6d6a6d6 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1561,7 +1561,45 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) case EmFail_S390X_vx: return "Encountered an instruction that requires the vector facility.\n" " That facility is not available on this host"; - default: + case EmFail_S390X_ppno: + return "Instruction ppno is not supported on this host."; + case EmFail_S390X_vxe: + return "Encountered an instruction that requires the vector-extensions" + " facility 1.\n" + " That facility is not available on this host"; + case EmFail_S390X_dflt: + return "Encountered an instruction that requires the deflate-conversion" + " facility.\n" + " That facility is not available on this host"; + case EmFail_S390X_nnpa: + return "Encountered an instruction that requires the" + " neural-network-processing-assist facility.\n" + " That facility is not available on this host"; + case EmFail_S390X_vxe2: + return "Encountered an instruction that requires the vector-extensions\n" + " facility 2.\n" + " That facility is not available on this host"; + case EmFail_S390X_vxd: + return "Encountered an instruction that requires the vector-packed-decimal\n" + " facility.\n" + " That facility is not available on this host"; + case EmFail_S390X_msa: + return "Encountered an instruction that requires the message-security" + " assist.\n" + " That assist is not available on this host"; + case EmFail_S390X_msa4: + return "Encountered an instruction that requires the" + " message-security-assist extension 4.\n" + " That extension is not available on this host"; + case EmFail_S390X_msa8: + return "Encountered an instruction that requires the" + " message-security-assist extension 8.\n" + " That extension is not available on this host"; + case EmFail_S390X_msa9: + return "Encountered an instruction that requires the" + " message-security-assist extension 9.\n" + " That extension is not available on this host"; + default: vpanic("LibVEX_EmNote_string: unknown warning"); } } @@ -1894,7 +1932,14 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_MI2, "mi2" }, { VEX_HWCAPS_S390X_LSC2, "lsc2" }, { VEX_HWCAPS_S390X_VXE, "vxe" }, + { VEX_HWCAPS_S390X_NNPA, "nnpa" }, { VEX_HWCAPS_S390X_DFLT, "dflt" }, + { VEX_HWCAPS_S390X_VXE2, "vxe2" }, + { VEX_HWCAPS_S390X_VXD, "vxd" }, + { VEX_HWCAPS_S390X_MSA, "msa" }, + { VEX_HWCAPS_S390X_MSA4, "msa4" }, + { VEX_HWCAPS_S390X_MSA8, "msa8" }, + { VEX_HWCAPS_S390X_MSA9, "msa9" }, }; /* Allocate a large enough buffer */ static HChar buf[sizeof prefix + diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index d99be23a02..2dbfbe770e 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -134,7 +134,7 @@ typedef /* s390x: Hardware capability encoding Bits [26:31] encode the machine model (see VEX_S390X_MODEL... below) - Bits [0:20] encode specific hardware capabilities + Bits [0:25] encode specific hardware capabilities (see VEX_HWAPS_S390X_... below) */ @@ -174,12 +174,18 @@ typedef #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ -#define VEX_HWCAPS_S390X_MSA5 (1<<19) /* message security assistance facility */ -#define VEX_HWCAPS_S390X_MI2 (1<<20) /* miscellaneous-instruction-extensions facility 2 */ +#define VEX_HWCAPS_S390X_MSA5 (1<<19) /* Message-security-assistance facility 5 */ +#define VEX_HWCAPS_S390X_MI2 (1<<20) /* Miscellaneous-instruction-extensions facility 2 */ #define VEX_HWCAPS_S390X_LSC2 (1<<21) /* Conditional load/store facility2 */ #define VEX_HWCAPS_S390X_VXE (1<<22) /* Vector-enhancements facility */ #define VEX_HWCAPS_S390X_NNPA (1<<23) /* NNPA facility */ #define VEX_HWCAPS_S390X_DFLT (1<<24) /* Deflate-conversion facility */ +#define VEX_HWCAPS_S390X_VXE2 (1<<25) /* Vector-enhancements facility 2 */ +#define VEX_HWCAPS_S390X_VXD (1<<26) /* Vector packed-decimal facility */ +#define VEX_HWCAPS_S390X_MSA (1<<27) /* Message-security assist */ +#define VEX_HWCAPS_S390X_MSA4 (1<<28) /* Message-security-assist extension 4 */ +#define VEX_HWCAPS_S390X_MSA8 (1<<29) /* Message-security-assist extension 8 */ +#define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ #define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_LDISP | \ @@ -200,7 +206,13 @@ typedef VEX_HWCAPS_S390X_LSC2 | \ VEX_HWCAPS_S390X_VXE | \ VEX_HWCAPS_S390X_NNPA | \ - VEX_HWCAPS_S390X_DFLT) + VEX_HWCAPS_S390X_DFLT | \ + VEX_HWCAPS_S390X_VXE2 | \ + VEX_HWCAPS_S390X_VXD | \ + VEX_HWCAPS_S390X_MSA | \ + VEX_HWCAPS_S390X_MSA4 | \ + VEX_HWCAPS_S390X_MSA8 | \ + VEX_HWCAPS_S390X_MSA9) #define VEX_HWCAPS_S390X(x) ((x) & ~VEX_S390X_MODEL_MASK) #define VEX_S390X_MODEL(x) ((x) & VEX_S390X_MODEL_MASK) diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 77880a2702..c3ebcf4203 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -124,10 +124,42 @@ typedef /* ppno insn is not supported on this host */ EmFail_S390X_ppno, - /* insn needs vector-enhancements facility which is not available on this - host */ + /* insn needs vector-enhancements facility 1 which is not available on + this host */ EmFail_S390X_vxe, + /* insn needs deflate-conversion facility which is not available on + this host */ + EmFail_S390X_dflt, + + /* insn needs neural-network-processing-assist facility which is not + available on this host */ + EmFail_S390X_nnpa, + + /* insn needs vector-enhancements facility 2 which is not available on + this host */ + EmFail_S390X_vxe2, + + /* insn needs vector-packed-decimal facility which is not available on + this host */ + EmFail_S390X_vxd, + + /* insn needs message-security assist which is not available on + this host */ + EmFail_S390X_msa, + + /* insn needs message-security-assist extension 4 which is not available + on this host */ + EmFail_S390X_msa4, + + /* insn needs message-security-assist extension 8 which is not available + on this host */ + EmFail_S390X_msa8, + + /* insn needs message-security-assist extension 9 which is not available + on this host */ + EmFail_S390X_msa9, + EmNote_NUMBER } VexEmNote; diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c index 34e2e0409d..8a17c6fbdd 100644 --- a/coregrind/m_extension/extension-s390x.c +++ b/coregrind/m_extension/extension-s390x.c @@ -862,8 +862,7 @@ static enum ExtensionError do_extension_STFLE(ThreadState* tst, ULong variant) (S390_SETBITS(128, 131) /* 132: unassigned */ /* 133: guarded-storage, not supported */ - /* 134: vector packed decimal, not supported */ - | S390_SETBITS(135, 135) + | S390_SETBITS(134, 135) /* 136: unassigned */ /* 137: unassigned */ | S390_SETBITS(138, 142) diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 3b3671455f..eaa18b0b61 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1620,11 +1620,13 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { + { False, 18, VEX_HWCAPS_S390X_LDISP, "LDISP" }, { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, { False, 42, VEX_HWCAPS_S390X_DFP, "DFP" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, + { False, 7, VEX_HWCAPS_S390X_STFLE, "STFLE" }, { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, { False, 25, VEX_HWCAPS_S390X_STCKF, "STCKF" }, { False, 37, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, @@ -1637,6 +1639,12 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 135, VEX_HWCAPS_S390X_VXE, "VXE" }, { False, 151, VEX_HWCAPS_S390X_DFLT, "DFLT" }, { False, 165, VEX_HWCAPS_S390X_NNPA, "NNPA" }, + { False, 148, VEX_HWCAPS_S390X_VXE2, "VXE2" }, + { False, 134, VEX_HWCAPS_S390X_VXD, "VXD" }, + { False, 17, VEX_HWCAPS_S390X_MSA, "MSA" }, + { False, 77, VEX_HWCAPS_S390X_MSA4, "MSA4" }, + { False, 146, VEX_HWCAPS_S390X_MSA8, "MSA8" }, + { False, 155, VEX_HWCAPS_S390X_MSA9, "MSA9" }, }; /* Set hwcaps according to the detected facilities */ |
From: Florian K. <fk...@so...> - 2025-03-12 22:37:21
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=aee4a0a72e9a0dc49af18806643a49749db7eb5c commit aee4a0a72e9a0dc49af18806643a49749db7eb5c Author: Florian Krohm <fl...@ei...> Date: Wed Mar 12 22:36:33 2025 +0000 s390x: Remove macro definitions for hardware facilities Remove the facility-bit macros S390_FAC_... They are guaranteed to never change and are used only in m_machine.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=496950 Diff: --- VEX/pub/libvex_s390x_common.h | 37 ------------------------------------- coregrind/m_machine.c | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 54 deletions(-) diff --git a/VEX/pub/libvex_s390x_common.h b/VEX/pub/libvex_s390x_common.h index dda5ffd312..ea6a59d274 100644 --- a/VEX/pub/libvex_s390x_common.h +++ b/VEX/pub/libvex_s390x_common.h @@ -68,43 +68,6 @@ #define S390_INNERLOOP_FRAME_SIZE ((8+1+1)*8 + 160) -/*--------------------------------------------------------------*/ -/*--- Facility bits ---*/ -/*--------------------------------------------------------------*/ - -/* The value of the macro is the number of the facility bit as per POP. */ -#define S390_FAC_MSA 17 // message-security-assist -#define S390_FAC_LDISP 18 // long displacement -#define S390_FAC_HFPMAS 20 // HFP multiply-and-add-subtract -#define S390_FAC_EIMM 21 // extended immediate -#define S390_FAC_HFPUNX 23 // HFP unnormalized extension -#define S390_FAC_ETF2 24 // ETF2-enhancement -#define S390_FAC_STCKF 25 // store clock fast insn -#define S390_FAC_PENH 26 // parsing-enhancement -#define S390_FAC_ETF3 30 // ETF3-enhancement -#define S390_FAC_XCPUT 31 // extract-CPU-time -#define S390_FAC_GIE 34 // general insn extension -#define S390_FAC_EXEXT 35 // execute extension -#define S390_FAC_FPEXT 37 // floating-point extension -#define S390_FAC_FPSE 41 // floating-point support enhancement -#define S390_FAC_DFP 42 // decimal floating point -#define S390_FAC_PFPO 44 // perform floating point operation insn -#define S390_FAC_HIGHW 45 // high-word extension -#define S390_FAC_LSC 45 // load/store on condition -#define S390_FAC_DFPZC 48 // DFP zoned-conversion -#define S390_FAC_MISC 49 // miscellaneous insn -#define S390_FAC_CTREXE 50 // constrained transactional execution -#define S390_FAC_LSC2 53 // load/store on condition 2 and load and zero rightmost byte -#define S390_FAC_MSA5 57 // message-security-assist 5 -#define S390_FAC_MI2 58 // miscellaneous-instruction-extensions 2 -#define S390_FAC_TREXE 73 // transactional execution -#define S390_FAC_MSA4 77 // message-security-assist 4 -#define S390_FAC_VX 129 // vector facility -#define S390_FAC_VXE 135 // vector enhancements facility 1 -#define S390_FAC_VXE2 148 // vector enhancements facility 2 -#define S390_FAC_DFLT 151 // deflate-conversion facility -#define S390_FAC_NNPA 165 // NNPA facility - /*--------------------------------------------------------------*/ /*--- Extensions ---*/ /*--------------------------------------------------------------*/ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index dec4f2373e..3b3671455f 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1620,23 +1620,23 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, S390_FAC_EIMM, VEX_HWCAPS_S390X_EIMM, "EIMM" }, - { False, S390_FAC_GIE, VEX_HWCAPS_S390X_GIE, "GIE" }, - { False, S390_FAC_DFP, VEX_HWCAPS_S390X_DFP, "DFP" }, - { False, S390_FAC_FPSE, VEX_HWCAPS_S390X_FGX, "FGX" }, - { False, S390_FAC_ETF2, VEX_HWCAPS_S390X_ETF2, "ETF2" }, - { False, S390_FAC_ETF3, VEX_HWCAPS_S390X_ETF3, "ETF3" }, - { False, S390_FAC_STCKF, VEX_HWCAPS_S390X_STCKF, "STCKF" }, - { False, S390_FAC_FPEXT, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, - { False, S390_FAC_LSC, VEX_HWCAPS_S390X_LSC, "LSC" }, - { False, S390_FAC_PFPO, VEX_HWCAPS_S390X_PFPO, "PFPO" }, - { False, S390_FAC_VX, VEX_HWCAPS_S390X_VX, "VX" }, - { False, S390_FAC_MSA5, VEX_HWCAPS_S390X_MSA5, "MSA5" }, - { False, S390_FAC_MI2, VEX_HWCAPS_S390X_MI2, "MI2" }, - { False, S390_FAC_LSC2, VEX_HWCAPS_S390X_LSC2, "LSC2" }, - { False, S390_FAC_VXE, VEX_HWCAPS_S390X_VXE, "VXE" }, - { False, S390_FAC_DFLT, VEX_HWCAPS_S390X_DFLT, "DFLT" }, - { False, S390_FAC_NNPA, VEX_HWCAPS_S390X_NNPA, "NNPA" }, + { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, + { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, + { False, 42, VEX_HWCAPS_S390X_DFP, "DFP" }, + { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, + { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, + { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, + { False, 25, VEX_HWCAPS_S390X_STCKF, "STCKF" }, + { False, 37, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, + { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, + { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, + { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, + { False, 57, VEX_HWCAPS_S390X_MSA5, "MSA5" }, + { False, 58, VEX_HWCAPS_S390X_MI2, "MI2" }, + { False, 53, VEX_HWCAPS_S390X_LSC2, "LSC2" }, + { False, 135, VEX_HWCAPS_S390X_VXE, "VXE" }, + { False, 151, VEX_HWCAPS_S390X_DFLT, "DFLT" }, + { False, 165, VEX_HWCAPS_S390X_NNPA, "NNPA" }, }; /* Set hwcaps according to the detected facilities */ |
From: Mark W. <ma...@so...> - 2025-03-12 16:03:45
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9616164273be6bd91552683d0543170de27af852 commit 9616164273be6bd91552683d0543170de27af852 Author: Mark Wielaard <ma...@kl...> Date: Wed Mar 12 13:42:12 2025 +0100 m_debuginfo/debuginfo.c (di_notify_mmap): Ignore memfd_create mappings When valgrind observes a mapping of a memfd_create anonymous file it would generate a warning: WARNING: Serious error when reading debug info When reading debug info from /memfd:mozilla-ipc (deleted): failed to stat64/stat this file All such memfd_create anonymous files are always prefixed with "memfd:" and obviously cannot be stat64/stat. So ignore such warnings. Tested-by: ish...@yk... Diff: --- coregrind/m_debuginfo/debuginfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 15686fc5c4..6c4a692656 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1196,7 +1196,9 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) if (sr_isError(statres)) { DebugInfo fake_di; Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL - || VG_(strstr)(filename, "/dev/shm/") != NULL; + || VG_(strstr)(filename, "/dev/shm/") != NULL + || VG_(strncmp)("/memfd:", filename, + VG_(strlen)("/memfd:")) == 0; if (!quiet && VG_(clo_verbosity) > 1) { VG_(memset)(&fake_di, 0, sizeof(fake_di)); fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); |
From: Mark W. <ma...@so...> - 2025-03-12 15:59:49
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7b2806871f15977db3a64a59f70d48f55ba3228e commit 7b2806871f15977db3a64a59f70d48f55ba3228e Author: Mark Wielaard <ma...@kl...> Date: Thu Jan 16 17:30:37 2025 +0100 gdbserver_tests: filter out new Missing rpms message As seen on the fedora 40 s390x tester. GDB now might output something like: Missing rpms, try: dnf --enablerepo='*debug*' install glibc-debuginfo-2.39-33.fc40.s390x Filter those messages out to get zero fail test results again. (cherry picked from commit 090f8ce59b5f3d3ec39e032ee5e9524ce4f51a44) Diff: --- gdbserver_tests/filter_gdb.in | 1 + gdbserver_tests/filter_memcheck_monitor.in | 1 + 2 files changed, 2 insertions(+) diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in index 094ea933ec..2bef9f3ee5 100755 --- a/gdbserver_tests/filter_gdb.in +++ b/gdbserver_tests/filter_gdb.in @@ -265,6 +265,7 @@ s/^0x........ in \(\w\+ (\)/\1/ # delete any missing debuginfo messages /^Missing debuginfo.*/d +/^Missing rpms.*/d EOF diff --git a/gdbserver_tests/filter_memcheck_monitor.in b/gdbserver_tests/filter_memcheck_monitor.in index 6e8a49a303..e407e7b921 100755 --- a/gdbserver_tests/filter_memcheck_monitor.in +++ b/gdbserver_tests/filter_memcheck_monitor.in @@ -31,6 +31,7 @@ $dir/filter_vgdb | $SED -e '/Cannot access memory at address 0x......../d' \ -e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' \ -e '/^Missing separate debuginfo/d' \ + -e '/^Missing rpms/d' \ -e '/^Try: zypper install -C/d' \ -e 's/Test 3: FAIL: expected si_code==2, not 128/Test 3: PASS/' \ -e 's/in use at exit: [0-9][0-9,]* bytes in [0-9][0-9]* blocks/in use at exit: ... bytes in ... blocks/' \ |
From: Mark W. <ma...@so...> - 2025-03-12 15:59:45
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2c17a8a3e865816ee48e7f78148bbc7240c2a38c commit 2c17a8a3e865816ee48e7f78148bbc7240c2a38c Author: Mark Wielaard <ma...@kl...> Date: Wed Mar 12 13:57:19 2025 +0100 add_hardwired_spec for ld-linux-x86-64.so.2 memcmp With RPATH processing ld.so compiled for x86-64-v3 uses an optimized avx2 memcmp (bcmp) which causes (false postive) memcheck invalid reads of size 32 warnings. Fix this my adding a hardwire spec with a simpler memcmp for ld-linux-x86-64.so.2. https://bugs.kde.org/show_bug.cgi?id=501348 Authored-by: Florian Weimer <fw...@re...> (cherry picked from commit 9ffdeb4927b8505cc5a9ea54f608f4972166bb0e) Diff: --- NEWS | 1 + coregrind/m_redir.c | 9 +++++++++ coregrind/m_trampoline.S | 19 +++++++++++++++++++ coregrind/pub_core_trampoline.h | 1 + 4 files changed, 30 insertions(+) diff --git a/NEWS b/NEWS index 7f9e005c59..fe225c666c 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ The following bugs have been fixed or resolved on this branch. 498317 FdBadUse is not a valid CoreError type in a suppression even though it's generated by --gen-suppressions=yes 498143 False positive on EVIOCGRAB ioctl +501348 glibc built with -march=x86-64-v3 does not work due to ld.so memcmp To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index f9e8d8801a..64ebea3b63 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -1425,6 +1425,15 @@ void VG_(redir_initialise) ( void ) NULL # else complain_about_stripped_glibc_ldso +# endif + ); + add_hardwired_spec( + "ld-linux-x86-64.so.2", "memcmp", + (Addr)&VG_(amd64_linux_REDIR_FOR_memcmp), +# ifndef GLIBC_MANDATORY_STRLEN_REDIRECT + NULL +# else + complain_about_stripped_glibc_ldso # endif ); } diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S index e897963be2..27f1b35d2b 100644 --- a/coregrind/m_trampoline.S +++ b/coregrind/m_trampoline.S @@ -241,6 +241,25 @@ VG_(amd64_linux_REDIR_FOR_strcmp): ret .size VG_(amd64_linux_REDIR_FOR_strcmp), .-VG_(amd64_linux_REDIR_FOR_strcmp) +.global VG_(amd64_linux_REDIR_FOR_memcmp) +.type VG_(amd64_linux_REDIR_FOR_memcmp), @function +VG_(amd64_linux_REDIR_FOR_memcmp): + xorl %ecx, %ecx + jmp 2f +1: + movzbl (%rdi, %rcx), %eax + movzbl (%rsi, %rcx), %r8d + addq $1, %rcx + subl %r8d, %eax + jne 3f +2: + cmpq %rcx, %rdx + jne 1b + xorl %eax, %eax +3: + ret +.size VG_(amd64_linux_REDIR_FOR_memcmp), .-VG_(amd64_linux_REDIR_FOR_memcmp) + .global VG_(amd64_linux_REDIR_FOR_index) .type VG_(amd64_linux_REDIR_FOR_index), @function VG_(amd64_linux_REDIR_FOR_index): diff --git a/coregrind/pub_core_trampoline.h b/coregrind/pub_core_trampoline.h index d0bd6b8597..3d2f7e9f32 100644 --- a/coregrind/pub_core_trampoline.h +++ b/coregrind/pub_core_trampoline.h @@ -82,6 +82,7 @@ extern Addr VG_(amd64_linux_REDIR_FOR_vtime); extern Addr VG_(amd64_linux_REDIR_FOR_vgetcpu); extern UInt VG_(amd64_linux_REDIR_FOR_strlen)( void* ); extern Int VG_(amd64_linux_REDIR_FOR_strcmp)( void*, void* ); +extern Int VG_(amd64_linux_REDIR_FOR_memcmp)( void*, void*, SizeT ); extern Char* VG_(amd64_linux_REDIR_FOR_index) ( const Char*, Int ); #endif |
From: Mark W. <ma...@so...> - 2025-03-12 15:30:50
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9ffdeb4927b8505cc5a9ea54f608f4972166bb0e commit 9ffdeb4927b8505cc5a9ea54f608f4972166bb0e Author: Mark Wielaard <ma...@kl...> Date: Wed Mar 12 13:57:19 2025 +0100 add_hardwired_spec for ld-linux-x86-64.so.2 memcmp With RPATH processing ld.so compiled for x86-64-v3 uses an optimized avx2 memcmp (bcmp) which causes (false postive) memcheck invalid reads of size 32 warnings. Fix this my adding a hardwire spec with a simpler memcmp for ld-linux-x86-64.so.2. https://bugs.kde.org/show_bug.cgi?id=501348 Authored-by: Florian Weimer <fw...@re...> Diff: --- NEWS | 1 + coregrind/m_redir.c | 9 +++++++++ coregrind/m_trampoline.S | 19 +++++++++++++++++++ coregrind/pub_core_trampoline.h | 1 + 4 files changed, 30 insertions(+) diff --git a/NEWS b/NEWS index 16cfeef2a4..7025d61af7 100644 --- a/NEWS +++ b/NEWS @@ -58,6 +58,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 499212 mmap() with MAP_ALIGNED() returns unaligned pointer 501119 memcheck/tests/pointer-trace fails when run on NFS filesystem 501194 Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any number of segment commands +501348 glibc built with -march=x86-64-v3 does not work due to ld.so memcmp To see details of a given bug, visit diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index 5e7bc42f97..63172b9717 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -1431,6 +1431,15 @@ void VG_(redir_initialise) ( void ) NULL # else complain_about_stripped_glibc_ldso +# endif + ); + add_hardwired_spec( + "ld-linux-x86-64.so.2", "memcmp", + (Addr)&VG_(amd64_linux_REDIR_FOR_memcmp), +# ifndef GLIBC_MANDATORY_STRLEN_REDIRECT + NULL +# else + complain_about_stripped_glibc_ldso # endif ); } diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S index 4860a2259f..2c2cc0dc2a 100644 --- a/coregrind/m_trampoline.S +++ b/coregrind/m_trampoline.S @@ -241,6 +241,25 @@ VG_(amd64_linux_REDIR_FOR_strcmp): ret .size VG_(amd64_linux_REDIR_FOR_strcmp), .-VG_(amd64_linux_REDIR_FOR_strcmp) +.global VG_(amd64_linux_REDIR_FOR_memcmp) +.type VG_(amd64_linux_REDIR_FOR_memcmp), @function +VG_(amd64_linux_REDIR_FOR_memcmp): + xorl %ecx, %ecx + jmp 2f +1: + movzbl (%rdi, %rcx), %eax + movzbl (%rsi, %rcx), %r8d + addq $1, %rcx + subl %r8d, %eax + jne 3f +2: + cmpq %rcx, %rdx + jne 1b + xorl %eax, %eax +3: + ret +.size VG_(amd64_linux_REDIR_FOR_memcmp), .-VG_(amd64_linux_REDIR_FOR_memcmp) + .global VG_(amd64_linux_REDIR_FOR_index) .type VG_(amd64_linux_REDIR_FOR_index), @function VG_(amd64_linux_REDIR_FOR_index): diff --git a/coregrind/pub_core_trampoline.h b/coregrind/pub_core_trampoline.h index db497c51a5..11d791df7c 100644 --- a/coregrind/pub_core_trampoline.h +++ b/coregrind/pub_core_trampoline.h @@ -82,6 +82,7 @@ extern Addr VG_(amd64_linux_REDIR_FOR_vtime); extern Addr VG_(amd64_linux_REDIR_FOR_vgetcpu); extern UInt VG_(amd64_linux_REDIR_FOR_strlen)( void* ); extern Int VG_(amd64_linux_REDIR_FOR_strcmp)( void*, void* ); +extern Int VG_(amd64_linux_REDIR_FOR_memcmp)( void*, void*, SizeT ); extern Char* VG_(amd64_linux_REDIR_FOR_index) ( const Char*, Int ); #endif |
From: Mark W. <ma...@kl...> - 2025-03-12 15:19:09
|
Hi Chiaki, On Wed, 2025-03-12 at 04:40 +0900, ISHIKAWA,chiaki wrote: > It works. > I don't get the noisy warnings any more. Thanks for testing. I pushed the attached commit. Cheers, Mark |
From: Paul F. <pa...@so...> - 2025-03-12 07:34:20
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=78b3b79fcda79dee94d3a181afc4c4a0ed95fbb4 commit 78b3b79fcda79dee94d3a181afc4c4a0ed95fbb4 Author: Paul Floyd <pj...@wa...> Date: Wed Mar 12 08:33:11 2025 +0100 Solaris suppressions: add suppressions for Solaris 11.4 getaddrinfo getaddrinfo, the bane of all threading tests. Diff: --- solaris12.supp | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/solaris12.supp b/solaris12.supp index 2c68508f5c..29f8086619 100644 --- a/solaris12.supp +++ b/solaris12.supp @@ -166,3 +166,67 @@ fun:pthread_barrier_wait } +#----------------------------------------------------------------------------# +# The getattrinfo testcase causes issues on all platforms, and we assume +# that they are due to private libc locking mechanisms. + +{ + Solaris:_nsc_getdoorbuf + drd:ConflictingAccess + fun:tsdalloc + fun:_nsc_getdoorbuf +} + +{ + Solaris:nss_dbop_search + drd:ConflictingAccess + fun:nss_dbop_search +} + +{ + Solaris:thr_create_once + drd:ConflictingAccess + fun:thr_keycreate_once +} + +{ + Solaris:_nsc_getdoorbsize + drd:ConflictingAccess + fun:_nsc_getdoorbsize +} + +{ + Solaris:_nsc_proc_is_cache + drd:ConflictingAccess + fun:_nsc_proc_is_cache +} + +{ + Solaris:__rpc_getconfip + drd:ConflictingAccess + fun:__rpc_getconfip +} + +{ + Solaris:_nsc_proc_is_cache + Helgrind:Race + fun:_nsc_proc_is_cache +} + +{ + Solaris:thr_create_once + Helgrind:Race + fun:thr_keycreate_once +} + +{ + Solaris:_nsc_proc_is_cache + Helgrind:Race + fun:_nsc_proc_is_cache +} + +{ + Solaris:nss_dbop_search + Helgrind:Race + fun:nss_dbop_search +} |
From: Paul F. <pa...@so...> - 2025-03-12 07:14:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=92480c0fee983d2bd0ee7fdb8ed01783834b30ac commit 92480c0fee983d2bd0ee7fdb8ed01783834b30ac Author: Paul Floyd <pj...@wa...> Date: Wed Mar 12 08:12:10 2025 +0100 Solaris regtest: fdleak filter, change __xnet_socket to just socket Diff: --- none/tests/filter_fdleak | 1 + 1 file changed, 1 insertion(+) diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index f84008b6db..18a65b4568 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -21,6 +21,7 @@ perl -p -e 's/socket\.c:[1-9][0-9]*/in \/...libc.../' | perl -p -e 's/ __close / close /' | perl -p -e 's/ __write / write /' | sed '/ _so_socket /d;' | +sed 's/__xnet_socket/socket/' | awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | sed '/__open/d' | |
From: Paul F. <pa...@so...> - 2025-03-11 19:50:58
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=36ab09596af75e5c977ca43e20fc4dd598964454 commit 36ab09596af75e5c977ca43e20fc4dd598964454 Author: Paul Floyd <pj...@wa...> Date: Tue Mar 11 20:50:07 2025 +0100 Illumos regtest: add a filter for shell 'Abort' messages Diff: --- tests/filter_stderr_basic.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index 7d38a0d4fd..d14ca727df 100755 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -57,7 +57,7 @@ perl -n -e 'print if !/^(Illegal instruction|Segmentation fault|Alarm clock|Abor # 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\|Alarm call\|Terminated\|Killed\)/d" | +$SED "/sh: [1-9][0-9]*: \(Memory fault\|Alarm call\|Terminated\|Killed\|Abort\)/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: ISHIKAWA,chiaki <ish...@yk...> - 2025-03-11 19:39:51
|
Dear Mark, It works. I don't get the noisy warnings any more. Thank you for the quick fix! Chiaki On 2025/03/10 14:43, ISHIKAWA,chiaki wrote: > Dear Mark, > > Thank you for your analysis. > > I will try to create a localized version of valgrind after applying > the patch and see how it goes. > > It might take a couple of days due to my day job, etc. > > Chiaki > > On 2025/03/10 5:45, Mark Wielaard wrote: >> Hi Chiaki, >> >> On Mon, Mar 10, 2025 at 03:32:16AM +0900, ISHIKAWA,chiaki wrote: >>> Does this help reduce the occurences of presumably non-critical >>> error messages like the following? >> No. These are indeed related messages, but caused by using memfd >> allocated memory. >> >>> I get this when I try to run mozilla's thunderbird mail client under >>> valgrind. >>> They appear many times. >>> >>> 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when >>> reading debug info >>> 23:44.69 GECKO(2640779) --2640783-- When reading debug info from >>> /memfd:mozilla-ipc (deleted): >>> 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file >>> 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when >>> reading debug info >>> 23:44.69 GECKO(2640779) --2640783-- When reading debug info from >>> /memfd:mozilla-ipc (deleted): >>> 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file >>> >>> I have no idea why valgrind wants try to to read debug info from >>> memory region. >> I presume because valgrind thinks it might be a real memory mapped >> file. The code triggering this warning is: >> >> /* Don't let the stat call fail silently. Filter out some known >> sources of noise before complaining, though. */ >> if (sr_isError(statres)) { >> DebugInfo fake_di; >> Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL >> || VG_(strstr)(filename, "/dev/shm/") != NULL; >> if (!quiet && VG_(clo_verbosity) > 1) { >> VG_(memset)(&fake_di, 0, sizeof(fake_di)); >> fake_di.fsm.filename = >> ML_(dinfo_strdup)("di.debuginfo.nmm", filename); >> ML_(symerr)(&fake_di, True, "failed to stat64/stat this >> file"); >> } >> return 0; >> } >> >> So we probably should add "/memfd:" to the patterns for which not to >> warn. >> >> https://www.man7.org/linux/man-pages/man2/memfd_create.2.html says: >> >> int memfd_create(const char *name, unsigned int flags); >> >> The name supplied in name is used as a filename and will be >> displayed as the target of the corresponding symbolic link in the >> directory /proc/self/fd/. The displayed name is always prefixed >> with memfd: and serves only for debugging purposes. >> >> So I would propose something like the following (untested) patch: >> >> diff --git a/coregrind/m_debuginfo/debuginfo.c >> b/coregrind/m_debuginfo/debuginfo.c >> index 15686fc5c46f..6c4a6926560b 100644 >> --- a/coregrind/m_debuginfo/debuginfo.c >> +++ b/coregrind/m_debuginfo/debuginfo.c >> @@ -1196,7 +1196,9 @@ ULong VG_(di_notify_mmap)( Addr a, Bool >> allow_SkFileV, Int use_fd ) >> if (sr_isError(statres)) { >> DebugInfo fake_di; >> Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL >> - || VG_(strstr)(filename, "/dev/shm/") != NULL; >> + || VG_(strstr)(filename, "/dev/shm/") != NULL >> + || VG_(strncmp)("/memfd:", filename, >> + VG_(strlen)("/memfd:")) == 0; >> if (!quiet && VG_(clo_verbosity) > 1) { >> VG_(memset)(&fake_di, 0, sizeof(fake_di)); >> fake_di.fsm.filename = >> ML_(dinfo_strdup)("di.debuginfo.nmm", filename); >> >> Does that work for you? >> >> Thanks, >> >> Mark > > > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
From: Paul F. <pa...@so...> - 2025-03-11 19:38:11
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=dd169be0e65fecd1e4b7593dc3da7b87dc7ecf03 commit dd169be0e65fecd1e4b7593dc3da7b87dc7ecf03 Author: Paul Floyd <pj...@wa...> Date: Tue Mar 11 20:36:30 2025 +0100 Illumos fdleak: dup2 spurious errors We should also put back checks that calls like dup2 aren't using reserved file descriptors. Diff: --- coregrind/m_syswrap/syswrap-solaris.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 3da0d216cd..dc0068d90c 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -3989,11 +3989,13 @@ PRE(sys_fcntl) PRE_REG_READ3(long, "fcntl", int, fildes, int, cmd, int, arg); /* Check if a client program isn't going to poison any of V's output fds. */ + /* if (ARG2 == VKI_F_DUP2FD && !ML_(fd_allowed)(ARG3, "fcntl(F_DUP2FD)", tid, False)) { SET_STATUS_Failure(VKI_EBADF); return; } + */ break; /* These ones use ARG3 as "native lock" (input only). */ |
From: Paul F. <pa...@so...> - 2025-03-11 08:11:14
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e479ebc7fa189561bd1459aa60d1374bf67a6746 commit e479ebc7fa189561bd1459aa60d1374bf67a6746 Author: Paul Floyd <pj...@wa...> Date: Tue Mar 11 09:10:42 2025 +0100 Regtest: filter out pathname from memcheck dw4 test Diff: --- memcheck/tests/dw4.stderr.exp | 4 ++-- memcheck/tests/filter_dw4.in | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/dw4.stderr.exp b/memcheck/tests/dw4.stderr.exp index e4b523f982..02c5955110 100644 --- a/memcheck/tests/dw4.stderr.exp +++ b/memcheck/tests/dw4.stderr.exp @@ -35,12 +35,12 @@ Unaddressable byte(s) found during client check request Uninitialised byte(s) found during client check request at 0x........: croak (dw4.c:32) by 0x........: main (dw4.c:89) - Address 0x........ is in a rw- mapped file /export/home/paulf/valgrind/memcheck/tests/dw4 segment + Address 0x........ is in a rw- mapped file DIRECTORY/dw4 segment Uninitialised byte(s) found during client check request at 0x........: croak (dw4.c:32) by 0x........: main (dw4.c:91) - Address 0x........ is in a rw- mapped file /export/home/paulf/valgrind/memcheck/tests/dw4 segment + Address 0x........ is in a rw- mapped file DIRECTORY/dw4 segment Unaddressable byte(s) found during client check request at 0x........: croak (dw4.c:25) diff --git a/memcheck/tests/filter_dw4.in b/memcheck/tests/filter_dw4.in index 96b6ab8f50..d729ad6e81 100755 --- a/memcheck/tests/filter_dw4.in +++ b/memcheck/tests/filter_dw4.in @@ -9,6 +9,9 @@ $SED "s/inside a block of size [0-9]* alloc'd/inside a block of size ... alloc'd # remove directory name and pid from mapped filename $SED "s/file .*valgrind-dw4-test.[1-9][0-9]*/file valgrind-dw4-test.PID/" | +# remove name from mapped file segment +$SED "s#is in a rw- mapped file .*/dw4 segment#is in a rw- mapped file DIRECTORY/dw4 segment#" | + ./filter_stderr "$@" exit 0 |
From: Paul F. <pa...@so...> - 2025-03-11 07:43:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=ca9cba8346b921a2beb7b61ca8a707204ee5aeff commit ca9cba8346b921a2beb7b61ca8a707204ee5aeff Author: Paul Floyd <pj...@wa...> Date: Tue Mar 11 07:40:48 2025 +0100 Fix more int to pointer warnings. No more produced with GCC 14 on OI. Diff: --- VEX/priv/host_riscv64_defs.c | 6 +++--- VEX/priv/host_riscv64_isel.c | 2 +- coregrind/m_gdbserver/valgrind-low-riscv64.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VEX/priv/host_riscv64_defs.c b/VEX/priv/host_riscv64_defs.c index 6296b2e7fe..7e6b95380a 100644 --- a/VEX/priv/host_riscv64_defs.c +++ b/VEX/priv/host_riscv64_defs.c @@ -2647,7 +2647,7 @@ VexInvalRange unchainXDirect_RISCV64(VexEndness endness_host, UChar* p = place_to_unchain; vassert(((HWord)p & 1) == 0); vassert(is_addr48_to_ireg_EXACTLY_18B(p, 5 /*x5/t0*/, - (ULong)place_to_jump_to_EXPECTED)); + (ULong)(HWord)place_to_jump_to_EXPECTED)); vassert(p[18] == 0x82 && p[19] == 0x82); /* And what we want to change it to is: @@ -2664,7 +2664,7 @@ VexInvalRange unchainXDirect_RISCV64(VexEndness endness_host, The replacement has the same length as the original. */ - (void)addr48_to_ireg_EXACTLY_18B(p, 5 /*x5/t0*/, (ULong)disp_cp_chain_me); + (void)addr48_to_ireg_EXACTLY_18B(p, 5 /*x5/t0*/, (ULong)(HWord)disp_cp_chain_me); p[18] = 0x82; p[19] = 0x89; @@ -2686,7 +2686,7 @@ VexInvalRange patchProfInc_RISCV64(VexEndness endness_host, vassert(p[18] == 0x83 && p[19] == 0x32 && p[20] == 0x03 && p[21] == 0x00); vassert(p[22] == 0x85 && p[23] == 0x02); vassert(p[24] == 0x23 && p[25] == 0x30 && p[26] == 0x53 && p[27] == 0x00); - (void)addr48_to_ireg_EXACTLY_18B(p, 6 /*x6/t1*/, (ULong)location_of_counter); + (void)addr48_to_ireg_EXACTLY_18B(p, 6 /*x6/t1*/, (ULong)(HWord)location_of_counter); VexInvalRange vir = {(HWord)p, 28}; return vir; } diff --git a/VEX/priv/host_riscv64_isel.c b/VEX/priv/host_riscv64_isel.c index 6921a47db4..c476d133c7 100644 --- a/VEX/priv/host_riscv64_isel.c +++ b/VEX/priv/host_riscv64_isel.c @@ -542,7 +542,7 @@ static Bool doHelperCall(/*OUT*/ UInt* stackAdjustAfterCall, The same applies to nextFArgReg which records a number of used floating-point registers f10/fa0 .. f17/fa7. */ - addInstr(env, RISCV64Instr_Call(*retloc, (Addr64)cee->addr, cond, nextArgReg, + addInstr(env, RISCV64Instr_Call(*retloc, (Addr64)(HWord)cee->addr, cond, nextArgReg, nextFArgReg)); return True; diff --git a/coregrind/m_gdbserver/valgrind-low-riscv64.c b/coregrind/m_gdbserver/valgrind-low-riscv64.c index 75088fc1ec..5c200318c0 100644 --- a/coregrind/m_gdbserver/valgrind-low-riscv64.c +++ b/coregrind/m_gdbserver/valgrind-low-riscv64.c @@ -264,7 +264,7 @@ static CORE_ADDR** target_get_dtv (ThreadState *tst) void *private; } tcbhead_t; */ - return (CORE_ADDR**)(void *)(riscv->guest_x4 - 2 * sizeof(void *)); + return (CORE_ADDR**)(void *)((HWord)riscv->guest_x4 - 2 * sizeof(void *)); } static struct valgrind_target_ops low_target = { |
From: Florian K. <fk...@so...> - 2025-03-10 12:37:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1d9cca850c5401784fe389b6792cb23c803d6342 commit 1d9cca850c5401784fe389b6792cb23c803d6342 Author: Florian Krohm <fl...@ei...> Date: Mon Mar 10 12:36:21 2025 +0000 s390x: disasm-test: Fix thinko Remove verbiage about limited support for opcodes with optional operands. Optional operands are of no concern for disassembly. The reason is that disassembly sees as its input only a sequence of bytes which have no indication as to whether some of its bits were explicitly specified or not. We're testing the disassembler here - not the assembler. Diff: --- none/tests/s390x/disasm-test/README | 4 ---- 1 file changed, 4 deletions(-) diff --git a/none/tests/s390x/disasm-test/README b/none/tests/s390x/disasm-test/README index 54df05cf98..a771c41c98 100644 --- a/none/tests/s390x/disasm-test/README +++ b/none/tests/s390x/disasm-test/README @@ -169,10 +169,6 @@ Status Only opcodes with extended mnemonics as identified in Appendix J of the Principles of Operation are considered. -There is only partial support for opcodes with optional operands. -In the sense that the generated testcases will always include the -optional operand. - TODO ---- |
From: ISHIKAWA,chiaki <ish...@yk...> - 2025-03-10 05:44:06
|
Dear Mark, Thank you for your analysis. I will try to create a localized version of valgrind after applying the patch and see how it goes. It might take a couple of days due to my day job, etc. Chiaki On 2025/03/10 5:45, Mark Wielaard wrote: > Hi Chiaki, > > On Mon, Mar 10, 2025 at 03:32:16AM +0900, ISHIKAWA,chiaki wrote: >> Does this help reduce the occurences of presumably non-critical >> error messages like the following? > No. These are indeed related messages, but caused by using memfd > allocated memory. > >> I get this when I try to run mozilla's thunderbird mail client under >> valgrind. >> They appear many times. >> >> 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when >> reading debug info >> 23:44.69 GECKO(2640779) --2640783-- When reading debug info from >> /memfd:mozilla-ipc (deleted): >> 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file >> 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when >> reading debug info >> 23:44.69 GECKO(2640779) --2640783-- When reading debug info from >> /memfd:mozilla-ipc (deleted): >> 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file >> >> I have no idea why valgrind wants try to to read debug info from >> memory region. > I presume because valgrind thinks it might be a real memory mapped > file. The code triggering this warning is: > > /* Don't let the stat call fail silently. Filter out some known > sources of noise before complaining, though. */ > if (sr_isError(statres)) { > DebugInfo fake_di; > Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL > || VG_(strstr)(filename, "/dev/shm/") != NULL; > if (!quiet && VG_(clo_verbosity) > 1) { > VG_(memset)(&fake_di, 0, sizeof(fake_di)); > fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); > ML_(symerr)(&fake_di, True, "failed to stat64/stat this file"); > } > return 0; > } > > So we probably should add "/memfd:" to the patterns for which not to > warn. > > https://www.man7.org/linux/man-pages/man2/memfd_create.2.html says: > > int memfd_create(const char *name, unsigned int flags); > > The name supplied in name is used as a filename and will be > displayed as the target of the corresponding symbolic link in the > directory /proc/self/fd/. The displayed name is always prefixed > with memfd: and serves only for debugging purposes. > > So I would propose something like the following (untested) patch: > > diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c > index 15686fc5c46f..6c4a6926560b 100644 > --- a/coregrind/m_debuginfo/debuginfo.c > +++ b/coregrind/m_debuginfo/debuginfo.c > @@ -1196,7 +1196,9 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) > if (sr_isError(statres)) { > DebugInfo fake_di; > Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL > - || VG_(strstr)(filename, "/dev/shm/") != NULL; > + || VG_(strstr)(filename, "/dev/shm/") != NULL > + || VG_(strncmp)("/memfd:", filename, > + VG_(strlen)("/memfd:")) == 0; > if (!quiet && VG_(clo_verbosity) > 1) { > VG_(memset)(&fake_di, 0, sizeof(fake_di)); > fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); > > Does that work for you? > > Thanks, > > Mark |
From: Mark W. <ma...@kl...> - 2025-03-09 20:46:11
|
Hi Chiaki, On Mon, Mar 10, 2025 at 03:32:16AM +0900, ISHIKAWA,chiaki wrote: > Does this help reduce the occurences of presumably non-critical > error messages like the following? No. These are indeed related messages, but caused by using memfd allocated memory. > I get this when I try to run mozilla's thunderbird mail client under > valgrind. > They appear many times. > > 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when > reading debug info > 23:44.69 GECKO(2640779) --2640783-- When reading debug info from > /memfd:mozilla-ipc (deleted): > 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file > 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when > reading debug info > 23:44.69 GECKO(2640779) --2640783-- When reading debug info from > /memfd:mozilla-ipc (deleted): > 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file > > I have no idea why valgrind wants try to to read debug info from > memory region. I presume because valgrind thinks it might be a real memory mapped file. The code triggering this warning is: /* Don't let the stat call fail silently. Filter out some known sources of noise before complaining, though. */ if (sr_isError(statres)) { DebugInfo fake_di; Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL || VG_(strstr)(filename, "/dev/shm/") != NULL; if (!quiet && VG_(clo_verbosity) > 1) { VG_(memset)(&fake_di, 0, sizeof(fake_di)); fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); ML_(symerr)(&fake_di, True, "failed to stat64/stat this file"); } return 0; } So we probably should add "/memfd:" to the patterns for which not to warn. https://www.man7.org/linux/man-pages/man2/memfd_create.2.html says: int memfd_create(const char *name, unsigned int flags); The name supplied in name is used as a filename and will be displayed as the target of the corresponding symbolic link in the directory /proc/self/fd/. The displayed name is always prefixed with memfd: and serves only for debugging purposes. So I would propose something like the following (untested) patch: diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 15686fc5c46f..6c4a6926560b 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1196,7 +1196,9 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) if (sr_isError(statres)) { DebugInfo fake_di; Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL - || VG_(strstr)(filename, "/dev/shm/") != NULL; + || VG_(strstr)(filename, "/dev/shm/") != NULL + || VG_(strncmp)("/memfd:", filename, + VG_(strlen)("/memfd:")) == 0; if (!quiet && VG_(clo_verbosity) > 1) { VG_(memset)(&fake_di, 0, sizeof(fake_di)); fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); Does that work for you? Thanks, Mark |
From: ISHIKAWA,chiaki <ish...@yk...> - 2025-03-09 18:49:56
|
Hi, Does this help reduce the occurences of presumably non-critical error messages like the following? I get this when I try to run mozilla's thunderbird mail client under valgrind. They appear many times. 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when reading debug info 23:44.69 GECKO(2640779) --2640783-- When reading debug info from /memfd:mozilla-ipc (deleted): 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file 23:44.69 GECKO(2640779) --2640783-- WARNING: Serious error when reading debug info 23:44.69 GECKO(2640779) --2640783-- When reading debug info from /memfd:mozilla-ipc (deleted): 23:44.69 GECKO(2640779) --2640783-- failed to stat64/stat this file I have no idea why valgrind wants try to to read debug info from memory region. TIA Chiaki On 2025/03/10 0:05, Mark Wielaard wrote: > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=86ac4f2b004f57fa11224efafc1cd1c8fa8ded84 > > commit 86ac4f2b004f57fa11224efafc1cd1c8fa8ded84 > Author: Mark Wielaard <ma...@kl...> > Date: Sun Mar 9 15:59:29 2025 +0100 > > coregrind/m_debuginfo: don't try to examine zero sized mmapped files > > When run on an nfs filesystem memcheck/tests/pointer-trace fails > because it generates warnings "connection to image failed". This is > caused by trying to mmap a deleted file which the nfs file system > represents as a (hidden) regular file. This is normally not a problem > except when that file is empty. > > Fix this by not trying to check whether a file is an ELF or MACHO > against an empty (regular) file in di_notify_mmap. An empty file is > never a valid ELF or MACHO file (and cannot be represented as > DiImage). > > https://bugs.kde.org/show_bug.cgi?id=501119 > > Diff: > --- > NEWS | 1 + > coregrind/m_debuginfo/debuginfo.c | 10 ++++++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/NEWS b/NEWS > index 0fcbc5d0e2..16cfeef2a4 100644 > --- a/NEWS > +++ b/NEWS > @@ -56,6 +56,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. > 498492 none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang > 499183 FreeBSD: differences in avx-vmovq output > 499212 mmap() with MAP_ALIGNED() returns unaligned pointer > +501119 memcheck/tests/pointer-trace fails when run on NFS filesystem > 501194 Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any number of segment commands > > > diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c > index 612833a997..15686fc5c4 100644 > --- a/coregrind/m_debuginfo/debuginfo.c > +++ b/coregrind/m_debuginfo/debuginfo.c > @@ -1206,8 +1206,14 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) > } > > /* Finally, the point of all this stattery: if it's not a regular file, > - don't try to read debug info from it. */ > - if (! VKI_S_ISREG(statbuf.mode)) > + don't try to read debug info from it. Also if it is a "regular file" > + but has a zero size then skip it. Having a zero size will definitely > + fail when trying to create an DiImage and wouldn't be a valid elf or > + macho file. This can happen when mmapping a deleted file, which > + would normally fail in the check above, because the stat call will > + fail. But if the deleted file is on an NFS file system then a fake > + (regular) empty file might be returned. */ > + if (! VKI_S_ISREG(statbuf.mode) || statbuf.size == 0) > return 0; > > /* no uses of statbuf below here. */ > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
From: Mark W. <ma...@so...> - 2025-03-09 15:49:48
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=9f956db3e5eb0afb0d60987f3658b66646a0ac81 commit 9f956db3e5eb0afb0d60987f3658b66646a0ac81 Author: Mark Wielaard <ma...@kl...> Date: Sun Mar 9 16:46:50 2025 +0100 docs/Makefile.am: Make sure xml catalog file exists for xmllint check When XML_CATALOG_FILES don't exist on the system xmllint will have to query those files through various websites. When there is a network error xmllint will fail. So make sure to only run the validity tests when both xmllint and XML_CATALOG_FILES exists. Diff: --- docs/Makefile.am | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 12d13db1da..68a3da5617 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -186,14 +186,20 @@ all-docs: FAQ.txt man-pages html-docs print-docs valid-manual: $(MANUAL_XML_FILES) if type $(XMLLINT) 2>/dev/null; then \ - $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml && \ - touch $@; \ + if [ -f $(XML_CATALOG_FILES) ]; then \ + export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ + $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml && \ + touch $@; \ + fi \ fi valid-manpages: $(MANPAGES_XML_FILES) if type $(XMLLINT) 2>/dev/null; then \ - $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/manpages-index.xml && \ - touch $@; \ + if [ -f $(XML_CATALOG_FILES) ]; then \ + export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ + $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/manpages-index.xml && \ + touch $@; \ + fi \ fi check-local: valid-manual valid-manpages |
From: Mark W. <ma...@so...> - 2025-03-09 15:05:25
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=86ac4f2b004f57fa11224efafc1cd1c8fa8ded84 commit 86ac4f2b004f57fa11224efafc1cd1c8fa8ded84 Author: Mark Wielaard <ma...@kl...> Date: Sun Mar 9 15:59:29 2025 +0100 coregrind/m_debuginfo: don't try to examine zero sized mmapped files When run on an nfs filesystem memcheck/tests/pointer-trace fails because it generates warnings "connection to image failed". This is caused by trying to mmap a deleted file which the nfs file system represents as a (hidden) regular file. This is normally not a problem except when that file is empty. Fix this by not trying to check whether a file is an ELF or MACHO against an empty (regular) file in di_notify_mmap. An empty file is never a valid ELF or MACHO file (and cannot be represented as DiImage). https://bugs.kde.org/show_bug.cgi?id=501119 Diff: --- NEWS | 1 + coregrind/m_debuginfo/debuginfo.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0fcbc5d0e2..16cfeef2a4 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 498492 none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang 499183 FreeBSD: differences in avx-vmovq output 499212 mmap() with MAP_ALIGNED() returns unaligned pointer +501119 memcheck/tests/pointer-trace fails when run on NFS filesystem 501194 Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any number of segment commands diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 612833a997..15686fc5c4 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1206,8 +1206,14 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) } /* Finally, the point of all this stattery: if it's not a regular file, - don't try to read debug info from it. */ - if (! VKI_S_ISREG(statbuf.mode)) + don't try to read debug info from it. Also if it is a "regular file" + but has a zero size then skip it. Having a zero size will definitely + fail when trying to create an DiImage and wouldn't be a valid elf or + macho file. This can happen when mmapping a deleted file, which + would normally fail in the check above, because the stat call will + fail. But if the deleted file is on an NFS file system then a fake + (regular) empty file might be returned. */ + if (! VKI_S_ISREG(statbuf.mode) || statbuf.size == 0) return 0; /* no uses of statbuf below here. */ |