vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
changeset 272 e9ffa471eeb3
parent 262 8d3354485fc3
child 274 cea6d2f4f728
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go	Sat Feb 04 13:35:58 2023 +0100
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go	Sat Feb 18 04:11:30 2023 +0000
@@ -60,8 +60,13 @@
 	return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
 }
 
-func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
-	ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
+func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {
+	ioDesc := PtraceIoDesc{
+		Op:   int32(req),
+		Offs: offs,
+		Addr: uintptr(unsafe.Pointer(&out[0])), // TODO(#58351): this is not safe.
+		Len:  uint32(countin),
+	}
 	err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
 	return int(ioDesc.Len), err
 }