|
From: <sv...@va...> - 2010-03-08 14:45:35
|
Author: sewardj
Date: 2010-03-08 14:45:26 +0000 (Mon, 08 Mar 2010)
New Revision: 11083
Log:
Fix the definedness handling of the last argument of sys_socketpair.
The last argument is really a pointer to an array of two ints and so
we need to say it is an int* and not an int [2]. This just happens to
work on amd64-linux because sizeof(int [2]) == 8 == sizeof(int*). On
arm-linux it duly craps out w/ an assertion because sizeof(int [2]) !=
sizeof(UWord).
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-arm-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2010-03-08 07:55:23 UTC (rev 11082)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2010-03-08 14:45:26 UTC (rev 11083)
@@ -814,7 +814,7 @@
{
PRINT("sys_socketpair ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "socketpair",
- int, d, int, type, int, protocol, int [2], sv);
+ int, d, int, type, int, protocol, int*, sv);
ML_(generic_PRE_sys_socketpair)(tid, ARG1,ARG2,ARG3,ARG4);
}
POST(sys_socketpair)
Modified: trunk/coregrind/m_syswrap/syswrap-arm-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm-linux.c 2010-03-08 07:55:23 UTC (rev 11082)
+++ trunk/coregrind/m_syswrap/syswrap-arm-linux.c 2010-03-08 14:45:26 UTC (rev 11083)
@@ -922,7 +922,7 @@
{
PRINT("sys_socketpair ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
PRE_REG_READ4(long, "socketpair",
- int, d, int, type, int, protocol, int [2], sv);
+ int, d, int, type, int, protocol, int*, sv);
ML_(generic_PRE_sys_socketpair)(tid, ARG1,ARG2,ARG3,ARG4);
}
POST(sys_socketpair)
|