From: Dmitry V. Levin Date: Mon, 26 Dec 2016 02:53:05 +0000 (+0300) Subject: trace_syscall_exiting: prepare personality check for u_rval type change X-Git-Tag: v4.16~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cd050573c0b24b57cb046240559937a9cd7f7df;p=strace trace_syscall_exiting: prepare personality check for u_rval type change * syscall.c (trace_syscall_exiting): Check for sizeof(tcp->u_rval) instead of sizeof(long) when deciding how to print tcp->u_rval. --- diff --git a/syscall.c b/syscall.c index 41c89432..105147b9 100644 --- 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