[PATCH] tests/ipc_sem: don't match address of sem buffer
Dmitry V. Levin
ldv at altlinux.org
Thu Mar 12 12:15:58 UTC 2015
On Thu, Mar 12, 2015 at 11:13:49AM +0100, Andreas Schwab wrote:
> "Dmitry V. Levin" <ldv-u2l5PoMzF/Vg9hUCZPvPmw at public.gmane.org> writes:
> > On Wed, Mar 11, 2015 at 01:07:15PM +0100, Andreas Schwab wrote:
> >> On architectures where the semctl call is implemented by the ipc syscall
> >> the glibc wrapper passes a pointer to a local variable, so the value of
> >> the fourth argument is unknown.
> >
> > Wouldn't it be better to fix the parser, e.g.
> >
> > --- a/ipc.c
> > +++ b/ipc.c
> > @@ -281,7 +281,16 @@ int sys_semctl(struct tcb *tcp)
> > if (entering(tcp)) {
> > tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
> > PRINTCTL(semctl_flags, tcp->u_arg[2], "SEM_???");
> > - tprintf(", %#lx", tcp->u_arg[3]);
> > + tprints(", ");
> > + if (indirect_ipccall(tcp)) {
> > + if (current_wordsize == sizeof(int)) {
> > + printnum_int(tcp, tcp->u_arg[3], "%#x");
> > + } else {
> > + printnum_long(tcp, tcp->u_arg[3], "%#lx");
> > + }
>
> That prints [...] instead of just the number, though.
Yes, of course it does.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150312/c16a60af/attachment.bin>
More information about the Strace-devel
mailing list