]> granicus.if.org Git - strace/commitdiff
x86_64: fix x32 personality support in getllval
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 26 Nov 2015 18:25:34 +0000 (18:25 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 26 Nov 2015 18:25:34 +0000 (18:25 +0000)
x86 is the only personality supported on x86_64
that has 32-bit syscall arguments.

* util.c (getllval) [X86_64]: Fix current_personality == 2 case.

util.c

diff --git a/util.c b/util.c
index 68e825932c5bcc9a35196b75412498553a5a0410..b63de9bb1c4a84aa6b6dc6f0111bdc17fc13eb43 100644 (file)
--- a/util.c
+++ b/util.c
@@ -237,7 +237,11 @@ getllval(struct tcb *tcp, unsigned long long *val, int arg_no)
 {
 #if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG
 # if SUPPORTED_PERSONALITIES > 1
+#  ifdef X86_64
+       if (current_personality != 1) {
+#  else
        if (current_wordsize > 4) {
+#  endif
 # endif
                *val = tcp->u_arg[arg_no];
                arg_no++;