summaryrefslogtreecommitdiff
path: root/ipc.c
diff options
context:
space:
mode:
authorStanislav Brabec <sbrabec@suse.cz>2012-12-07 21:30:51 +0100
committerDmitry V. Levin <ldv@altlinux.org>2012-12-08 00:17:59 +0000
commiteff5c0e60c35d852a97a26cd8c6be50fed75a1a0 (patch)
treec84415e13027979c3807d958527c094f77f95e24 /ipc.c
parenteb54c4772581a143e2757a2be9718377058cc703 (diff)
downloadstrace-eff5c0e60c35d852a97a26cd8c6be50fed75a1a0.tar.gz
strace-eff5c0e60c35d852a97a26cd8c6be50fed75a1a0.tar.bz2
strace-eff5c0e60c35d852a97a26cd8c6be50fed75a1a0.tar.xz
sys_semtimedop: fix timeval argument index in wrapped call
Looking at the implementation of wrapped semtimedop() call inside glibc and kernel, I started to believe that timeval should be located in tcp->u_arg[4] and not tcp->u_arg[5]. Fortunately, tcp->u_arg[5] now works correctly as well, due to side effects of decode_ipc_subcall(). declaration in header: int semtimedop(semid, *sops, nsops, *timeout); 0 1 2 3 sys_ipc arguments in glibc on all patforms except s390*: semid, (int) nsops, 0, CHECK_N (sops, nsops), timeout 0 1 2 3 4 We have to use indexes: 0 3 1 4 sys_ipc arguments on s390*: semid, (int) nsops, timeout, sops 0 1 2 3 We have to use indexes: 0 3 1 2 * ipc.c (sys_semtimedop) [!S390]: Fix timeval argument index in indirect_ipccall case.
Diffstat (limited to 'ipc.c')
-rw-r--r--ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc.c b/ipc.c
index 0bde1cf..859ee28 100644
--- a/ipc.c
+++ b/ipc.c
@@ -330,7 +330,7 @@ int sys_semtimedop(struct tcb *tcp)
#if defined(S390)
printtv(tcp, tcp->u_arg[2]);
#else
- printtv(tcp, tcp->u_arg[5]);
+ printtv(tcp, tcp->u_arg[4]);
#endif
} else {
tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]);