|
From: <sv...@va...> - 2005-10-04 12:04:13
|
Author: tom
Date: 2005-10-04 13:04:06 +0100 (Tue, 04 Oct 2005)
New Revision: 4852
Log:
Get the SHM_RDONLY test the right way round. Fixes bug #113796.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/include/vki-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-generic.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_syswrap/syswrap-generic.c 2005-10-04 11:44:11 UTC (=
rev 4851)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-10-04 12:04:06 UTC (=
rev 4852)
@@ -1588,7 +1588,7 @@
UInt prot =3D VKI_PROT_READ|VKI_PROT_WRITE;
Bool d;
=20
- if (!(arg2 & 010000)) /* =3D SHM_RDONLY */
+ if (arg2 & VKI_SHM_RDONLY)
prot &=3D ~VKI_PROT_WRITE;
/* It isn't exactly correct to pass 0 for the fd and offset
here. The kernel seems to think the corresponding section
Modified: trunk/include/vki-linux.h
=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/include/vki-linux.h 2005-10-04 11:44:11 UTC (rev 4851)
+++ trunk/include/vki-linux.h 2005-10-04 12:04:06 UTC (rev 4852)
@@ -1331,6 +1331,8 @@
void *shm_unused3; /* unused */
};
=20
+#define VKI_SHM_RDONLY 010000 /* read-only access */
+
#define VKI_SHM_STAT 13
#define VKI_SHM_INFO 14
=20
|