Update dependencies and build to go1.22 (#2113)

* Update dependencies and build to go1.22

* Fix api changes wrt to dependencies

* Update golangci config
This commit is contained in:
Wim
2024-05-23 23:44:31 +02:00
committed by GitHub
parent 56e7bd01ca
commit 2f33fe86f5
1556 changed files with 3279522 additions and 1924375 deletions

22
vendor/modernc.org/libc/mem_brk.go generated vendored
View File

@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build libc.membrk && !libc.memgrind
// +build libc.membrk,!libc.memgrind
//go:build libc.membrk && !libc.memgrind && !(linux && (amd64 || loong64))
// +build libc.membrk
// +build !libc.memgrind
// +build !linux !amd64,!loong64
// This is a debug-only version of the memory handling functions. When a
// program is built with -tags=libc.membrk a simple but safe version of malloc
@@ -32,6 +34,9 @@ var (
// void *malloc(size_t size);
func Xmalloc(t *TLS, n types.Size_t) uintptr {
if __ccgo_strace {
trc("t=%v n=%v, (%v:)", t, n, origin(2))
}
if n == 0 {
return 0
}
@@ -54,11 +59,17 @@ func Xmalloc(t *TLS, n types.Size_t) uintptr {
// void *calloc(size_t nmemb, size_t size);
func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
if __ccgo_strace {
trc("t=%v size=%v, (%v:)", t, size, origin(2))
}
return Xmalloc(t, n*size)
}
// void *realloc(void *ptr, size_t size);
func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
if __ccgo_strace {
trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
}
switch {
case ptr != 0 && size != 0:
p := Xmalloc(t, size)
@@ -74,7 +85,12 @@ func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
}
// void free(void *ptr);
func Xfree(t *TLS, p uintptr) {}
func Xfree(t *TLS, p uintptr) {
if __ccgo_strace {
trc("t=%v p=%v, (%v:)", t, p, origin(2))
}
}
func UsableSize(p uintptr) types.Size_t {
return types.Size_t(*(*uintptr)(unsafe.Pointer(p - uintptrSize)))