]> granicus.if.org Git - strace/commitdiff
trace_syscall_exiting: prepare personality check for u_rval type change
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Dec 2016 02:53:05 +0000 (05:53 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Dec 2016 10:08:53 +0000 (10:08 +0000)
* syscall.c (trace_syscall_exiting): Check for sizeof(tcp->u_rval)
instead of sizeof(long) when deciding how to print tcp->u_rval.

syscall.c

index 41c89432275ee34f6216d5a556e6535c9747abc2..105147b91d6437283977656a3735cafc90e01bdc 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -902,7 +902,7 @@ trace_syscall_exiting(struct tcb *tcp)
                        switch (sys_res & RVAL_MASK) {
                        case RVAL_HEX:
 #if SUPPORTED_PERSONALITIES > 1
-                               if (current_wordsize < sizeof(long))
+                               if (current_wordsize < sizeof(tcp->u_rval))
                                        tprintf("= %#x",
                                                (unsigned int) tcp->u_rval);
                                else
@@ -915,7 +915,7 @@ trace_syscall_exiting(struct tcb *tcp)
                                break;
                        case RVAL_UDECIMAL:
 #if SUPPORTED_PERSONALITIES > 1
-                               if (current_wordsize < sizeof(long))
+                               if (current_wordsize < sizeof(tcp->u_rval))
                                        tprintf("= %u",
                                                (unsigned int) tcp->u_rval);
                                else