From: Julian Seward Date: Mon, 8 Mar 2010 14:45:26 +0000 (+0000) Subject: Fix the definedness handling of the last argument of sys_socketpair. X-Git-Tag: svn/VALGRIND_3_6_0~341 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=578d74d4fad163ff3597a3d8555ea01b20869293;p=thirdparty%2Fvalgrind.git 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). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11083 --- diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index a90b87c554..b5b57ded93 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -814,7 +814,7 @@ PRE(sys_socketpair) { 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) diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index db81ac1ce0..d700f312f2 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -922,7 +922,7 @@ PRE(sys_socketpair) { 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)