Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/kern
Module Name: src
Committed By: kamil
Date: Tue Apr 30 20:50:30 UTC 2019
Modified Files:
src/sys/kern: sys_ptrace_common.c
Log Message:
Return EIO for empty memory transfer from ptrace(2)
Certain operations of PT_READ/PT_WRITE and PIOD_READ/PIOD_WRITE can result
in 0 byte transfer and the ptrace(2) call still returned success.
GDB had a special handling of this case for PT_IO checking piod_len != 0,
but in LLDB this corner case caused infinite loop and breakage. The LLDB
case has been enhanced.
Unfortunately the status of operation of PT_READ/PT_WRITE is not
distinguishable between successful operation and empty opeartion. This
renders this call into a questionable one.
Change the behavior and return error with EIO in scenarios of
truncated/empty byte transfers by PT_READ/PT_WRITE and empty byte transfers
from PT_IO.
No code changed is needed in GDB and LLDB.
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/kern/sys_ptrace_common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index