|
From: <sv...@va...> - 2016-11-01 18:28:33
|
Author: petarj
Date: Tue Nov 1 18:28:26 2016
New Revision: 16110
Log:
mips: add POST function to sys_prctl
Add missing POST wrapper for sys_prctl.
This fixes regressions from r15934 (on MIPS32 platforms) and r16003
(on MIPS64 platforms).
Related test: memcheck/tests/threadname
Modified:
trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
trunk/coregrind/m_syswrap/syswrap-mips64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-mips32-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-mips32-linux.c Tue Nov 1 18:28:26 2016
@@ -560,7 +560,7 @@
// We're going to need something like linux/core_os32.h for such
// things, eventually, I think. --njn
-PRE (sys_lstat64)
+PRE(sys_lstat64)
{
PRINT ("sys_lstat64 ( %#lx(%s), %#lx )", ARG1, (HChar *) ARG1, ARG2);
PRE_REG_READ2 (long, "lstat64", char *, file_name, struct stat64 *, buf);
@@ -568,7 +568,7 @@
PRE_MEM_WRITE ("lstat64(buf)", ARG2, sizeof (struct vki_stat64));
}
-POST (sys_lstat64)
+POST(sys_lstat64)
{
vg_assert (SUCCESS);
if (RES == 0)
@@ -577,7 +577,7 @@
}
}
-PRE (sys_stat64)
+PRE(sys_stat64)
{
PRINT ("sys_stat64 ( %#lx(%s), %#lx )", ARG1, (HChar *) ARG1, ARG2);
PRE_REG_READ2 (long, "stat64", char *, file_name, struct stat64 *, buf);
@@ -585,12 +585,12 @@
PRE_MEM_WRITE ("stat64(buf)", ARG2, sizeof (struct vki_stat64));
}
-POST (sys_stat64)
+POST(sys_stat64)
{
POST_MEM_WRITE (ARG2, sizeof (struct vki_stat64));
}
-PRE (sys_fstatat64)
+PRE(sys_fstatat64)
{
// ARG4 = int flags; Flags are or'ed together, therefore writing them
// as a hex constant is more meaningful.
@@ -602,24 +602,24 @@
PRE_MEM_WRITE ("fstatat64(buf)", ARG3, sizeof (struct vki_stat64));
}
-POST (sys_fstatat64)
+POST(sys_fstatat64)
{
POST_MEM_WRITE (ARG3, sizeof (struct vki_stat64));
}
-PRE (sys_fstat64)
+PRE(sys_fstat64)
{
PRINT ("sys_fstat64 ( %lu, %#lx )", SARG1, ARG2);
PRE_REG_READ2 (long, "fstat64", unsigned long, fd, struct stat64 *, buf);
PRE_MEM_WRITE ("fstat64(buf)", ARG2, sizeof (struct vki_stat64));
}
-POST (sys_fstat64)
+POST(sys_fstat64)
{
POST_MEM_WRITE (ARG2, sizeof (struct vki_stat64));
}
-PRE (sys_clone)
+PRE(sys_clone)
{
Bool badarg = False;
UInt cloneflags;
@@ -709,7 +709,7 @@
}
}
-PRE (sys_sigreturn)
+PRE(sys_sigreturn)
{
PRINT ("sys_sigreturn ( )");
vg_assert (VG_ (is_valid_tid) (tid));
@@ -724,7 +724,7 @@
*flags |= SfPollAfter;
}
-PRE (sys_rt_sigreturn)
+PRE(sys_rt_sigreturn)
{
PRINT ("rt_sigreturn ( )");
vg_assert (VG_ (is_valid_tid) (tid));
@@ -740,7 +740,7 @@
*flags |= SfPollAfter;
}
-PRE (sys_set_thread_area)
+PRE(sys_set_thread_area)
{
PRINT ("set_thread_area (%lx)", ARG1);
PRE_REG_READ1(long, "set_thread_area", unsigned long, addr);
@@ -748,7 +748,7 @@
}
/* Very much MIPS specific */
-PRE (sys_cacheflush)
+PRE(sys_cacheflush)
{
PRINT ("cacheflush (%lx, %ld, %ld)", ARG1, SARG2, SARG3);
PRE_REG_READ3(long, "cacheflush", unsigned long, addr,
@@ -785,7 +785,7 @@
}
}
-PRE (sys_prctl)
+PRE(sys_prctl)
{
switch (ARG1) {
case VKI_PR_SET_FP_MODE:
@@ -831,6 +831,11 @@
}
}
+POST(sys_prctl)
+{
+ WRAPPER_POST_NAME(linux, sys_prctl)(tid, arrghs, status);
+}
+
#undef PRE
#undef POST
@@ -1038,7 +1043,7 @@
//..
LINX_ (__NR_setresgid, sys_setresgid), // 190
LINXY (__NR_getresgid, sys_getresgid), // 191
- PLAX_ (__NR_prctl, sys_prctl), // 192
+ PLAXY (__NR_prctl, sys_prctl), // 192
PLAX_ (__NR_rt_sigreturn, sys_rt_sigreturn), // 193
LINXY (__NR_rt_sigaction, sys_rt_sigaction), // 194
LINXY (__NR_rt_sigprocmask, sys_rt_sigprocmask), // 195
Modified: trunk/coregrind/m_syswrap/syswrap-mips64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-mips64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-mips64-linux.c Tue Nov 1 18:28:26 2016
@@ -464,7 +464,7 @@
}
}
-PRE (sys_mmap)
+PRE(sys_mmap)
{
SysRes r;
PRINT("sys_mmap ( %#lx, %lu, %ld, %ld, %ld, %lu )",
@@ -616,7 +616,7 @@
}
}
-PRE (sys_prctl)
+PRE(sys_prctl)
{
switch (ARG1) {
case VKI_PR_SET_FP_MODE:
@@ -662,6 +662,11 @@
}
}
+POST(sys_prctl)
+{
+ WRAPPER_POST_NAME(linux, sys_prctl)(tid, arrghs, status);
+}
+
#undef PRE
#undef POST
@@ -833,7 +838,7 @@
LINX_ (__NR_vhangup, sys_vhangup),
LINX_ (__NR_pivot_root,sys_pivot_root),
LINXY (__NR__sysctl, sys_sysctl),
- PLAX_ (__NR_prctl, sys_prctl),
+ PLAXY (__NR_prctl, sys_prctl),
LINXY (__NR_adjtimex, sys_adjtimex),
GENX_ (__NR_setrlimit, sys_setrlimit),
GENX_ (__NR_chroot, sys_chroot),
|