diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2024-03-19 11:23:59 +0100 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-03-19 16:19:26 +0000 |
commit | 8f7df2256e271c8d8d170791c6cd90ba9cc69f5e (patch) | |
tree | b6ace96364468fddf473bdb6714254e9c9fdd94b /src/syscall | |
parent | a73af5d91c4c335fb44ae99517d4c41d5f3960e0 (diff) | |
download | go-8f7df2256e271c8d8d170791c6cd90ba9cc69f5e.tar.gz go-8f7df2256e271c8d8d170791c6cd90ba9cc69f5e.zip |
internal/asan: match runtime.asan{read,write} len parameter type
The len parameter runtime.asan{read,write} is of type uintptr. Match its
type in Read and Write.
For #64611
Change-Id: I0be278c38a357e600521ced87c0e23038a11e8a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/572755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/syscall')
-rw-r--r-- | src/syscall/syscall_unix.go | 8 | ||||
-rw-r--r-- | src/syscall/syscall_windows.go | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/syscall/syscall_unix.go b/src/syscall/syscall_unix.go index 79aac51c8f..ecd5952975 100644 --- a/src/syscall/syscall_unix.go +++ b/src/syscall/syscall_unix.go @@ -193,7 +193,7 @@ func Read(fd int, p []byte) (n int, err error) { msan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } if asan.Enabled && n > 0 { - asan.Write(unsafe.Pointer(&p[0]), n) + asan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } return } @@ -217,7 +217,7 @@ func Write(fd int, p []byte) (n int, err error) { msan.Read(unsafe.Pointer(&p[0]), uintptr(n)) } if asan.Enabled && n > 0 { - asan.Read(unsafe.Pointer(&p[0]), n) + asan.Read(unsafe.Pointer(&p[0]), uintptr(n)) } return } @@ -236,7 +236,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) { msan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } if asan.Enabled && n > 0 { - asan.Write(unsafe.Pointer(&p[0]), n) + asan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } return } @@ -253,7 +253,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) { msan.Read(unsafe.Pointer(&p[0]), uintptr(n)) } if asan.Enabled && n > 0 { - asan.Read(unsafe.Pointer(&p[0]), n) + asan.Read(unsafe.Pointer(&p[0]), uintptr(n)) } return } diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go index 032f814304..59ce2b0206 100644 --- a/src/syscall/syscall_windows.go +++ b/src/syscall/syscall_windows.go @@ -452,7 +452,7 @@ func ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error { msan.Write(unsafe.Pointer(&p[0]), uintptr(*done)) } if asan.Enabled && *done > 0 { - asan.Write(unsafe.Pointer(&p[0]), int(*done)) + asan.Write(unsafe.Pointer(&p[0]), uintptr(*done)) } return err } @@ -469,7 +469,7 @@ func WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error msan.Read(unsafe.Pointer(&p[0]), uintptr(*done)) } if asan.Enabled && *done > 0 { - asan.Read(unsafe.Pointer(&p[0]), int(*done)) + asan.Read(unsafe.Pointer(&p[0]), uintptr(*done)) } return err } |