Skip to content

Commit a408501

Browse files
committed
unix: fix missing use of use function in Getfsstat and Getwd
Updates golang/go#13372. Change-Id: I623de97eb19880356148cbcb7d17759df82684aa Reviewed-on: https://go-review.googlesource.com/24751 Run-TryBot: Mikio Hara <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 62bee03 commit a408501

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

unix/syscall_darwin.go

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
144144
uintptr(options),
145145
0,
146146
)
147+
use(unsafe.Pointer(_p0))
147148
if e1 != 0 {
148149
return nil, e1
149150
}
@@ -196,6 +197,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
196197
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
197198
}
198199
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
200+
use(unsafe.Pointer(_p0))
199201
n = int(r0)
200202
if e1 != 0 {
201203
err = e1

unix/syscall_dragonfly.go

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
109109
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
110110
}
111111
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
112+
use(unsafe.Pointer(_p0))
112113
n = int(r0)
113114
if e1 != 0 {
114115
err = e1

unix/syscall_freebsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
129129
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
130130
}
131131
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
132+
use(unsafe.Pointer(_p0))
132133
n = int(r0)
133134
if e1 != 0 {
134135
err = e1

unix/syscall_openbsd.go

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
111111
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
112112
}
113113
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
114+
use(unsafe.Pointer(_p0))
114115
n = int(r0)
115116
if e1 != 0 {
116117
err = e1

0 commit comments

Comments
 (0)