]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix the definedness handling of the last argument of sys_socketpair.
authorJulian Seward <jseward@acm.org>
Mon, 8 Mar 2010 14:45:26 +0000 (14:45 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 8 Mar 2010 14:45:26 +0000 (14:45 +0000)
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

coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c

index a90b87c554ec7a03ee21e285a041a957ba4efb20..b5b57ded933c5244d37ca9e5317a8690a77150bf 100644 (file)
@@ -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)
index db81ac1ce01260d1f19d024883ea6ed92a401a4a..d700f312f228d44f62086ed3b50cfd5153b91bc1 100644 (file)
@@ -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)