patch from Fedora to fix "Unsupported arch_prctl option"; rel 3 auto/th/valgrind-3.13.0-3
authorJan Palus <atler@pld-linux.org>
Thu, 2 Aug 2018 16:40:33 +0000 (18:40 +0200)
committerJan Palus <atler@pld-linux.org>
Thu, 2 Aug 2018 16:40:33 +0000 (18:40 +0200)
see https://bugzilla.redhat.com/show_bug.cgi?id=1608824

valgrind-3.13.0-arch_prctl.patch [new file with mode: 0644]
valgrind.spec

diff --git a/valgrind-3.13.0-arch_prctl.patch b/valgrind-3.13.0-arch_prctl.patch
new file mode 100644 (file)
index 0000000..4182210
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
+index 0f2ad8c51..407af7f76 100644
+--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
+@@ -249,6 +249,7 @@ PRE(sys_rt_sigreturn)
+ PRE(sys_arch_prctl)
+ {
+    ThreadState* tst;
++   Bool known_option = True;
+    PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 );
+    vg_assert(VG_(is_valid_tid)(tid));
+@@ -283,13 +284,16 @@ PRE(sys_arch_prctl)
+       POST_MEM_WRITE(ARG2, sizeof(unsigned long));
+    }
+    else {
+-      VG_(core_panic)("Unsupported arch_prctl option");
++      known_option = False;
+    }
+    /* Note; the Status writeback to guest state that happens after
+       this wrapper returns does not change guest_FS_CONST or guest_GS_CONST;
+       hence that direct assignment to the guest state is safe here. */
+-   SET_STATUS_Success( 0 );
++   if (known_option)
++      SET_STATUS_Success( 0 );
++   else
++      SET_STATUS_Failure( VKI_EINVAL );
+ }
+ // Parts of this are amd64-specific, but the *PEEK* cases are generic.
index 81e5d03d0c355f805c5b075f57fa105f72a3ad16..339fb8d7b28232f58e1533079866bce0bfd8e419 100644 (file)
@@ -8,7 +8,7 @@ Summary:        An open-source memory debugger
 Summary(pl.UTF-8):     Otwarty odpluskwiacz pamięci
 Name:          valgrind
 Version:       3.13.0
 Summary(pl.UTF-8):     Otwarty odpluskwiacz pamięci
 Name:          valgrind
 Version:       3.13.0
-Release:       2
+Release:       3
 License:       GPL v2+
 Group:         Development/Tools
 Source0:       ftp://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2
 License:       GPL v2+
 Group:         Development/Tools
 Source0:       ftp://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2
@@ -16,6 +16,7 @@ Source0:      ftp://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2
 Patch0:                %{name}-native-cpuid.patch
 Patch1:                %{name}-ld_linux_strlen.patch
 Patch2:                valgrind-3.13.0-ld-separate-code.patch
 Patch0:                %{name}-native-cpuid.patch
 Patch1:                %{name}-ld_linux_strlen.patch
 Patch2:                valgrind-3.13.0-ld-separate-code.patch
+Patch3:                valgrind-3.13.0-arch_prctl.patch
 URL:           http://valgrind.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake >= 1:1.10
 URL:           http://valgrind.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake >= 1:1.10
@@ -59,6 +60,7 @@ pracować.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.ac
 
 
 sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.ac
 
This page took 0.103405 seconds and 4 git commands to generate.