diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index d839962e..bea511fc 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -1999,7 +1999,7 @@ func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { // offs2lohi splits offs into its low and high order bits. func offs2lohi(offs int64) (lo, hi uintptr) { const longBits = SizeofLong * 8 - return uintptr(offs), uintptr(uint64(offs) >> longBits) + return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet } func Readv(fd int, iovs [][]byte) (n int, err error) {