3.13.0-22 - Add valgrind-3.13.0-arch_prctl.patch (#1608824)

This commit is contained in:
Mark Wielaard 2018-07-26 19:28:22 +02:00
parent 7f3d58ed9d
commit 7c872d3e32
2 changed files with 39 additions and 1 deletions

View File

@ -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.

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind Name: %{?scl_prefix}valgrind
Version: 3.13.0 Version: 3.13.0
Release: 21%{?dist} Release: 22%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
URL: http://www.valgrind.org/ URL: http://www.valgrind.org/
@ -188,6 +188,9 @@ Patch23: valgrind-3.13.0-ld-separate-code.patch
# KDE#396452 none/test/arm/vfp.c doesn't build with binutils 2.31 gas # KDE#396452 none/test/arm/vfp.c doesn't build with binutils 2.31 gas
Patch24: valgrind-3.13.0-arm-disable-vfp-test.patch Patch24: valgrind-3.13.0-arm-disable-vfp-test.patch
# KDE#396887 arch_prctl should return EINVAL on unknown option
Patch25: valgrind-3.13.0-arch_prctl.patch
%if %{build_multilib} %if %{build_multilib}
# Ensure glibc{,-devel} is installed for both multilib arches # Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
@ -332,6 +335,7 @@ Valgrind User Manual for details.
%patch22 -p1 %patch22 -p1
%patch23 -p1 %patch23 -p1
%patch24 -p1 %patch24 -p1
%patch25 -p1
%build %build
CC=gcc CC=gcc
@ -554,6 +558,9 @@ echo ===============END TESTING===============
%endif %endif
%changelog %changelog
* Thu Jul 26 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-22
- Add valgrind-3.13.0-arch_prctl.patch (#1608824)
* Thu Jul 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-21 * Thu Jul 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-21
- Add valgrind-3.13.0-separate-code.patch (#1600034) - Add valgrind-3.13.0-separate-code.patch (#1600034)
- Add valgrind-3.13.0-arm-disable-vfp-test.patch - Add valgrind-3.13.0-arm-disable-vfp-test.patch