[Bug libc/12197] ptrace seems to clobber pid argument

drepper.fsp at gmail dot com sourceware-bugzilla@sourceware.org
Mon Nov 8 20:32:00 GMT 2010


http://sourceware.org/bugzilla/show_bug.cgi?id=12197

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2010-11-08 20:32:04 UTC ---
(In reply to comment #0)
> I have encountered some very weird behavior where calling ptrace with
> PTRACE_GETEVENTMSG causes the variable passed as the pid to be set to 0 after
> the call.

It completely depends on the way you compile your code because you added a
buffer overrun in your code.  The pointer passed to ptrace must be a long, not
an int.  Obviously you are damaging other variables.  Why wouldn't you first
make sure your code is correct before bothering others?  Debugging byproxy is
simpler, right?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list