|
From: <sv...@va...> - 2005-06-11 10:47:29
|
Author: sewardj
Date: 2005-06-11 11:47:27 +0100 (Sat, 11 Jun 2005)
New Revision: 3890
Log:
PRE(wrap_sys_shmat): don't change ARG2 if we're going to pre-fail the
syscall.
Modified:
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
Modified: trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-11 10:33:35=
UTC (rev 3889)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-06-11 10:47:27=
UTC (rev 3890)
@@ -972,12 +972,15 @@
=20
PRE(wrap_sys_shmat)
{
+ UWord arg2tmp;
PRINT("wrap_sys_shmat ( %d, %p, %d )",ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "shmat",
int, shmid, const void *, shmaddr, int, shmflg);
- ARG2 =3D VG_(generic_PRE_sys_shmat)(tid, ARG1,ARG2,ARG3);
- if (ARG2 =3D=3D 0)
+ arg2tmp =3D VG_(generic_PRE_sys_shmat)(tid, ARG1,ARG2,ARG3);
+ if (arg2tmp =3D=3D 0)
SET_STATUS_Failure( VKI_EINVAL );
+ else
+ ARG2 =3D arg2tmp;
}
POST(wrap_sys_shmat)
{
|