[PATCH] Fix decoding of timer_id for timer_create
Andi Kleen
andi at firstfloor.org
Fri Jun 10 20:06:15 UTC 2011
From: Andi Kleen <ak at linux.intel.com>
The kernel returns a integer, not a pointer for the timer id
in the memory pointed to by timer_id.
strace used a pointer, which added random junk on a 64bit system.
Fix it to be an integer.
---
time.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/time.c b/time.c
index 0c6deaf..ac366fb 100644
--- a/time.c
+++ b/time.c
@@ -838,12 +838,12 @@ struct tcb *tcp;
printsigevent(tcp, tcp->u_arg[1]);
tprintf(", ");
} else {
- void *p;
+ int p;
if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &p) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
- tprintf("{%p}", p);
+ tprintf("{%u}", p);
}
return 0;
}
--
1.7.4.4
More information about the Strace-devel
mailing list