diff options
author | Stanislav Brabec <sbrabec@suse.cz> | 2012-12-07 21:30:51 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2012-12-08 00:17:59 +0000 |
commit | eff5c0e60c35d852a97a26cd8c6be50fed75a1a0 (patch) | |
tree | c84415e13027979c3807d958527c094f77f95e24 /ipc.c | |
parent | eb54c4772581a143e2757a2be9718377058cc703 (diff) | |
download | strace-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]); |