]> git.pld-linux.org Git - packages/valgrind.git/blame - valgrind-3.13.0-arch_prctl.patch
patch from Fedora to fix "Unsupported arch_prctl option"; rel 3
[packages/valgrind.git] / valgrind-3.13.0-arch_prctl.patch
CommitLineData
cf76dc8f
JP
1diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
2index 0f2ad8c51..407af7f76 100644
3--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
4+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
5@@ -249,6 +249,7 @@ PRE(sys_rt_sigreturn)
6 PRE(sys_arch_prctl)
7 {
8 ThreadState* tst;
9+ Bool known_option = True;
10 PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 );
11
12 vg_assert(VG_(is_valid_tid)(tid));
13@@ -283,13 +284,16 @@ PRE(sys_arch_prctl)
14 POST_MEM_WRITE(ARG2, sizeof(unsigned long));
15 }
16 else {
17- VG_(core_panic)("Unsupported arch_prctl option");
18+ known_option = False;
19 }
20
21 /* Note; the Status writeback to guest state that happens after
22 this wrapper returns does not change guest_FS_CONST or guest_GS_CONST;
23 hence that direct assignment to the guest state is safe here. */
24- SET_STATUS_Success( 0 );
25+ if (known_option)
26+ SET_STATUS_Success( 0 );
27+ else
28+ SET_STATUS_Failure( VKI_EINVAL );
29 }
30
31 // Parts of this are amd64-specific, but the *PEEK* cases are generic.
This page took 0.025915 seconds and 4 git commands to generate.