[arch-commits] Commit in valgrind/trunk (PKGBUILD valgrind-3.18.1-glibc-2.35.patch)

Allan McRae allan at gemini.archlinux.org
Mon Jan 3 23:33:34 UTC 2022


    Date: Monday, January 3, 2022 @ 23:33:33
  Author: allan
Revision: 433352

upgpkg: valgrind 3.18.1-2: add upstream glibc-2.35 compatibility patch

Added:
  valgrind/trunk/valgrind-3.18.1-glibc-2.35.patch
Modified:
  valgrind/trunk/PKGBUILD

----------------------------------+
 PKGBUILD                         |   14 +-
 valgrind-3.18.1-glibc-2.35.patch |  196 +++++++++++++++++++++++++++++++++++++
 2 files changed, 206 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-03 21:50:55 UTC (rev 433351)
+++ PKGBUILD	2022-01-03 23:33:33 UTC (rev 433352)
@@ -4,7 +4,7 @@
 
 pkgname=valgrind
 pkgver=3.18.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool to help find memory-management problems in programs'
 arch=('x86_64')
 license=('GPL')
@@ -18,7 +18,8 @@
 replaces=('valgrind-multilib')
 options=('!emptydirs' '!strip')
 source=(https://sourceware.org/pub/valgrind/valgrind-${pkgver}.tar.bz2{,.asc}
-        valgrind-3.7.0-respect-flags.patch)
+        valgrind-3.7.0-respect-flags.patch
+        valgrind-3.18.1-glibc-2.35.patch)
 validpgpkeys=(
   0E9FFD0C16A1856CF9C7C690BA0166E698FA6035 # Julian Seward <jseward at acm.org>
   EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A # Mark Wielaard <mjw at gnu.org>
@@ -25,10 +26,12 @@
 )
 sha512sums=('a03b5cd7eafab4a1cea07f46464c1546ae1cb3d106649626b1e55658badf90e58d1f3854a38a33d5dffd8237f5555ae7e1f27a4b40e06254f87825c7fc61b59b'
             'SKIP'
-            'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c')
+            'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c'
+            '7ea1bb314c9da0cc7ad5779facb953ece38ae2c9a541d1af1fd044eb01f44c51acbdfc9cc1667ad96ed21475d35b3416884011eecd2ceab97126d5123c2827f9')
 b2sums=('a98322e4c12ae1bc495659217bd398b85e459288e775ba5f543b9ce1faa5bdfc17791178c0e7b9703a31588cc4c7cbde814b7a43b2ec76e7362e2aeeb100d935'
         'SKIP'
-        'af556fdf3c02e37892bfe9afebc954cf2f1b2fa9b75c1caacfa9f3b456ebc02bf078475f9ee30079b3af5d150d41415a947c3d04235c1ea8412cf92b959c484a')
+        'af556fdf3c02e37892bfe9afebc954cf2f1b2fa9b75c1caacfa9f3b456ebc02bf078475f9ee30079b3af5d150d41415a947c3d04235c1ea8412cf92b959c484a'
+        '2fd0865716de0690cdc468f1cb81fa5b830be450525c46e97821d263d0547158aee6ab3c954081564b3821e47143e01d9f9b07f9589e2000bd02132ef5e9de97')
 options=(!lto) # https://bugs.kde.org/show_bug.cgi?id=338252
 
 prepare() {
@@ -36,6 +39,9 @@
   patch -Np1 < ../valgrind-3.7.0-respect-flags.patch
   sed -i 's|sgml/docbook/xsl-stylesheets|xml/docbook/xsl-stylesheets-1.79.2-nons|' docs/Makefile.am
 
+  # https://sourceware.org/git/?p=valgrind.git;a=commitdiff;h=1024237358
+  patch -p1 -i "${srcdir}"/valgrind-3.18.1-glibc-2.35.patch
+
   autoreconf -ifv
 }
 

