Update to upstream 3.18.1 final

Resolves: #1870001
Add POWER10 support for valgrind

Resolves: #1952836
Regression in RAND_bytes() due to locking

Resolves: #2008625
rollup rebase for valgrind for rhel 9.0.0
This commit is contained in:
Mark Wielaard 2021-10-21 16:55:39 +02:00
parent 13b8df40b9
commit 5026b80440
17 changed files with 14 additions and 8874 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@
/valgrind-3.17.0.RC1.tar.bz2
/valgrind-3.17.0.RC2.tar.bz2
/valgrind-3.17.0.tar.bz2
/valgrind-3.18.1.tar.bz2

View File

@ -1,41 +0,0 @@
From 6da22a4d246519cd1a638cfc7eff00cdd74413c4 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Fri, 16 Jul 2021 21:37:21 +0200
Subject: [PATCH] gdbserver_tests: update filters for newer glibc/gdb
With newer glibc/gdb we might see a __select call without anything
following on the line. Also when gdb cannot find a file it might
now print "Inappropriate ioctl for device" instead of the message
"No such file or directory"
---
gdbserver_tests/filter_gdb | 1 +
gdbserver_tests/filter_vgdb | 1 +
2 files changed, 2 insertions(+)
diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
index 3bcd26d86..4a5b5d7a5 100755
--- a/gdbserver_tests/filter_gdb
+++ b/gdbserver_tests/filter_gdb
@@ -111,6 +111,7 @@ s/\(0x........\) in ?? ()$/\1 in syscall .../
# If select.c sources are present, we can also get a line containing:
# return SYSCALL_CANCEL....
s/in __select .*/in syscall .../
+s/in __select$/in syscall .../
/exceptfds/d
/sysv\/linux\/select\.c/d
/return SYSCALL_CANCEL /d
diff --git a/gdbserver_tests/filter_vgdb b/gdbserver_tests/filter_vgdb
index f8028a39a..679ca4b31 100755
--- a/gdbserver_tests/filter_vgdb
+++ b/gdbserver_tests/filter_vgdb
@@ -18,6 +18,7 @@ sed -e '/relaying data between gdb and process/d' \
# filter some debuginfo problems with ld.so and SLES11
sed -e '/^1 rtld.c: No such file or directory\./d' |
+sed -e '/rtld.c: Inappropriate ioctl for device\./d' |
# and filter out any remaining empty lines
sed -e '/^$/d'
--
2.27.0

View File

@ -1,241 +0,0 @@
From 5e16f12e5e812d8ed4e3e96f373d73c22c964148 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Fri, 16 Jul 2021 15:47:08 -0400
Subject: [PATCH] Update helgrind and drd suppression libc and libpthread paths
in glibc 2.34
glibc 2.34 moved all pthread functions into the main libc library.
And it changed the (in memory) path of the main libc library to
libc.so.6 (before it was libc-2.xx.so).
This breaks various standard suppressions for helgrind and drd.
Fix this by doing a configure check for whether we are using glibc
2.34 by checking whether pthread_create is in libc instead of in
libpthread. If we are using glibc then define GLIBC_LIBC_PATH and
GLIBC_LIBPTHREAD_PATH variables that point to the (regexp) path
of the library that contains all libc functions and pthread functions
(which will be the same path for glibc 2.34+).
Rename glibc-2.34567-NPTL-helgrind.supp to glibc-2.X-helgrind.supp.in
and glibc-2.X-drd.supp to glibc-2.X-drd.supp.in and replace the
GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH at configure time.
The same could be done for the glibc-2.X.supp.in file, but hasn't
yet because it looks like most suppressions in that file are obsolete.
---
Makefile.am | 2 +-
configure.ac | 37 +++++++++++++++++--
glibc-2.X-drd.supp => glibc-2.X-drd.supp.in | 6 ++-
...elgrind.supp => glibc-2.X-helgrind.supp.in | 16 ++++----
4 files changed, 47 insertions(+), 14 deletions(-)
rename glibc-2.X-drd.supp => glibc-2.X-drd.supp.in (97%)
rename glibc-2.34567-NPTL-helgrind.supp => glibc-2.X-helgrind.supp.in (95%)
diff --git a/Makefile.am b/Makefile.am
index 66848afaa..f5935eb69 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,7 @@ SUPP_FILES = \
glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp glibc-2.5.supp \
glibc-2.6.supp glibc-2.7.supp glibc-2.X.supp.in \
xfree-3.supp xfree-4.supp \
- glibc-2.34567-NPTL-helgrind.supp \
+ glibc-2.X-helgrind.supp \
glibc-2.2-LinuxThreads-helgrind.supp \
glibc-2.X-drd.supp \
darwin9.supp darwin9-drd.supp \
diff --git a/configure.ac b/configure.ac
index 4582fb5d0..beb5bba79 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1090,6 +1090,31 @@ if test x$GLIBC_VERSION = x; then
fi
fi
+# If this is glibc then figure out the generic (in file) libc.so and
+# libpthread.so file paths to use in suppressions. Before 2.34 libpthread
+# was a separate library, afterwards it was merged into libc.so and
+# the library is called libc.so.6 (before it was libc-2.[0-9]+.so).
+# Use this fact to set GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH.
+case ${GLIBC_VERSION} in
+2*)
+ AC_MSG_CHECKING([whether pthread_create needs libpthread])
+ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_create])],
+ [
+ AC_MSG_RESULT([no])
+ GLIBC_LIBC_PATH="*/lib*/libc.so.6"
+ GLIBC_LIBPTHREAD_PATH="$GLIBC_LIBC_PATH"
+ ], [
+ AC_MSG_RESULT([yes])
+ GLIBC_LIBC_PATH="*/lib*/libc-2.*so*"
+ GLIBC_LIBPTHREAD_PATH="*/lib*/libpthread-2.*so*"
+ ])
+ ;;
+*)
+ AC_MSG_CHECKING([not glibc...])
+ AC_MSG_RESULT([${GLIBC_VERSION}])
+ ;;
+esac
+
AC_MSG_CHECKING([the glibc version])
case "${GLIBC_VERSION}" in
@@ -1102,13 +1127,13 @@ case "${GLIBC_VERSION}" in
2.[[3-6]])
AC_MSG_RESULT(${GLIBC_VERSION} family)
DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
2.[[7-9]])
AC_MSG_RESULT(${GLIBC_VERSION} family)
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
2.10|2.11)
@@ -1116,7 +1141,7 @@ case "${GLIBC_VERSION}" in
AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
[Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
2.*)
@@ -1126,7 +1151,7 @@ case "${GLIBC_VERSION}" in
AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
[Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
darwin)
@@ -1157,6 +1182,8 @@ case "${GLIBC_VERSION}" in
esac
AC_SUBST(GLIBC_VERSION)
+AC_SUBST(GLIBC_LIBC_PATH)
+AC_SUBST(GLIBC_LIBPTHREAD_PATH)
if test "$VGCONF_OS" != "solaris"; then
@@ -4928,6 +4955,8 @@ AC_CONFIG_FILES([
valgrind.spec
valgrind.pc
glibc-2.X.supp
+ glibc-2.X-helgrind.supp
+ glibc-2.X-drd.supp
docs/Makefile
tests/Makefile
tests/vg_regtest
diff --git a/glibc-2.X-drd.supp b/glibc-2.X-drd.supp.in
similarity index 97%
rename from glibc-2.X-drd.supp
rename to glibc-2.X-drd.supp.in
index cee5f22fb..2c880051a 100644
--- a/glibc-2.X-drd.supp
+++ b/glibc-2.X-drd.supp.in
@@ -1,3 +1,5 @@
+# IMPORTANT: DO NOT EDIT glibc-2.X-drd.supp, as it is as a generated
+# file. Instead edit glibc-2.X-drd.supp.in.
#
# Suppression patterns for ld, the dynamic loader.
#
@@ -6,7 +8,7 @@
{
drd-ld
drd:ConflictingAccess
- obj:*/lib*/ld-*.so
+ obj:*/lib*/ld*.so*
}
#
@@ -22,7 +24,7 @@
{
drd-libc-stdio
drd:ConflictingAccess
- obj:*/lib*/libc-*
+ obj:@GLIBC_LIBC_PATH@
}
{
drd-libc-thread-cancellation-test
diff --git a/glibc-2.34567-NPTL-helgrind.supp b/glibc-2.X-helgrind.supp.in
similarity index 95%
rename from glibc-2.34567-NPTL-helgrind.supp
rename to glibc-2.X-helgrind.supp.in
index 7ebd2c4b4..cecf3ceab 100644
--- a/glibc-2.34567-NPTL-helgrind.supp
+++ b/glibc-2.X-helgrind.supp.in
@@ -1,3 +1,5 @@
+# IMPORTANT: DO NOT EDIT glibc-2.X-helgrind.supp, as it is as a generated
+# file. Instead edit glibc-2.X-helgrind.supp.in.
# FIXME 22 Jan 09: helgrind-glibc2X-005 overlaps with a lot of
# other stuff. They should be removed.
@@ -41,7 +43,7 @@
{
helgrind-glibc2X-004
Helgrind:Race
- obj:*/lib*/libc-2.*so*
+ obj:@GLIBC_LIBC_PATH@
}
{
@@ -49,13 +51,13 @@
Helgrind:Race
fun:__GI_mempcpy
fun:_IO_*xsputn*
- obj:*/lib*/libc-2.*so*
+ obj:@GLIBC_LIBC_PATH@
}
{
helgrind-glibc2X-005
Helgrind:Race
- obj:*/lib*/libpthread-2.*so*
+ obj:@GLIBC_LIBPTHREAD_PATH@
}
# helgrind-glibc2X-006 was merged into helgrind-glibc2X-005
@@ -90,14 +92,14 @@
{
helgrind-glibc2X-101
Helgrind:Race
- obj:*/lib*/libpthread-2.*so*
+ obj:@GLIBC_LIBPTHREAD_PATH@
fun:pthread_*
}
{
helgrind-glibc2X-102
Helgrind:Race
fun:mythread_wrapper
- obj:*/lib*/libpthread-2.*so*
+ obj:@GLIBC_LIBPTHREAD_PATH@
}
{
helgrind-glibc2X-103
@@ -122,7 +124,7 @@
{
helgrind-glibc2X-107
Helgrind:Race
- obj:*/lib*/libpthread-2.*so*
+ obj:@GLIBC_LIBPTHREAD_PATH@
fun:sem_*
}
{
@@ -138,7 +140,7 @@
{
helgrind-glibc2X-110
Helgrind:Race
- obj:*/lib*/libc-2.*so*
+ obj:@GLIBC_LIBC_PATH@
fun:pthread_*
}
{
--
2.27.0

View File

@ -1 +1 @@
SHA512 (valgrind-3.17.0.tar.bz2) = 94de78942a7059e1ab84d1c0c0b8f3efd1c2d15c70b97bc7edc8136812778adb6f8187149d53a60a8c6a7c8b40534f9be5cfed0eb3c0c314545b681f950b108f
SHA512 (valgrind-3.18.1.tar.bz2) = a03b5cd7eafab4a1cea07f46464c1546ae1cb3d106649626b1e55658badf90e58d1f3854a38a33d5dffd8237f5555ae7e1f27a4b40e06254f87825c7fc61b59b

View File

@ -1,21 +0,0 @@
commit e08a82991a9b9dc87c13f2b89273f25f97d14baf
Author: Tom Hughes <tom@compton.nu>
Date: Tue Apr 6 22:44:36 2021 +0100
Only process clone results in the parent thread
Fixes BZ#423963
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
index 5ae4e6613..c59d8ee26 100644
--- a/coregrind/m_syswrap/syswrap-linux.c
+++ b/coregrind/m_syswrap/syswrap-linux.c
@@ -940,7 +940,7 @@ PRE(sys_clone)
("Valgrind does not support general clone().");
}
- if (SUCCESS) {
+ if (SUCCESS && RES != 0) {
if (ARG_FLAGS & (VKI_CLONE_PARENT_SETTID | VKI_CLONE_PIDFD))
POST_MEM_WRITE(ARG3, sizeof(Int));
if (ARG_FLAGS & (VKI_CLONE_CHILD_SETTID | VKI_CLONE_CHILD_CLEARTID))

View File

@ -1,141 +0,0 @@
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index 45e1f3d1b..3b2dcb8e3 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -874,6 +874,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
index 428cb7c6f..7f41b0749 100644
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
@@ -1051,6 +1051,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
index 024ece27f..0d717f44b 100644
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
@@ -830,6 +830,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
index 62b085ea2..b62129111 100644
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1136,6 +1136,8 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_ (__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
index b73c03da1..94f38366f 100644
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -815,6 +815,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY (__NR_io_uring_setup, sys_io_uring_setup),
LINXY (__NR_io_uring_enter, sys_io_uring_enter),
LINXY (__NR_io_uring_register, sys_io_uring_register),
+ GENX_ (__NR_clone3, sys_ni_syscall),
LINX_ (__NR_faccessat2, sys_faccessat2),
};
diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c
index 14127b181..102c15550 100644
--- a/coregrind/m_syswrap/syswrap-nanomips-linux.c
+++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c
@@ -824,6 +824,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY (__NR_io_uring_setup, sys_io_uring_setup),
LINXY (__NR_io_uring_enter, sys_io_uring_enter),
LINXY (__NR_io_uring_register, sys_io_uring_register),
+ GENX_ (__NR_clone3, sys_ni_syscall),
LINX_ (__NR_faccessat2, sys_faccessat2),
};
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index aad14f8ba..1e2efc677 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -1054,6 +1054,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index c0e3f5549..76610e142 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -1023,6 +1023,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index af6c4eb21..5283c19fe 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -864,6 +864,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index 67d866497..418c76975 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1645,6 +1645,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_io_uring_enter, sys_io_uring_enter), // 426
LINXY(__NR_io_uring_register, sys_io_uring_register),// 427
+ GENX_(__NR_clone3, sys_ni_syscall), // 435
+
LINX_(__NR_faccessat2, sys_faccessat2), // 439
};
diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h
index c8bc31b4b..6c70c9981 100644
--- a/include/vki/vki-scnums-shared-linux.h
+++ b/include/vki/vki-scnums-shared-linux.h
@@ -39,6 +39,8 @@
#define __NR_fsmount 432
#define __NR_fspick 433
+#define __NR_clone3 435
+
#define __NR_faccessat2 439
#endif

View File

@ -1,30 +0,0 @@
commit 93104368952c37268da724231487058ea3eaf1dc
Author: Tom Hughes <tom@compton.nu>
Date: Thu May 20 17:16:06 2021 +0100
Don't look for separate debuginfo if the image has a .debug_info section
Fixes BZ#435908
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
index b0f062ddc..e424e3e7e 100644
--- a/coregrind/m_debuginfo/readelf.c
+++ b/coregrind/m_debuginfo/readelf.c
@@ -2879,13 +2879,15 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
/* Look for a build-id */
HChar* buildid = find_buildid(mimg, False, False);
- /* Look for a debug image that matches either the build-id or
+ /* If we don't have a .debug_info section in the main image then
+ look for a debug image that matches either the build-id or
the debuglink-CRC32 in the main image. If the main image
doesn't contain either of those then this won't even bother
to try looking. This looks in all known places, including
the --extra-debuginfo-path if specified and on the
--debuginfo-server if specified. */
- if (buildid != NULL || debuglink_escn.img != NULL) {
+ if (debug_info_escn.img == NULL &&
+ (buildid != NULL || debuglink_escn.img != NULL)) {
/* Do have a debuglink section? */
if (debuglink_escn.img != NULL) {
UInt crc_offset

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
commit 44da99781e5bb954a0cd3c897b859012a125fec6
Author: Mark Wielaard <mark@klomp.org>
Date: Fri Aug 6 19:08:17 2021 +0200
unhandled ppc64le-linux syscall: 252 (statfs64) and 253 (fstatfs64)
glibc 2.34 consolidated all statfs implementations. All other arches
that have statfs64/fstat64 (including ppc32) already had that syscall
hooked up, it was just ppc64 that was missing it.
https://bugs.kde.org/show_bug.cgi?id=440670
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index 76610e142..f1a88f7ce 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -900,8 +900,8 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_tgkill, sys_tgkill), // 250
// _____(__NR_utimes, sys_utimes), // 251
-// _____(__NR_statfs64, sys_statfs64), // 252
-// _____(__NR_fstatfs64, sys_fstatfs64), // 253
+ GENXY(__NR_statfs64, sys_statfs64), // 252
+ GENXY(__NR_fstatfs64, sys_fstatfs64), // 253
// /* #define __NR_fadvise64_64 254 32bit only */
// _____(__NR_rtas, sys_rtas), // 255

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
commit 124ae6cfa303f0cc71ffd685620cb57c4f8f02bb
Author: Andreas Arnez <arnez@linux.ibm.com>
Date: Mon Jun 7 14:01:53 2021 +0200
s390x: Don't emit "vector or with complement" on z13
The z/Architecture instruction "vector or with complement" (VOC) can be
used as an optimization to combine "vector or" with "vector nor". This is
exploited in Valgrind since commit 6c1cb1a0128b00858b973e. However, VOC
requires the vector-enhancements facility 1, which is not installed on a
z13 CPU. Thus Valgrind can now run into SIGILL on z13 when trying to
execute vector string instructions.
Fix this by suppressing the VOC optimization unless the
vector-enhancements facility 1 is recognized on the host.
diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c
index ee20c6711..15ca92a6b 100644
--- a/VEX/priv/host_s390_isel.c
+++ b/VEX/priv/host_s390_isel.c
@@ -4102,14 +4102,17 @@ s390_isel_vec_expr_wrk(ISelEnv *env, IRExpr *expr)
case Iop_OrV128:
size = 16;
vec_binop = S390_VEC_OR;
- if (arg1->tag == Iex_Unop && arg1->Iex.Unop.op == Iop_NotV128) {
- IRExpr* orig_arg1 = arg1;
- arg1 = arg2;
- arg2 = orig_arg1->Iex.Unop.arg;
- vec_binop = S390_VEC_ORC;
- } else if (arg2->tag == Iex_Unop && arg2->Iex.Unop.op == Iop_NotV128) {
- arg2 = arg2->Iex.Unop.arg;
- vec_binop = S390_VEC_ORC;
+ if (s390_host_has_vxe) {
+ if (arg1->tag == Iex_Unop && arg1->Iex.Unop.op == Iop_NotV128) {
+ IRExpr* orig_arg1 = arg1;
+ arg1 = arg2;
+ arg2 = orig_arg1->Iex.Unop.arg;
+ vec_binop = S390_VEC_ORC;
+ } else if (arg2->tag == Iex_Unop &&
+ arg2->Iex.Unop.op == Iop_NotV128) {
+ arg2 = arg2->Iex.Unop.arg;
+ vec_binop = S390_VEC_ORC;
+ }
}
goto Iop_VV_wrk;

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +0,0 @@
commit 45873298ff2d17accc65654d64758360616aade5
Author: Andreas Arnez <arnez@linux.ibm.com>
Date: Tue Mar 30 18:10:43 2021 +0200
s390x: Add missing UNOP insns to s390_insn_as_string
Some unary operator insns are not handled by s390_insn_as_string(). If
they are encountered while the appropriate trace flag is set, a vpanic
occurs. Fix this: add handling for the missing insns.
diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c
index 8762975b2..6e0734ae0 100644
--- a/VEX/priv/host_s390_defs.c
+++ b/VEX/priv/host_s390_defs.c
@@ -7860,12 +7860,24 @@ s390_insn_as_string(const s390_insn *insn)
op = "v-vunpacku";
break;
- case S390_VEC_FLOAT_NEG:
- op = "v-vfloatneg";
+ case S390_VEC_ABS:
+ op = "v-vabs";
break;
- case S390_VEC_FLOAT_SQRT:
- op = "v-vfloatsqrt";
+ case S390_VEC_COUNT_LEADING_ZEROES:
+ op = "v-vclz";
+ break;
+
+ case S390_VEC_COUNT_TRAILING_ZEROES:
+ op = "v-vctz";
+ break;
+
+ case S390_VEC_COUNT_ONES:
+ op = "v-vpopct";
+ break;
+
+ case S390_VEC_FLOAT_NEG:
+ op = "v-vfloatneg";
break;
case S390_VEC_FLOAT_ABS:
@@ -7876,6 +7888,10 @@ s390_insn_as_string(const s390_insn *insn)
op = "v-vfloatnabs";
break;
+ case S390_VEC_FLOAT_SQRT:
+ op = "v-vfloatsqrt";
+ break;
+
default:
goto fail;
}

View File

@ -1,14 +0,0 @@
diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am
index a0fb92ef5..ac62506b9 100644
--- a/none/tests/s390x/Makefile.am
+++ b/none/tests/s390x/Makefile.am
@@ -66,7 +67,8 @@ cu14_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu24_1_CFLAGS = $(AM_CFLAGS) -DM3=1
fixbr_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
-fpext_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
+fpext_CFLAGS = $(AM_CFLAGS) -march=z13 @FLAG_MLONG_DOUBLE_128@
+pfpo_CFLAGS = $(AM_CFLAGS) -march=z13
ex_clone_LDADD = -lpthread
vector_CFLAGS = $(AM_CFLAGS) -march=z13
lsc2_CFLAGS = -march=z13 -DS390_TESTS_NOCOLOR

View File

@ -1,26 +0,0 @@
commit 200b6a5a0ea3e1e154663b0fc575bfe2becf177d
Author: Mark Wielaard <mark@klomp.org>
Date: Wed Jul 21 17:55:40 2021 +0200
m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below main
With glibc 2.34 we might see the _start symbol as the frame that
called main instead of directly after __libc_start_main or
generic_start_main.
Fixes memcheck/tests/badjump[2], memcheck/tests/origin4-many,
helgrind/tests/tc04_free_lock, helgrind/tests/tc09_bad_unlock
and helgrind/tests/tc20_verifywrap.
diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c
index bc2578b37..e2218f266 100644
--- a/coregrind/m_debuginfo/debuginfo.c
+++ b/coregrind/m_debuginfo/debuginfo.c
@@ -2289,6 +2289,7 @@ Vg_FnNameKind VG_(get_fnname_kind) ( const HChar* name )
VG_STREQN(18, "__libc_start_main.", name) || // gcc optimization
VG_STREQ("generic_start_main", name) || // Yellow Dog doggedness
VG_STREQN(19, "generic_start_main.", name) || // gcc optimization
+ VG_STREQ("_start", name) ||
# elif defined(VGO_darwin)
// See readmacho.c for an explanation of this.
VG_STREQ("start_according_to_valgrind", name) || // Darwin, darling

View File

@ -2,8 +2,8 @@
Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind
Version: 3.17.0
Release: 12%{?dist}
Version: 3.18.1
Release: 1%{?dist}
Epoch: 1
License: GPLv2+
URL: http://www.valgrind.org/
@ -71,7 +71,7 @@ URL: http://www.valgrind.org/
# So those will already have their full symbol table.
%undefine _include_minidebuginfo
Source0: ftp://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2
Source0: https://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2
# Needs investigation and pushing upstream
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
@ -85,84 +85,6 @@ Patch4: valgrind-3.16.0-some-stack-protector.patch
# Add some -Wl,z,now.
Patch5: valgrind-3.16.0-some-Wl-z-now.patch
# Upstream commits that provide additional ppc64le ISA 3.1 support
# commit 3cc0232c46a5905b4a6c2fbd302b58bf5f90b3d5
# PPC64: ISA 3.1 VSX PCV Generate Operations
# commit 078f89e99b6f62e043f6138c6a7ae238befc1f2a
# PPC64: Reduced-Precision bfloat16 Outer Product & Format Conversion Operations
# commit e09fdaf569b975717465ed8043820d0198d4d47d
# PPC64: Reduced-Precision: Missing Integer-based Outer Product Operations
Patch6: valgrind-3.17.0-ppc64-isa-3.1.patch
# Upstream commits that provide extra tests for ppc64le ISA 3.1 support
# commit c8fa838be405d7ac43035dcf675bf490800c26ec
# Reduced Precision bfloat16 outer product tests
# commit 4bcc6c8a97c10c4dd41b35bd3b3035ec4037d524
# VSX Permute Control Vector Generate Operation tests.
# commit c589b652939655090c005a982a71f50c489fb5ce
# Reduced precision Missing Integer based outer tests
Patch7: valgrind-3.17.0-ppc64-isa-3.1-tests.patch
# commit 45873298ff2d17accc65654d64758360616aade5
# s390x: Add missing UNOP insns to s390_insn_as_string
Patch8: valgrind-3.17.0-s390_insn_as_string.patch
# KDE#435908 Don't look for separate debuginfo if image already has .debug_info
Patch9: valgrind-3.17.0-debuginfod.patch
# KDE#423963 Only process clone results in the parent thread
Patch10: valgrind-3.17.0-clone-parent-res.patch
# commit d74a637206ef5532ccd2ccb2e31ee2762f184e60
# Bug 433863 - s390x: Remove memcheck test cases for cs, cds, and csg
# commit 18ddcc47c951427efd3b790ba2481159b9bd1598
# s390x: Support "expensive" comparisons Iop_ExpCmpNE32/64
# commit 5db3f929c43bf46f4707178706cfe90f43acdd19
# s390x: Add convenience function mkV128()
# commit e78bd78d3043729033b426218ab8c6dae9c51e96
# Bug 434296 - s390x: Rework IR conversion of VSTRC, VFAE, and VFEE
# commit 4f17a067c4f8245c05611d6e8aa36e8841bab376
# Bug 434296 - s390x: Rework IR conversion of VFENE
# commit 9bd78ebd8bb5cd4ebb3f081ceba46836cc485551
# Bug 434296 - s390x: Rework IR conversion of VISTR
# commit 32312d588b77c5b5b5a0145bb0cc6f795b447790
# Bug 434296 - s390x: Add memcheck test cases for vector string insns
# commit a0bb049ace14ab52d386bb1d49a399f39eec4986
# s390x: Improve handling of amodes without base register
# commit fd935e238d907d9c523a311ba795077d95ad6912
# s390x: Rework insn "v-vdup" and add "v-vrep"
# commit 6c1cb1a0128b00858b973ef9344e12d6ddbaaf57
# s390x: Add support for emitting "vector or with complement"
# commit 0bd4263326b2d48f782339a9bbe1a069c7de45c7
# s390x: Fix/optimize Iop_64HLtoV128
# commit cae5062b05b95e0303b1122a0ea9aadc197e4f0a
# s390x: Add missing stdout.exp for vector string memcheck test
Patch11: valgrind-3.17.0-s390-prep.patch
# KDE#432387 - s390x: z15 instructions support
Patch12: valgrind-3.17.0-s390-z15.patch
# commit 124ae6cfa303f0cc71ffd685620cb57c4f8f02bb
# s390x: Don't emit "vector or with complement" on z13
Patch13: valgrind-3.17.0-s390-z13-vec-fix.patch
# commit 6da22a4d246519cd1a638cfc7eff00cdd74413c4
# gdbserver_tests: update filters for newer glibc/gdb
Patch14: gdbserver_tests-update-filters-for-newer-glibc-gdb.patch
# KDE#439590 glibc-2.34 breaks suppressions against obj:*/lib*/libc-2.*so*
Patch15: helgrind-and-drd-suppression-libc-and-libpthread.patch
# KDE#420906 missing syscall wrapper for clone3 (435)
Patch16: valgrind-3.17.0-clone3.patch
# commit 200b6a5a0ea3e1e154663b0fc575bfe2becf177d
# m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below main
Patch17: valgrind-3.17.0_start.patch
# KDE#440670 unhandled ppc64 syscalls 252 (statfs64 and 253 (fstatfs64)
Patch18: valgrind-3.17.0-ppc64-statfs64.patch
BuildRequires: make
BuildRequires: glibc-devel
@ -193,15 +115,12 @@ BuildRequires: autoconf
# For make check validating the documentation
BuildRequires: docbook-dtds
# configure might use which
BuildRequires: which
# For testing debuginfod-find
%if 0%{?fedora} > 29 || 0%{?rhel} > 7
BuildRequires: elfutils-debuginfod-client
%endif
# For using debuginfod at runtime
Recommends: elfutils-debuginfod-client
%endif
%{?scl:Requires:%scl_runtime}
@ -303,24 +222,6 @@ Valgrind User Manual for details.
%patch5 -p1
%endif
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
touch memcheck/tests/s390x/vistr.stdout.exp
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%build
# LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto
# configure time option, but that doesn't seem to help.
@ -492,8 +393,11 @@ fi
cat diffs
echo ===============END TESTING===============
%{!?_licensedir:%global license %%doc}
%files
%doc COPYING NEWS README_*
%license COPYING COPYING.DOCS
%doc NEWS README_*
%doc docs/installed/html docs/installed/*.pdf
%{_bindir}/*
%dir %{_libexecdir}/valgrind
@ -517,6 +421,7 @@ echo ===============END TESTING===============
%if %{build_tools_devel}
%files tools-devel
%license COPYING
%{_includedir}/valgrind/config.h
%{_includedir}/valgrind/libvex*h
%{_includedir}/valgrind/pub_tool_*h
@ -545,6 +450,9 @@ fi
%endif
%changelog
* Thu Oct 21 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-1
- Update to upstream 3.18.1 final
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.17.0-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688