Sent on 2010-9-10 17:26, Roland McGrath wrote:
>> I quite agree with the above change.
> 
> Does that mean you tested it?
> 

Very sorry for my last reply, actually there are indeed some
problems here. For syscall who has no arguments such as vfork
accessing tcp->u_arg here may result an undetermined value.

What we want to change only occur in clone syscall, so I think
we may add one more check here, just like the patch below.

What do you think?

Thanks,
Wang Chao

======

diff --git a/process.c b/process.c
index 8af960a..d587379 100644
--- a/process.c
+++ b/process.c
@@ -796,8 +796,12 @@ int
 internal_fork(struct tcb *tcp)
 {
        if (entering(tcp)) {
+               tcp->flags &= ~TCB_FOLLOWFORK;
                if (!followfork)
                        return 0;
+               if ((known_scno(tcp) == SYS_clone) &&
+                   (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED))
+                       return 0;
                fork_tcb(tcp);
                if (setbpt(tcp) < 0)
                        return 0;




------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to