commit
bfbc652606
@ -0,0 +1 @@
|
||||
SOURCES/valgrind-3.21.0.tar.bz2
|
@ -0,0 +1 @@
|
||||
817d769743d278b5d07526e85115082054e9bf9c SOURCES/valgrind-3.21.0.tar.bz2
|
@ -0,0 +1,59 @@
|
||||
commit d3c977726064ba09fed6dfc7daf22b16824c97b4
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri May 24 18:24:56 2019 +0200
|
||||
|
||||
Add -Wl,-z,now to some binaries.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 1b7842b..e211eec 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -32,7 +32,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_listener_CFLAGS += -static
|
||||
endif
|
||||
@@ -51,7 +51,7 @@ valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_di_server_CFLAGS += -static
|
||||
endif
|
||||
@@ -86,7 +86,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
|
||||
endif
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 3c73210..fb6b7bb 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -57,7 +57,7 @@ RANLIB = ${LTO_RANLIB}
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
# then the primary platform must be x86-darwin. Hence:
|
||||
if ! VGCONF_HAVE_PLATFORM_SEC
|
||||
@@ -96,7 +96,7 @@ endif
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
vgdb_CFLAGS += -static
|
||||
endif
|
@ -0,0 +1,105 @@
|
||||
commit b73fb7a614e1b5d60af23fb0752b5cead995e02e
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun Apr 14 00:30:05 2019 +0200
|
||||
|
||||
Remove no-stack-protector, add stack-protector-strong to some.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 56cc5ef..1b7842b 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -30,7 +30,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
|
||||
|
||||
valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
|
||||
valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -84,7 +84,7 @@ endif
|
||||
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8c798b..ccc8f52 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2352,24 +2352,24 @@
|
||||
AM_CONDITIONAL([HAVE_ALIGNED_CXX_ALLOC], [test x$ac_have_aligned_cxx_alloc = xyes])
|
||||
|
||||
# does this compiler support -fno-stack-protector ?
|
||||
-AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
|
||||
-
|
||||
-safe_CFLAGS=$CFLAGS
|
||||
-CFLAGS="-fno-stack-protector -Werror"
|
||||
-
|
||||
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
- return 0;
|
||||
-]])], [
|
||||
-no_stack_protector=yes
|
||||
-FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
|
||||
-AC_MSG_RESULT([yes])
|
||||
-], [
|
||||
-no_stack_protector=no
|
||||
+#AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
|
||||
+#
|
||||
+#safe_CFLAGS=$CFLAGS
|
||||
+#CFLAGS="-fno-stack-protector -Werror"
|
||||
+#
|
||||
+#AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
+# return 0;
|
||||
+#]])], [
|
||||
+#no_stack_protector=yes
|
||||
+#FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
|
||||
+#AC_MSG_RESULT([yes])
|
||||
+#], [
|
||||
+#no_stack_protector=no
|
||||
FLAG_FNO_STACK_PROTECTOR=""
|
||||
-AC_MSG_RESULT([no])
|
||||
-])
|
||||
-CFLAGS=$safe_CFLAGS
|
||||
-
|
||||
+#AC_MSG_RESULT([no])
|
||||
+#])
|
||||
+#CFLAGS=$safe_CFLAGS
|
||||
+#
|
||||
AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
|
||||
|
||||
# does this compiler support -finline-functions ?
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 94030fd..3c73210 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -55,7 +55,7 @@ AR = ${LTO_AR}
|
||||
RANLIB = ${LTO_RANLIB}
|
||||
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
@@ -94,7 +94,7 @@ vgdb_SOURCES += vgdb-invoker-solaris.c
|
||||
endif
|
||||
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
@ -0,0 +1,123 @@
|
||||
From e97f7a6cf2315908fb0a9b900f1de87a155c9df1 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun, 14 May 2023 23:34:05 +0200
|
||||
Subject: [PATCH] Add --with-gdbscripts-dir=PATH configure option
|
||||
|
||||
Currently the gdb valgrind scripts are installed under VG_LIBDIR
|
||||
which is normally pkglibexecdir which is likely not in the default
|
||||
gdb safe-path (a list of directories from which it is safe to
|
||||
auto-load files). So users will have to add the directory to their
|
||||
.gdbinit file.
|
||||
|
||||
This patch adds a --with-gdbscripts-dir=PATH configure option that
|
||||
sets VG_GDBSCRIPTS_DIR to the given PATH (${libexecdir}/valgrind if
|
||||
not given).
|
||||
|
||||
Use VG_GDBSCRIPTS_DIR as gdbscriptsdir to install the valgrind-monitor
|
||||
python files and pass it with CPPFLAGS when building vg_preloaded.c
|
||||
and vgdb.c to use instead of VG_LIBDIR.
|
||||
---
|
||||
configure.ac | 11 +++++++++++
|
||||
coregrind/Makefile.am | 15 ++++++++++-----
|
||||
coregrind/vg_preloaded.c | 2 +-
|
||||
coregrind/vgdb.c | 2 +-
|
||||
4 files changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 15fbf5ea2..223ab4529 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1198,6 +1198,17 @@ AC_MSG_RESULT([$xcodedir])
|
||||
AC_DEFINE_UNQUOTED(XCODE_DIR, "$xcodedir", [xcode sdk include directory])
|
||||
AC_SUBST(XCODE_DIR, [$xcodedir])])
|
||||
|
||||
+#----------------------------------------------------------------------------
|
||||
+# Where to install gdb scripts, defaults to VG_LIBDIR (pkglibexecdir)
|
||||
+#----------------------------------------------------------------------------
|
||||
+AC_MSG_CHECKING([where gdb scripts are installed])
|
||||
+AC_ARG_WITH(gdbscripts-dir,
|
||||
+ [ --with-gdbscripts-dir=PATH Specify path to install gdb scripts],
|
||||
+ [gdbscriptsdir=${withval}],
|
||||
+ [gdbscriptsdir=${libexecdir}/valgrind])
|
||||
+AC_MSG_RESULT([$gdbscriptsdir])
|
||||
+AC_SUBST(VG_GDBSCRIPTS_DIR, [$gdbscriptsdir])
|
||||
+
|
||||
#----------------------------------------------------------------------------
|
||||
# Libc and suppressions
|
||||
#----------------------------------------------------------------------------
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 553211782..64d593b08 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -101,7 +101,8 @@
|
||||
vgdb_SOURCES += vgdb-invoker-freebsd.c
|
||||
endif
|
||||
|
||||
-vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
+vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) \
|
||||
+ -DVG_GDBSCRIPTS_DIR="\"@VG_GDBSCRIPTS_DIR@\""
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
@@ -626,7 +627,8 @@
|
||||
|
||||
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
|
||||
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
|
||||
- $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
+ $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
|
||||
+ -DVG_GDBSCRIPTS_DIR="\"@VG_GDBSCRIPTS_DIR@\""
|
||||
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
|
||||
$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
vgpreload_core_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
|
||||
@@ -634,7 +636,8 @@
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = vg_preloaded.c
|
||||
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
|
||||
- $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
+ $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
|
||||
+ -DVG_GDBSCRIPTS_DIR="\"@VG_GDBSCRIPTS_DIR@\""
|
||||
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
|
||||
$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
vgpreload_core_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
|
||||
@@ -766,8 +769,10 @@
|
||||
# so as to make sure these get copied into the install tree
|
||||
vglibdir = $(pkglibexecdir)
|
||||
vglib_DATA = $(GDBSERVER_XML_FILES)
|
||||
-vglib_DATA += m_gdbserver/valgrind-monitor.py
|
||||
-vglib_DATA += m_gdbserver/valgrind-monitor-def.py
|
||||
+
|
||||
+gdbscriptsdir = @VG_GDBSCRIPTS_DIR@
|
||||
+gdbscripts_DATA = m_gdbserver/valgrind-monitor.py
|
||||
+gdbscripts_DATA += m_gdbserver/valgrind-monitor-def.py
|
||||
|
||||
# so as to make sure these get copied into the tarball
|
||||
EXTRA_DIST += $(GDBSERVER_XML_FILES)
|
||||
diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
|
||||
index d6e05898c..bff76b81b 100644
|
||||
--- a/coregrind/vg_preloaded.c
|
||||
+++ b/coregrind/vg_preloaded.c
|
||||
@@ -61,7 +61,7 @@
|
||||
.popsection \n\
|
||||
");
|
||||
|
||||
-DEFINE_GDB_PY_SCRIPT(VG_LIBDIR "/valgrind-monitor.py")
|
||||
+DEFINE_GDB_PY_SCRIPT(VG_GDBSCRIPTS_DIR "/valgrind-monitor.py")
|
||||
#endif
|
||||
|
||||
#if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
|
||||
diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c
|
||||
index 8ec424077..a449b86e0 100644
|
||||
--- a/coregrind/vgdb.c
|
||||
+++ b/coregrind/vgdb.c
|
||||
@@ -1984,7 +1984,7 @@ void usage(void)
|
||||
" -h --help shows this message\n"
|
||||
" The GDB python code defining GDB front end valgrind commands is:\n %s\n"
|
||||
" To get help from the Valgrind gdbserver, use vgdb help\n"
|
||||
-"\n", vgdb_prefix_default(), VG_LIBDIR "/valgrind-monitor.py"
|
||||
+"\n", vgdb_prefix_default(), VG_GDBSCRIPTS_DIR "/valgrind-monitor.py"
|
||||
);
|
||||
invoker_restrictions_msg();
|
||||
}
|
||||
--
|
||||
2.40.0
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff --git a/callgrind/callgrind_control.in b/callgrind/callgrind_control.in
|
||||
index 083ffa29f..eb50c16ad 100644
|
||||
--- a/callgrind/callgrind_control.in
|
||||
+++ b/callgrind/callgrind_control.in
|
||||
@@ -22,7 +22,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Basename;
|
@ -0,0 +1,22 @@
|
||||
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
|
||||
index b32f13f76..464e8d4ca 100644
|
||||
--- a/shared/vg_replace_strmem.c
|
||||
+++ b/shared/vg_replace_strmem.c
|
||||
@@ -1128,7 +1128,7 @@ static inline void my_exit ( int x )
|
||||
MEMMOVE_OR_MEMCPY(20181, soname, fnname, 0)
|
||||
|
||||
#define MEMCPY(soname, fnname) \
|
||||
- MEMMOVE_OR_MEMCPY(20180, soname, fnname, 1)
|
||||
+ MEMMOVE_OR_MEMCPY(20180, soname, fnname, 0) /* See KDE bug #402833 */
|
||||
|
||||
#if defined(VGO_linux)
|
||||
/* For older memcpy we have to use memmove-like semantics and skip
|
||||
@@ -1714,8 +1714,6 @@ static inline void my_exit ( int x )
|
||||
RECORD_COPY(len); \
|
||||
if (len == 0) \
|
||||
return dst; \
|
||||
- if (is_overlap(dst, src, len, len)) \
|
||||
- RECORD_OVERLAP_ERROR("memcpy_chk", dst, src, len); \
|
||||
if ( dst > src ) { \
|
||||
d = (HChar *)dst + len - 1; \
|
||||
s = (const HChar *)src + len - 1; \
|
@ -0,0 +1,73 @@
|
||||
From 56f1bd12c92806fd18337ba4cd3c0a8d714d0e94 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Thu, 15 Jun 2023 17:24:53 +0200
|
||||
Subject: [PATCH] Bug 470978 - s390x: Link the tools with -Wl,--s390-pgste
|
||||
|
||||
Programs that require the PGSTE mode to be enabled may currently fail
|
||||
under Valgrind. In particular this affects qemu-kvm.
|
||||
|
||||
While it is also possible to enable the PGSTE mode globally with
|
||||
|
||||
sysctl vm.allocate_psgte=1
|
||||
|
||||
the problem can more easily be prevented by linking the Valgrind tools
|
||||
with -Wl,--s390-pgste. Add a configure check if the linker supports this,
|
||||
and activate the flag if it does.
|
||||
|
||||
To verify the intended result, the following shell command can be used to
|
||||
list the executables having this flag set:
|
||||
|
||||
find . -type f -perm -u+x -execdir \
|
||||
/bin/sh -c 'readelf -lW $0 2>/dev/null | grep PGSTE' {} \; -print
|
||||
---
|
||||
Makefile.tool.am | 2 +-
|
||||
configure.ac | 20 ++++++++++++++++++++
|
||||
2 files changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.tool.am b/Makefile.tool.am
|
||||
index df9502913..4ce6d5ab0 100644
|
||||
--- a/Makefile.tool.am
|
||||
+++ b/Makefile.tool.am
|
||||
@@ -78,7 +78,7 @@ TOOL_LDFLAGS_ARM64_LINUX = \
|
||||
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||
|
||||
TOOL_LDFLAGS_S390X_LINUX = \
|
||||
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||
+ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ @FLAG_S390_PGSTE@
|
||||
|
||||
TOOL_LDFLAGS_X86_DARWIN = \
|
||||
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch i386
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0cf84a1c0..1d4164a7d 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3096,6 +3096,26 @@ AC_SUBST([FLAG_NO_BUILD_ID], [""])
|
||||
fi
|
||||
CFLAGS=$safe_CFLAGS
|
||||
|
||||
+# On s390x, if the linker supports -Wl,--s390-pgste, then we build the
|
||||
+# tools with that flag. This enables running programs that need it, such
|
||||
+# as qemu-kvm.
|
||||
+if test x$VGCONF_PLATFORM_PRI_CAPS = xS390X_LINUX; then
|
||||
+AC_MSG_CHECKING([if the linker accepts -Wl,--s390-pgste])
|
||||
+safe_CFLAGS=$CFLAGS
|
||||
+CFLAGS="-Wl,--s390-pgste"
|
||||
+
|
||||
+AC_LINK_IFELSE(
|
||||
+[AC_LANG_PROGRAM([ ], [return 0;])],
|
||||
+[
|
||||
+ AC_SUBST([FLAG_S390_PGSTE], ["-Wl,--s390-pgste"])
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+], [
|
||||
+ AC_SUBST([FLAG_S390_PGSTE], [""])
|
||||
+ AC_MSG_RESULT([no])
|
||||
+])
|
||||
+CFLAGS=$safe_CFLAGS
|
||||
+fi
|
||||
+
|
||||
# does the ppc assembler support "mtocrf" et al?
|
||||
AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
@ -0,0 +1,167 @@
|
||||
From b904112d7084227f8d6fab322bc360a8a6240a51 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Thu, 1 Jun 2023 16:10:56 +0200
|
||||
Subject: [PATCH] memcheck: Handle Err_ReallocSizeZero in MC_(eq_Error)
|
||||
|
||||
When an realloc size zero error is emitted MC_(eq_Error) is called to
|
||||
see if the errors can be deduplicated. This crashed since
|
||||
Err_ReallocSizeZero wasn't handled. Handle it like Err_Free.
|
||||
|
||||
Also add a testcase for this case and test with both
|
||||
--realloc-zero-bytes-frees=yes and
|
||||
--realloc-zero-bytes-frees=no.
|
||||
Which will report a different number of errors.
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=470520
|
||||
---
|
||||
memcheck/mc_errors.c | 1 +
|
||||
memcheck/tests/Makefile.am | 7 +++++++
|
||||
memcheck/tests/realloc_size_zero_again.c | 15 +++++++++++++++
|
||||
.../realloc_size_zero_again_no.stderr.exp | 18 ++++++++++++++++++
|
||||
.../realloc_size_zero_again_no.stdout.exp | 0
|
||||
.../tests/realloc_size_zero_again_no.vgtest | 2 ++
|
||||
.../realloc_size_zero_again_yes.stderr.exp | 18 ++++++++++++++++++
|
||||
.../realloc_size_zero_again_yes.stdout.exp | 0
|
||||
.../tests/realloc_size_zero_again_yes.vgtest | 2 ++
|
||||
9 files changed, 63 insertions(+)
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again.c
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_no.stderr.exp
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_no.stdout.exp
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_no.vgtest
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_yes.stderr.exp
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_yes.stdout.exp
|
||||
create mode 100644 memcheck/tests/realloc_size_zero_again_yes.vgtest
|
||||
|
||||
diff --git a/memcheck/mc_errors.c b/memcheck/mc_errors.c
|
||||
index 00d6ec301..65210a220 100644
|
||||
--- a/memcheck/mc_errors.c
|
||||
+++ b/memcheck/mc_errors.c
|
||||
@@ -1041,6 +1041,7 @@ Bool MC_(eq_Error) ( VgRes res, const Error* e1, const Error* e2 )
|
||||
case Err_IllegalMempool:
|
||||
case Err_Overlap:
|
||||
case Err_Cond:
|
||||
+ case Err_ReallocSizeZero:
|
||||
return True;
|
||||
|
||||
case Err_FishyValue:
|
||||
diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am
|
||||
index 71c38acba..5a17fd35d 100644
|
||||
--- a/memcheck/tests/Makefile.am
|
||||
+++ b/memcheck/tests/Makefile.am
|
||||
@@ -291,8 +291,14 @@ EXTRA_DIST = \
|
||||
realloc_size_zero.vgtest \
|
||||
realloc_size_zero_yes.stderr.exp realloc_size_zero_yes.stdout.exp \
|
||||
realloc_size_zero_yes.vgtest \
|
||||
+ realloc_size_zero_again_yes.stderr.exp \
|
||||
+ realloc_size_zero_again_yes.stdout.exp \
|
||||
+ realloc_size_zero_again_yes.vgtest \
|
||||
realloc_size_zero_no.stderr.exp realloc_size_zero_no.stdout.exp \
|
||||
realloc_size_zero_no.vgtest \
|
||||
+ realloc_size_zero_again_no.stderr.exp \
|
||||
+ realloc_size_zero_again_no.stdout.exp \
|
||||
+ realloc_size_zero_again_no.vgtest \
|
||||
realloc_size_zero_off.stderr.exp realloc_size_zero_off.stdout.exp \
|
||||
realloc_size_zero_off.vgtest \
|
||||
realloc_size_zero_mismatch.stderr.exp \
|
||||
@@ -459,6 +465,7 @@ check_PROGRAMS = \
|
||||
posix_memalign \
|
||||
post-syscall \
|
||||
realloc_size_zero realloc_size_zero_mismatch \
|
||||
+ realloc_size_zero_again \
|
||||
realloc1 realloc2 realloc3 \
|
||||
recursive-merge \
|
||||
resvn_stack \
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again.c b/memcheck/tests/realloc_size_zero_again.c
|
||||
new file mode 100644
|
||||
index 000000000..782d4bde5
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/realloc_size_zero_again.c
|
||||
@@ -0,0 +1,15 @@
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ char *p = malloc (1024);
|
||||
+ for (int i = 3; i >= 0; i--)
|
||||
+ for (int j = 0; j <= 3; j++)
|
||||
+ {
|
||||
+ char *q = realloc (p, i * j * 512);
|
||||
+ p = q;
|
||||
+ }
|
||||
+
|
||||
+ free (p);
|
||||
+}
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_no.stderr.exp b/memcheck/tests/realloc_size_zero_again_no.stderr.exp
|
||||
new file mode 100644
|
||||
index 000000000..b9c061d1a
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/realloc_size_zero_again_no.stderr.exp
|
||||
@@ -0,0 +1,18 @@
|
||||
+realloc() with size 0
|
||||
+ at 0x........: realloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+ Address 0x........ is 0 bytes inside a block of size 1,024 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+
|
||||
+ERROR SUMMARY: 7 errors from 1 contexts (suppressed: 0 from 0)
|
||||
+
|
||||
+7 errors in context 1 of 1:
|
||||
+realloc() with size 0
|
||||
+ at 0x........: realloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+ Address 0x........ is 0 bytes inside a block of size 1,024 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+
|
||||
+ERROR SUMMARY: 7 errors from 1 contexts (suppressed: 0 from 0)
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_no.stdout.exp b/memcheck/tests/realloc_size_zero_again_no.stdout.exp
|
||||
new file mode 100644
|
||||
index 000000000..e69de29bb
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_no.vgtest b/memcheck/tests/realloc_size_zero_again_no.vgtest
|
||||
new file mode 100644
|
||||
index 000000000..f1757b6c1
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/realloc_size_zero_again_no.vgtest
|
||||
@@ -0,0 +1,2 @@
|
||||
+prog: realloc_size_zero_again
|
||||
+vgopts: -q -s --realloc-zero-bytes-frees=no
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_yes.stderr.exp b/memcheck/tests/realloc_size_zero_again_yes.stderr.exp
|
||||
new file mode 100644
|
||||
index 000000000..d40aa2455
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/realloc_size_zero_again_yes.stderr.exp
|
||||
@@ -0,0 +1,18 @@
|
||||
+realloc() with size 0
|
||||
+ at 0x........: realloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+ Address 0x........ is 0 bytes inside a block of size 1,024 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+
|
||||
+ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 0 from 0)
|
||||
+
|
||||
+5 errors in context 1 of 1:
|
||||
+realloc() with size 0
|
||||
+ at 0x........: realloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+ Address 0x........ is 0 bytes inside a block of size 1,024 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ ...
|
||||
+
|
||||
+ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 0 from 0)
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_yes.stdout.exp b/memcheck/tests/realloc_size_zero_again_yes.stdout.exp
|
||||
new file mode 100644
|
||||
index 000000000..e69de29bb
|
||||
diff --git a/memcheck/tests/realloc_size_zero_again_yes.vgtest b/memcheck/tests/realloc_size_zero_again_yes.vgtest
|
||||
new file mode 100644
|
||||
index 000000000..215392ed6
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/realloc_size_zero_again_yes.vgtest
|
||||
@@ -0,0 +1,2 @@
|
||||
+prog: realloc_size_zero_again
|
||||
+vgopts: -q -s --realloc-zero-bytes-frees=yes
|
||||
--
|
||||
2.40.1
|
||||
|
@ -0,0 +1,105 @@
|
||||
From 21f7a2af2805a02a144c81f12895c134f4a171a3 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Mon, 22 May 2023 19:49:08 +0200
|
||||
Subject: [PATCH 2/2] Bug 470132 - s390x: Increase test coverage for VGM
|
||||
|
||||
Add more tests for the VGM instruction, to verify the fix for the VGM
|
||||
wrap-around case. Also test setting unused bits in the I2 and I3 fields,
|
||||
to check that Valgrind ignores them as it should.
|
||||
---
|
||||
none/tests/s390x/vec2.c | 44 ++++++++++++++++++++++++++++++++
|
||||
none/tests/s390x/vec2.stdout.exp | 20 +++++++++++++++
|
||||
2 files changed, 64 insertions(+)
|
||||
|
||||
diff --git a/none/tests/s390x/vec2.c b/none/tests/s390x/vec2.c
|
||||
index 73b04dee4..c473a2a9a 100644
|
||||
--- a/none/tests/s390x/vec2.c
|
||||
+++ b/none/tests/s390x/vec2.c
|
||||
@@ -301,6 +301,49 @@ static void test_all_fp_int_conversions()
|
||||
#undef TEST_EXEC
|
||||
#undef TEST_GENERATE
|
||||
|
||||
+/* -- Vector generate mask -- */
|
||||
+
|
||||
+#define TEST_GENERATE(insn, i2, i3, m4) \
|
||||
+ static void test_vgm_##i2##_##i3##_##m4(void) \
|
||||
+ { \
|
||||
+ ulong_v out = vec_ini; \
|
||||
+ __asm__("vgm %[out]," #i2 "," #i3 "," #m4 : [out] "+v"(out) : :); \
|
||||
+ printf("\t%016lx %016lx\n", out[0], out[1]); \
|
||||
+ }
|
||||
+
|
||||
+#define TEST_EXEC(insn, i2, i3, m4) \
|
||||
+ do { \
|
||||
+ puts(#insn " " #i2 "," #i3 "," #m4); \
|
||||
+ test_vgm_##i2##_##i3##_##m4(); \
|
||||
+ } while (0)
|
||||
+
|
||||
+#define INSNS \
|
||||
+ XTEST(vgmb, 2, 1, 0); \
|
||||
+ XTEST(vgmb, 0xf7, 0x30, 0); \
|
||||
+ XTEST(vgmb, 0, 0, 0); \
|
||||
+ XTEST(vgmh, 3, 2, 1); \
|
||||
+ XTEST(vgmh, 15, 15, 1); \
|
||||
+ XTEST(vgmf, 4, 3, 2); \
|
||||
+ XTEST(vgmf, 16, 17, 2); \
|
||||
+ XTEST(vgmg, 55, 63, 3); \
|
||||
+ XTEST(vgmg, 43, 55, 3); \
|
||||
+ XTEST(vgmg, 63, 2, 3);
|
||||
+
|
||||
+#define XTEST TEST_GENERATE
|
||||
+INSNS
|
||||
+#undef XTEST
|
||||
+
|
||||
+static void test_all_generate_mask()
|
||||
+{
|
||||
+#define XTEST TEST_EXEC
|
||||
+ INSNS
|
||||
+#undef XTEST
|
||||
+}
|
||||
+
|
||||
+#undef INSNS
|
||||
+#undef TEST_EXEC
|
||||
+#undef TEST_GENERATE
|
||||
+
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -310,5 +353,6 @@ int main()
|
||||
test_all_double_bitshifts();
|
||||
test_all_int_fp_conversions();
|
||||
test_all_fp_int_conversions();
|
||||
+ test_all_generate_mask();
|
||||
return 0;
|
||||
}
|
||||
diff --git a/none/tests/s390x/vec2.stdout.exp b/none/tests/s390x/vec2.stdout.exp
|
||||
index b32cbe1bc..2c9ac21c1 100644
|
||||
--- a/none/tests/s390x/vec2.stdout.exp
|
||||
+++ b/none/tests/s390x/vec2.stdout.exp
|
||||
@@ -166,3 +166,23 @@ vcsfp 0
|
||||
vcsfp 8
|
||||
00ffffff - - -
|
||||
00000004 - - -
|
||||
+vgmb 2,1,0
|
||||
+ ffffffffffffffff ffffffffffffffff
|
||||
+vgmb 0xf7,0x30,0
|
||||
+ 8181818181818181 8181818181818181
|
||||
+vgmb 0,0,0
|
||||
+ 8080808080808080 8080808080808080
|
||||
+vgmh 3,2,1
|
||||
+ ffffffffffffffff ffffffffffffffff
|
||||
+vgmh 15,15,1
|
||||
+ 0001000100010001 0001000100010001
|
||||
+vgmf 4,3,2
|
||||
+ ffffffffffffffff ffffffffffffffff
|
||||
+vgmf 16,17,2
|
||||
+ 0000c0000000c000 0000c0000000c000
|
||||
+vgmg 55,63,3
|
||||
+ 00000000000001ff 00000000000001ff
|
||||
+vgmg 43,55,3
|
||||
+ 00000000001fff00 00000000001fff00
|
||||
+vgmg 63,2,3
|
||||
+ e000000000000001 e000000000000001
|
||||
--
|
||||
2.40.1
|
||||
|
@ -0,0 +1,99 @@
|
||||
From 70ef4417837b690755feede0088331a28b102c65 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Mon, 22 May 2023 18:57:35 +0200
|
||||
Subject: [PATCH 1/2] Bug 470132 - s390x: Fix the wrap-around case in VGM
|
||||
|
||||
Valgrind's implementation of VGM is incomplete:
|
||||
|
||||
* It doesn't support generating a wrap-around bit mask. Such a mask
|
||||
should result when the ending bit position is smaller than the starting
|
||||
bit position. Valgrind runs into an assertion failure instead.
|
||||
|
||||
* It doesn't ignore unused bits in the I2 and I3 fields of the
|
||||
instruction, as it should.
|
||||
|
||||
Fix this by re-implementing the main logic in s390_irgen_VGM().
|
||||
---
|
||||
VEX/priv/guest_s390_toIR.c | 57 +++++++++++++++-----------------------
|
||||
1 file changed, 22 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c
|
||||
index 11dda41ef..d9d746c38 100644
|
||||
--- a/VEX/priv/guest_s390_toIR.c
|
||||
+++ b/VEX/priv/guest_s390_toIR.c
|
||||
@@ -16388,50 +16388,37 @@ s390_irgen_VGBM(UChar v1, UShort i2, UChar m3 __attribute__((unused)))
|
||||
static const HChar *
|
||||
s390_irgen_VGM(UChar v1, UShort i2, UChar m3)
|
||||
{
|
||||
- UChar from = (i2 & 0xff00) >> 8;
|
||||
- UChar to = (i2 & 0x00ff);
|
||||
- ULong value = 0UL;
|
||||
- IRType type = s390_vr_get_type(m3);
|
||||
- vassert(from <= to);
|
||||
-
|
||||
- UChar maxIndex = 0;
|
||||
- switch (type) {
|
||||
- case Ity_I8:
|
||||
- maxIndex = 7;
|
||||
- break;
|
||||
- case Ity_I16:
|
||||
- maxIndex = 15;
|
||||
- break;
|
||||
- case Ity_I32:
|
||||
- maxIndex = 31;
|
||||
- break;
|
||||
- case Ity_I64:
|
||||
- maxIndex = 63;
|
||||
- break;
|
||||
- default:
|
||||
- vpanic("s390_irgen_VGM: unknown type");
|
||||
- }
|
||||
-
|
||||
- for(UChar index = from; index <= to; index++) {
|
||||
- value |= (1ULL << (maxIndex - index));
|
||||
- }
|
||||
-
|
||||
- IRExpr *fillValue;
|
||||
- switch (type) {
|
||||
- case Ity_I8:
|
||||
+ s390_insn_assert("vgm", m3 <= 3);
|
||||
+
|
||||
+ UChar max_idx = (8 << m3) - 1;
|
||||
+ UChar from = max_idx & (i2 >> 8);
|
||||
+ UChar to = max_idx & i2;
|
||||
+ ULong all_one = (1ULL << max_idx << 1) - 1;
|
||||
+ ULong value = (all_one >> from) ^ (all_one >> to >> 1);
|
||||
+
|
||||
+ /* In case of wrap-around we now have a value that needs inverting:
|
||||
+ to from
|
||||
+ V V
|
||||
+ 00000111111111110000000000000000 */
|
||||
+ if (to < from)
|
||||
+ value ^= all_one;
|
||||
+
|
||||
+ IRExpr* fillValue;
|
||||
+ switch (m3) {
|
||||
+ case 0:
|
||||
fillValue = mkU8(value);
|
||||
break;
|
||||
- case Ity_I16:
|
||||
+ case 1:
|
||||
fillValue = mkU16(value);
|
||||
break;
|
||||
- case Ity_I32:
|
||||
+ case 2:
|
||||
fillValue = mkU32(value);
|
||||
break;
|
||||
- case Ity_I64:
|
||||
+ case 3:
|
||||
fillValue = mkU64(value);
|
||||
break;
|
||||
default:
|
||||
- vpanic("s390_irgen_VGM: unknown type");
|
||||
+ vpanic("s390_irgen_VGM: unknown element size");
|
||||
}
|
||||
|
||||
s390_vr_fill(v1, fillValue);
|
||||
--
|
||||
2.40.1
|
||||
|
@ -0,0 +1,54 @@
|
||||
--- valgrind-3.8.1/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200
|
||||
+++ valgrind-3.8.1/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100
|
||||
@@ -42,27 +42,30 @@ typedef struct {
|
||||
Int size; /* bytes */
|
||||
Int assoc;
|
||||
Int line_size; /* bytes */
|
||||
- Int sets;
|
||||
Int sets_min_1;
|
||||
Int line_size_bits;
|
||||
Int tag_shift;
|
||||
- HChar desc_line[128]; /* large enough */
|
||||
UWord* tags;
|
||||
-} cache_t2;
|
||||
+ HChar desc_line[128];
|
||||
+} cache_t2
|
||||
+#ifdef __GNUC__
|
||||
+__attribute__ ((aligned (8 * sizeof (Int))))
|
||||
+#endif
|
||||
+;
|
||||
|
||||
/* By this point, the size/assoc/line_size has been checked. */
|
||||
static void cachesim_initcache(cache_t config, cache_t2* c)
|
||||
{
|
||||
- Int i;
|
||||
+ Int sets;
|
||||
|
||||
c->size = config.size;
|
||||
c->assoc = config.assoc;
|
||||
c->line_size = config.line_size;
|
||||
|
||||
- c->sets = (c->size / c->line_size) / c->assoc;
|
||||
- c->sets_min_1 = c->sets - 1;
|
||||
+ sets = (c->size / c->line_size) / c->assoc;
|
||||
+ c->sets_min_1 = sets - 1;
|
||||
c->line_size_bits = VG_(log2)(c->line_size);
|
||||
- c->tag_shift = c->line_size_bits + VG_(log2)(c->sets);
|
||||
+ c->tag_shift = c->line_size_bits + VG_(log2)(sets);
|
||||
|
||||
if (c->assoc == 1) {
|
||||
VG_(sprintf)(c->desc_line, "%d B, %d B, direct-mapped",
|
||||
@@ -72,11 +75,8 @@ static void cachesim_initcache(cache_t c
|
||||
c->size, c->line_size, c->assoc);
|
||||
}
|
||||
|
||||
- c->tags = VG_(malloc)("cg.sim.ci.1",
|
||||
- sizeof(UWord) * c->sets * c->assoc);
|
||||
-
|
||||
- for (i = 0; i < c->sets * c->assoc; i++)
|
||||
- c->tags[i] = 0;
|
||||
+ c->tags = VG_(calloc)("cg.sim.ci.1",
|
||||
+ sizeof(UWord), sets * c->assoc);
|
||||
}
|
||||
|
||||
/* This attribute forces GCC to inline the function, getting rid of a
|
@ -0,0 +1,28 @@
|
||||
--- valgrind/glibc-2.X.supp.in.jj 2011-10-26 23:24:45.000000000 +0200
|
||||
+++ valgrind/glibc-2.X.supp.in 2012-05-07 10:55:20.395942656 +0200
|
||||
@@ -124,7 +124,7 @@
|
||||
glibc-2.5.x-on-SUSE-10.2-(PPC)-2a
|
||||
Memcheck:Cond
|
||||
fun:index
|
||||
- obj:*ld-@GLIBC_VERSION@.*.so
|
||||
+ obj:*ld-@GLIBC_VERSION@*.so
|
||||
}
|
||||
{
|
||||
glibc-2.5.x-on-SuSE-10.2-(PPC)-2b
|
||||
@@ -136,14 +136,14 @@
|
||||
glibc-2.5.5-on-SuSE-10.2-(PPC)-2c
|
||||
Memcheck:Addr4
|
||||
fun:index
|
||||
- obj:*ld-@GLIBC_VERSION@.*.so
|
||||
+ obj:*ld-@GLIBC_VERSION@*.so
|
||||
}
|
||||
{
|
||||
glibc-2.3.5-on-SuSE-10.1-(PPC)-3
|
||||
Memcheck:Addr4
|
||||
fun:*wordcopy_fwd_dest_aligned*
|
||||
fun:mem*cpy
|
||||
- obj:*lib*@GLIBC_VERSION@.*.so
|
||||
+ obj:*lib*@GLIBC_VERSION@*.so
|
||||
}
|
||||
|
||||
{
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue