From 2ecd15c0d236916d2894c87c73aeeeb08978614f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 21 May 2020 09:53:49 -0400 Subject: Bump github.com/onsi/ginkgo from 1.12.0 to 1.12.2 Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.12.0 to 1.12.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.12.0...v1.12.2) Signed-off-by: dependabot-preview[bot] Signed-off-by: Daniel J Walsh --- vendor/golang.org/x/sys/unix/syscall_unix.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'vendor/golang.org/x/sys/unix/syscall_unix.go') diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 8f710d014..400ba9fbc 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -12,6 +12,8 @@ import ( "sync" "syscall" "unsafe" + + "golang.org/x/sys/internal/unsafeheader" ) var ( @@ -113,15 +115,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d return nil, errno } - // Slice memory layout - var sl = struct { - addr uintptr - len int - cap int - }{addr, length, length} - - // Use unsafe to turn sl into a []byte. - b := *(*[]byte)(unsafe.Pointer(&sl)) + // Use unsafe to convert addr into a []byte. + var b []byte + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b)) + hdr.Data = unsafe.Pointer(addr) + hdr.Cap = length + hdr.Len = length // Register mapping in m and return it. p := &b[cap(b)-1] -- cgit v1.2.3-54-g00ecf