ptrace() bug

From: Juan Cespedes (cespedes@debian.org)
Date: Sun Feb 17 2002 - 09:56:15 EST


Hi,

I am the author of "ltrace" and unfortunatelly it does not work in 2.4
kernels, due to a bug in the kernel. Unfortunately, I don't know when
did this behaviour started and what could have caused it...

Summary: if I use ptrace() witth a process that does fork(), and after
the fork I modify with PTRACE_POKETEXT some of the code in the parent,
the same modification is observed in the child.

I need to modify the .text in order to introduce breakpoints, but with
this bug ltrace does not work with any process which forks.

The attached little program shows the bug: the child should not see the
content of "sync" modified after it is alive.

Thanks for your help,

-- 
    .+'''+.         .+'''+.         .+'''+.         .+'''+.         .+''
 Juan Cespedes     /       \       /       \      cespedes@debian.org
.+'         `+...+'         `+...+'         `+...+'         `+...+'


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:13 EST