CopyInString copies a NUL-terminated string of length at most maxlen in from the task's memory. The copy will fail with syscall.EFAULT if it traverses user memory that is unmapped or not readable by the user. Preconditions: The caller must be running on the task goroutine.
(addr hostarch.Addr, maxlen int)
| 48 | // |
| 49 | // Preconditions: The caller must be running on the task goroutine. |
| 50 | func (t *Task) CopyInString(addr hostarch.Addr, maxlen int) (string, error) { |
| 51 | return usermem.CopyStringIn(t, t.MemoryManager(), addr, maxlen, usermem.IOOpts{}) |
| 52 | } |
| 53 | |
| 54 | // CopyInVector copies a NULL-terminated vector of strings from the task's |
| 55 | // memory. The copy will fail with syscall.EFAULT if it traverses |
no test coverage detected