]> granicus.if.org Git - strace/commitdiff
2005-07-05 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 5 Jul 2005 09:50:18 +0000 (09:50 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 5 Jul 2005 09:50:18 +0000 (09:50 +0000)
* mem.c [LINUX] (sys_old_mmap) [X86_64]: Extract 32-bit values if
child is 32-bit.
Fixes RH#162467.

mem.c

diff --git a/mem.c b/mem.c
index 636644eb81317eb163b860945b966fb3cf0cebaf..618212a35e223d937a4a38b7d4c093c2ef4d6fa7 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -245,6 +245,18 @@ struct tcb *tcp;
     for (i=0; i<6; i++)
         u_arg[i] = tcp->u_arg[i];
 #else
+# if defined(X86_64)
+    if (current_personality == 1) {
+           int i;
+           for (i = 0; i < 6; ++i) {
+                   unsigned int val;
+                   if (umove(tcp, tcp->u_arg[0] + i * 4, &val) == -1)
+                           return 0;
+                   u_arg[i] = val;
+           }
+    }
+    else
+# endif
     if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1)
            return 0;
 #endif // defined(IA64)