Added: valgrind-3.18.1-glibc-2.35.patch
===================================================================
--- valgrind-3.18.1-glibc-2.35.patch	                        (rev 0)
+++ valgrind-3.18.1-glibc-2.35.patch	2022-01-03 23:33:33 UTC (rev 433352)
@@ -0,0 +1,196 @@
+From 1024237358f01009fe233cb1294f3b8211304eaa Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark at klomp.org>
+Date: Fri, 10 Dec 2021 17:41:59 +0100
+Subject: [PATCH] Implement linux rseq syscall as ENOSYS
+
+This implements rseq for amd64, arm, arm64, ppc32, ppc64,
+s390x and x86 linux as ENOSYS (without warning).
+
+glibc will start using rseq to accelerate sched_getcpu, if
+available. This would cause a warning from valgrind every
+time a new thread is started.
+
+Real rseq (restartable sequences) support is pretty hard, so
+for now just explicitly return ENOSYS (just like we do for clone3).
+
+https://sourceware.org/pipermail/libc-alpha/2021-December/133656.html
+---
+ coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-arm-linux.c   | 1 +
+ coregrind/m_syswrap/syswrap-arm64-linux.c | 3 ++-
+ coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-x86-linux.c   | 2 ++
+ include/vki/vki-scnums-arm-linux.h        | 1 +
+ include/vki/vki-scnums-arm64-linux.h      | 4 +++-
+ include/vki/vki-scnums-ppc32-linux.h      | 1 +
+ include/vki/vki-scnums-ppc64-linux.h      | 1 +
+ include/vki/vki-scnums-s390x-linux.h      | 5 ++++-
+ 12 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
+index 5062324a1e..18b25f80ae 100644
+--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
+@@ -862,6 +862,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),             // 332
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),        // 334
++
+    LINX_(__NR_membarrier,        sys_membarrier),        // 324
+ 
+    LINX_(__NR_copy_file_range,   sys_copy_file_range),   // 326
+diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
+index 556dd844b9..d583cef0c7 100644
+--- a/coregrind/m_syswrap/syswrap-arm-linux.c
++++ b/coregrind/m_syswrap/syswrap-arm-linux.c
+@@ -1024,6 +1024,7 @@ static SyscallTableEntry syscall_main_table[] = {
+    LINX_(__NR_pwritev2,          sys_pwritev2),         // 393
+ 
+    LINXY(__NR_statx,             sys_statx),            // 397
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 398
+ 
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
+index b871077276..2066a38ea9 100644
+--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
++++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
+@@ -823,8 +823,9 @@ static SyscallTableEntry syscall_main_table[] = {
+    //   (__NR_pkey_mprotect,     sys_ni_syscall),        // 288
+    //   (__NR_pkey_alloc,        sys_ni_syscall),        // 289
+    //   (__NR_pkey_free,         sys_ni_syscall),        // 290
++   LINXY(__NR_statx,             sys_statx),             // 291
+ 
+-   LINXY(__NR_statx,             sys_statx),             // 397
++   GENX_(__NR_rseq,              sys_ni_syscall),        // 293
+ 
+    LINXY(__NR_io_uring_setup,    sys_io_uring_setup),    // 425
+    LINXY(__NR_io_uring_enter,    sys_io_uring_enter),    // 426
+diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
+index 6263ab8451..637b2504e1 100644
+--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
++++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
+@@ -1028,6 +1028,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),            // 383
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 387
++
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+ 
+diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
+index a26b41c321..93956d3cc2 100644
+--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
++++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
+@@ -1019,6 +1019,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),            // 383
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 387
++
+    LINXY(__NR_io_uring_setup,    sys_io_uring_setup),    // 425
+    LINXY(__NR_io_uring_enter,    sys_io_uring_enter),    // 426
+    LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
+index 5c9209859f..73f9684c46 100644
+--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
++++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
+@@ -860,6 +860,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx, sys_statx),                                      // 379
+ 
++   GENX_(__NR_rseq, sys_ni_syscall),                                  // 381
++
+    LINXY(__NR_io_uring_setup, sys_io_uring_setup),                    // 425
+    LINXY(__NR_io_uring_enter, sys_io_uring_enter),                    // 426
+    LINXY(__NR_io_uring_register, sys_io_uring_register),              // 427
+diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
+index 1d8f45d33a..8662ff501a 100644
+--- a/coregrind/m_syswrap/syswrap-x86-linux.c
++++ b/coregrind/m_syswrap/syswrap-x86-linux.c
+@@ -1619,6 +1619,8 @@ static SyscallTableEntry syscall_table[] = {
+    /* Explicitly not supported on i386 yet. */
+    GENX_(__NR_arch_prctl,        sys_ni_syscall),       // 384
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 386
++
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+ 
+diff --git a/include/vki/vki-scnums-arm-linux.h b/include/vki/vki-scnums-arm-linux.h
+index ff560e19dd..485db8b265 100644
+--- a/include/vki/vki-scnums-arm-linux.h
++++ b/include/vki/vki-scnums-arm-linux.h
+@@ -432,6 +432,7 @@
+ #define __NR_pkey_alloc                 395
+ #define __NR_pkey_free                  396
+ #define __NR_statx                      397
++#define __NR_rseq                       398
+ 
+ 
+ 
+diff --git a/include/vki/vki-scnums-arm64-linux.h b/include/vki/vki-scnums-arm64-linux.h
+index 9aa3b2b5fb..acdfb39c68 100644
+--- a/include/vki/vki-scnums-arm64-linux.h
++++ b/include/vki/vki-scnums-arm64-linux.h
+@@ -323,9 +323,11 @@
+ #define __NR_pkey_alloc 289
+ #define __NR_pkey_free 290
+ #define __NR_statx 291
++#define __NR_io_pgetevents 291
++#define __NR_rseq 293
+ 
+ #undef __NR_syscalls
+-#define __NR_syscalls 292
++#define __NR_syscalls 294
+ 
+ ///*
+ // * All syscalls below here should go away really,
+diff --git a/include/vki/vki-scnums-ppc32-linux.h b/include/vki/vki-scnums-ppc32-linux.h
+index 6987ad941b..08fa77df0d 100644
+--- a/include/vki/vki-scnums-ppc32-linux.h
++++ b/include/vki/vki-scnums-ppc32-linux.h
+@@ -415,6 +415,7 @@
+ #define __NR_pkey_alloc		384
+ #define __NR_pkey_free		385
+ #define __NR_pkey_mprotect	386
++#define __NR_rseq		387
+ 
+ #endif /* __VKI_SCNUMS_PPC32_LINUX_H */
+ 
+diff --git a/include/vki/vki-scnums-ppc64-linux.h b/include/vki/vki-scnums-ppc64-linux.h
+index 6827964fdf..a76fa6d322 100644
+--- a/include/vki/vki-scnums-ppc64-linux.h
++++ b/include/vki/vki-scnums-ppc64-linux.h
+@@ -407,6 +407,7 @@
+ #define __NR_pkey_alloc		384
+ #define __NR_pkey_free		385
+ #define __NR_pkey_mprotect	386
++#define __NR_rseq		387
+ 
+ #endif /* __VKI_SCNUMS_PPC64_LINUX_H */
+ 
+diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h
+index 6487e20c99..869c045847 100644
+--- a/include/vki/vki-scnums-s390x-linux.h
++++ b/include/vki/vki-scnums-s390x-linux.h
+@@ -342,8 +342,11 @@
+ #define __NR_s390_guarded_storage	378
+ #define __NR_statx			379
+ #define __NR_s390_sthyi			380
++#define __NR_kexec_file_load		381
++#define __NR_io_pgetevents		382
++#define __NR_rseq			383
+ 
+-#define NR_syscalls 381
++#define NR_syscalls 384
+ 
+ /* 
+  * There are some system calls that are not present on 64 bit, some
+-- 
+2.27.0
+



More information about the arch-commits mailing list