Bump helm.sh/helm/v3 from 3.10.3 to 3.11.1 (#5528)

This commit is contained in:
hongming
2023-02-16 11:56:23 +08:00
committed by GitHub
parent b143b41e3c
commit 785a994a5c
345 changed files with 26548 additions and 7334 deletions

View File

@@ -6,3 +6,6 @@
_obj
_test
testdata
/.idea
*.iml
/notes.txt

View File

@@ -1,12 +1,14 @@
mmap-go
=======
![Build Status](https://github.com/edsrzf/mmap-go/actions/workflows/build-test.yml/badge.svg)
[![Go Reference](https://pkg.go.dev/badge/github.com/edsrzf/mmap-go.svg)](https://pkg.go.dev/github.com/edsrzf/mmap-go)
mmap-go is a portable mmap package for the [Go programming language](http://golang.org).
It has been tested on Linux (386, amd64), OS X, and Windows (386). It should also
work on other Unix-like platforms, but hasn't been tested with them. I'm interested
to hear about the results.
I haven't been able to add more features without adding significant complexity,
so mmap-go doesn't support mprotect, mincore, and maybe a few other things.
If you're running on a Unix-like platform and need some of these features,
I suggest Gustavo Niemeyer's [gommap](http://labix.org/gommap).
Operating System Support
========================
This package is tested using GitHub Actions on Linux, macOS, and Windows. It should also work on other Unix-like platforms, but hasn't been tested with them. I'm interested to hear about the results.
I haven't been able to add more features without adding significant complexity, so mmap-go doesn't support `mprotect`, `mincore`, and maybe a few other things. If you're running on a Unix-like platform and need some of these features, I suggest Gustavo Niemeyer's [gommap](http://labix.org/gommap).
This package compiles on Plan 9, but its functions always return errors.

27
vendor/github.com/edsrzf/mmap-go/mmap_plan9.go generated vendored Normal file
View File

@@ -0,0 +1,27 @@
// Copyright 2020 Evan Shaw. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mmap
import "syscall"
func mmap(len int, inprot, inflags, fd uintptr, off int64) ([]byte, error) {
return nil, syscall.EPLAN9
}
func (m MMap) flush() error {
return syscall.EPLAN9
}
func (m MMap) lock() error {
return syscall.EPLAN9
}
func (m MMap) unlock() error {
return syscall.EPLAN9
}
func (m MMap) unmap() error {
return syscall.EPLAN9
}

View File

@@ -22,8 +22,9 @@ import (
// We keep this map so that we can get back the original handle from the memory address.
type addrinfo struct {
file windows.Handle
mapview windows.Handle
file windows.Handle
mapview windows.Handle
writable bool
}
var handleLock sync.Mutex
@@ -32,13 +33,16 @@ var handleMap = map[uintptr]*addrinfo{}
func mmap(len int, prot, flags, hfile uintptr, off int64) ([]byte, error) {
flProtect := uint32(windows.PAGE_READONLY)
dwDesiredAccess := uint32(windows.FILE_MAP_READ)
writable := false
switch {
case prot&COPY != 0:
flProtect = windows.PAGE_WRITECOPY
dwDesiredAccess = windows.FILE_MAP_COPY
writable = true
case prot&RDWR != 0:
flProtect = windows.PAGE_READWRITE
dwDesiredAccess = windows.FILE_MAP_WRITE
writable = true
}
if prot&EXEC != 0 {
flProtect <<= 4
@@ -63,12 +67,14 @@ func mmap(len int, prot, flags, hfile uintptr, off int64) ([]byte, error) {
fileOffsetLow := uint32(off & 0xFFFFFFFF)
addr, errno := windows.MapViewOfFile(h, dwDesiredAccess, fileOffsetHigh, fileOffsetLow, uintptr(len))
if addr == 0 {
windows.CloseHandle(windows.Handle(h))
return nil, os.NewSyscallError("MapViewOfFile", errno)
}
handleLock.Lock()
handleMap[addr] = &addrinfo{
file: windows.Handle(hfile),
mapview: h,
file: windows.Handle(hfile),
mapview: h,
writable: writable,
}
handleLock.Unlock()
@@ -96,8 +102,13 @@ func (m MMap) flush() error {
return errors.New("unknown base address")
}
errno = windows.FlushFileBuffers(handle.file)
return os.NewSyscallError("FlushFileBuffers", errno)
if handle.writable && handle.file != windows.Handle(^uintptr(0)) {
if err := windows.FlushFileBuffers(handle.file); err != nil {
return os.NewSyscallError("FlushFileBuffers", err)
}
}
return nil
}
func (m MMap) lock() error {