vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
changeset 272 e9ffa471eeb3
parent 262 8d3354485fc3
child 274 cea6d2f4f728
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go	Sat Feb 04 13:35:58 2023 +0100
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go	Sat Feb 18 04:11:30 2023 +0000
@@ -56,8 +56,13 @@
 
 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
-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
 }