@ttsc/linux-arm 0.13.1 → 0.14.0-dev.20260528.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/go/VERSION +2 -2
- package/bin/go/bin/go +0 -0
- package/bin/go/bin/gofmt +0 -0
- package/bin/go/pkg/tool/linux_arm/asm +0 -0
- package/bin/go/pkg/tool/linux_arm/cgo +0 -0
- package/bin/go/pkg/tool/linux_arm/compile +0 -0
- package/bin/go/pkg/tool/linux_arm/cover +0 -0
- package/bin/go/pkg/tool/linux_arm/fix +0 -0
- package/bin/go/pkg/tool/linux_arm/link +0 -0
- package/bin/go/pkg/tool/linux_arm/preprofile +0 -0
- package/bin/go/pkg/tool/linux_arm/vet +0 -0
- package/bin/go/src/archive/tar/format.go +0 -6
- package/bin/go/src/archive/tar/reader.go +4 -24
- package/bin/go/src/builtin/builtin.go +4 -13
- package/bin/go/src/crypto/fips140/fips140.go +0 -6
- package/bin/go/src/crypto/internal/fips140/drbg/rand.go +75 -1
- package/bin/go/src/crypto/tls/conn.go +3 -7
- package/bin/go/src/crypto/tls/handshake_client_tls13.go +2 -2
- package/bin/go/src/crypto/tls/handshake_server_tls13.go +2 -2
- package/bin/go/src/crypto/tls/key_schedule.go +3 -24
- package/bin/go/src/crypto/x509/constraints.go +33 -33
- package/bin/go/src/crypto/x509/verify.go +13 -28
- package/bin/go/src/go/types/builtins.go +2 -2
- package/bin/go/src/go/types/signature.go +0 -3
- package/bin/go/src/go/types/under.go +3 -3
- package/bin/go/src/go.mod +1 -1
- package/bin/go/src/go.sum +2 -2
- package/bin/go/src/html/template/attr_string.go +2 -3
- package/bin/go/src/html/template/context.go +1 -21
- package/bin/go/src/html/template/element_string.go +2 -3
- package/bin/go/src/html/template/escape.go +2 -16
- package/bin/go/src/html/template/js.go +0 -1
- package/bin/go/src/html/template/state_string.go +3 -5
- package/bin/go/src/html/template/transition.go +6 -43
- package/bin/go/src/internal/buildcfg/zbootstrap.go +1 -1
- package/bin/go/src/internal/godebugs/table.go +0 -1
- package/bin/go/src/internal/poll/fd_windows.go +38 -64
- package/bin/go/src/internal/poll/sendfile_windows.go +1 -3
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_386.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_amd64.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_arm.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_arm64.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_loong64.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_mips64x.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_mipsx.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_ppc64x.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_riscv64.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_s390x.go +0 -1
- package/bin/go/src/internal/runtime/syscall/linux/syscall_linux.go +0 -14
- package/bin/go/src/internal/syscall/unix/at.go +17 -0
- package/bin/go/src/internal/syscall/unix/at_sysnum_linux.go +1 -2
- package/bin/go/src/internal/syscall/windows/at_windows.go +3 -20
- package/bin/go/src/internal/syscall/windows/registry/key.go +2 -10
- package/bin/go/src/internal/syscall/windows/registry/value.go +1 -5
- package/bin/go/src/internal/syscall/windows/syscall_windows.go +0 -4
- package/bin/go/src/internal/syscall/windows/types_windows.go +0 -82
- package/bin/go/src/internal/syscall/windows/zsyscall_windows.go +0 -27
- package/bin/go/src/net/cgo_unix.go +1 -4
- package/bin/go/src/net/http/doc.go +1 -0
- package/bin/go/src/net/http/h2_bundle.go +3 -3
- package/bin/go/src/net/http/httputil/reverseproxy.go +0 -14
- package/bin/go/src/net/lookup_windows.go +3 -16
- package/bin/go/src/net/mail/message.go +9 -20
- package/bin/go/src/net/sendfile.go +0 -2
- package/bin/go/src/net/sendfile_stub.go +0 -2
- package/bin/go/src/net/sendfile_windows.go +0 -3
- package/bin/go/src/net/url/url.go +16 -22
- package/bin/go/src/os/dir_darwin.go +2 -2
- package/bin/go/src/os/dir_unix.go +2 -2
- package/bin/go/src/os/file.go +3 -0
- package/bin/go/src/os/file_unix.go +5 -9
- package/bin/go/src/os/removeall_at.go +2 -6
- package/bin/go/src/os/removeall_unix.go +8 -0
- package/bin/go/src/os/removeall_windows.go +4 -0
- package/bin/go/src/os/root_unix.go +0 -1
- package/bin/go/src/os/stat.go +0 -3
- package/bin/go/src/reflect/value.go +2 -3
- package/bin/go/src/runtime/defs_linux_386.go +3 -4
- package/bin/go/src/runtime/defs_linux_arm.go +3 -4
- package/bin/go/src/runtime/defs_linux_mips64x.go +1 -1
- package/bin/go/src/runtime/defs_linux_mipsx.go +4 -5
- package/bin/go/src/runtime/malloc.go +53 -1
- package/bin/go/src/runtime/mem.go +9 -104
- package/bin/go/src/runtime/metrics/doc.go +0 -5
- package/bin/go/src/runtime/os_linux.go +0 -62
- package/bin/go/src/runtime/os_linux32.go +24 -14
- package/bin/go/src/runtime/os_linux64.go +0 -2
- package/bin/go/src/runtime/print.go +4 -16
- package/bin/go/src/runtime/race/README +9 -9
- package/bin/go/src/runtime/race/internal/amd64v1/race_darwin.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_freebsd.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_linux.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_windows.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v3/race_linux.syso +0 -0
- package/bin/go/src/runtime/race/race_darwin_arm64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_arm64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_loong64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_s390x.syso +0 -0
- package/bin/go/src/syscall/syscall_windows.go +1 -5
- package/bin/go/src/vendor/modules.txt +1 -1
- package/bin/ttsc +0 -0
- package/bin/ttscserver +0 -0
- package/package.json +2 -2
- package/bin/go/src/crypto/internal/fips140/drbg/entropy_fips140.go +0 -97
- package/bin/go/src/crypto/internal/fips140/drbg/entropy_wasm.go +0 -11
- package/bin/go/src/internal/poll/fstatat_unix.go +0 -22
- package/bin/go/src/internal/syscall/unix/fchmodat_linux.go +0 -51
- package/bin/go/src/internal/syscall/unix/fchmodat_other.go +0 -29
- package/bin/go/src/os/statat.go +0 -24
- package/bin/go/src/os/statat_other.go +0 -12
- package/bin/go/src/os/statat_unix.go +0 -20
- package/bin/go/src/runtime/race/internal/amd64v1/race_darwin.patch +0 -63
- package/bin/go/src/runtime/race/internal/amd64v1/race_freebsd.patch +0 -63
- package/bin/go/src/runtime/race/internal/amd64v1/race_linux.patch +0 -63
- package/bin/go/src/runtime/race/internal/amd64v1/race_windows.patch +0 -63
- package/bin/go/src/runtime/race/internal/amd64v3/race_linux.patch +0 -63
- package/bin/go/src/runtime/race/race_darwin_arm64.patch +0 -63
- package/bin/go/src/runtime/race/race_linux_arm64.patch +0 -63
- package/bin/go/src/runtime/race/race_linux_loong64.patch +0 -63
- package/bin/go/src/runtime/race/race_linux_s390x.patch +0 -63
|
@@ -93,14 +93,10 @@ func removeAllFrom(parentFd sysfdType, base string) error {
|
|
|
93
93
|
if IsNotExist(err) {
|
|
94
94
|
return nil
|
|
95
95
|
}
|
|
96
|
-
if err == syscall.ENOTDIR {
|
|
97
|
-
// Not a directory; return the error from the
|
|
96
|
+
if err == syscall.ENOTDIR || isErrNoFollow(err) {
|
|
97
|
+
// Not a directory; return the error from the unix.Unlinkat.
|
|
98
98
|
return &PathError{Op: "unlinkat", Path: base, Err: uErr}
|
|
99
99
|
}
|
|
100
|
-
if _, ok := err.(errSymlink); ok {
|
|
101
|
-
// Not a user-visible error.
|
|
102
|
-
err = uErr
|
|
103
|
-
}
|
|
104
100
|
recurseErr = &PathError{Op: "openfdat", Path: base, Err: err}
|
|
105
101
|
break
|
|
106
102
|
}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
package os
|
|
8
8
|
|
|
9
|
+
import (
|
|
10
|
+
"internal/syscall/unix"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
func isErrNoFollow(err error) bool {
|
|
14
|
+
return err == unix.NoFollowErrno
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
func newDirFile(fd int, name string) (*File, error) {
|
|
10
18
|
// We use kindNoPoll because we know that this is a directory.
|
|
11
19
|
return newFile(fd, name, kindNoPoll, false), nil
|
|
@@ -104,7 +104,6 @@ func rootOpenFileNolog(root *Root, name string, flag int, perm FileMode) (*File,
|
|
|
104
104
|
return nil, &PathError{Op: "openat", Path: name, Err: err}
|
|
105
105
|
}
|
|
106
106
|
f := newFile(fd, joinPath(root.Name(), name), kindOpenFile, unix.HasNonblockFlag(flag))
|
|
107
|
-
f.inRoot = true
|
|
108
107
|
return f, nil
|
|
109
108
|
}
|
|
110
109
|
|
package/bin/go/src/os/stat.go
CHANGED
|
@@ -1288,10 +1288,9 @@ func (v Value) Field(i int) Value {
|
|
|
1288
1288
|
// bunch of zero-sized fields. We must return the zero-sized
|
|
1289
1289
|
// fields indirectly, as only ptr-shaped things can be direct.
|
|
1290
1290
|
// See issue 74935.
|
|
1291
|
-
// We use
|
|
1291
|
+
// We use nil instead of v.ptr as it doesn't matter and
|
|
1292
1292
|
// we can avoid pinning a possibly now-unused object.
|
|
1293
|
-
|
|
1294
|
-
return Value{typ, unsafe.Pointer(&zeroVal[0]), fl | flagIndir}
|
|
1293
|
+
return Value{typ, nil, fl | flagIndir}
|
|
1295
1294
|
}
|
|
1296
1295
|
|
|
1297
1296
|
// Either flagIndir is set and v.ptr points at struct,
|
|
@@ -152,14 +152,13 @@ func (ts *timespec32) setNsec(ns int64) {
|
|
|
152
152
|
|
|
153
153
|
type timespec struct {
|
|
154
154
|
tv_sec int64
|
|
155
|
-
tv_nsec
|
|
156
|
-
_ [4]byte // the C ABI aligns int64 to 8 bytes
|
|
155
|
+
tv_nsec int64
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
//go:nosplit
|
|
160
159
|
func (ts *timespec) setNsec(ns int64) {
|
|
161
|
-
ts.tv_sec = ns / 1e9
|
|
162
|
-
ts.tv_nsec =
|
|
160
|
+
ts.tv_sec = int64(ns / 1e9)
|
|
161
|
+
ts.tv_nsec = int64(ns % 1e9)
|
|
163
162
|
}
|
|
164
163
|
|
|
165
164
|
type timeval struct {
|
|
@@ -111,14 +111,13 @@ func (ts *timespec32) setNsec(ns int64) {
|
|
|
111
111
|
|
|
112
112
|
type timespec struct {
|
|
113
113
|
tv_sec int64
|
|
114
|
-
tv_nsec
|
|
115
|
-
_ [4]byte // the C ABI aligns int64 to 8 bytes
|
|
114
|
+
tv_nsec int64
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
//go:nosplit
|
|
119
118
|
func (ts *timespec) setNsec(ns int64) {
|
|
120
|
-
ts.tv_sec = ns / 1e9
|
|
121
|
-
ts.tv_nsec =
|
|
119
|
+
ts.tv_sec = int64(ns / 1e9)
|
|
120
|
+
ts.tv_nsec = int64(ns % 1e9)
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
type stackt struct {
|
|
@@ -12,7 +12,7 @@ const (
|
|
|
12
12
|
_EINTR = 0x4
|
|
13
13
|
_EAGAIN = 0xb
|
|
14
14
|
_ENOMEM = 0xc
|
|
15
|
-
_ENOSYS =
|
|
15
|
+
_ENOSYS = 0x26
|
|
16
16
|
|
|
17
17
|
_PROT_NONE = 0x0
|
|
18
18
|
_PROT_READ = 0x1
|
|
@@ -109,14 +109,13 @@ func (ts *timespec32) setNsec(ns int64) {
|
|
|
109
109
|
|
|
110
110
|
type timespec struct {
|
|
111
111
|
tv_sec int64
|
|
112
|
-
tv_nsec
|
|
113
|
-
_ [4]byte // the C ABI aligns int64 to 8 bytes
|
|
112
|
+
tv_nsec int64
|
|
114
113
|
}
|
|
115
114
|
|
|
116
115
|
//go:nosplit
|
|
117
116
|
func (ts *timespec) setNsec(ns int64) {
|
|
118
|
-
ts.tv_sec = ns / 1e9
|
|
119
|
-
ts.tv_nsec =
|
|
117
|
+
ts.tv_sec = int64(ns / 1e9)
|
|
118
|
+
ts.tv_nsec = int64(ns % 1e9)
|
|
120
119
|
}
|
|
121
120
|
|
|
122
121
|
type timeval struct {
|
|
@@ -788,7 +788,7 @@ func (h *mheap) sysAlloc(n uintptr, hintList **arenaHint, arenaList *[]arenaIdx)
|
|
|
788
788
|
// particular, this is already how Windows behaves, so
|
|
789
789
|
// it would simplify things there.
|
|
790
790
|
if v != nil {
|
|
791
|
-
|
|
791
|
+
sysFreeOS(v, n)
|
|
792
792
|
}
|
|
793
793
|
*hintList = hint.next
|
|
794
794
|
h.arenaHintAlloc.free(unsafe.Pointer(hint))
|
|
@@ -921,6 +921,58 @@ mapped:
|
|
|
921
921
|
return
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
+
// sysReserveAligned is like sysReserve, but the returned pointer is
|
|
925
|
+
// aligned to align bytes. It may reserve either n or n+align bytes,
|
|
926
|
+
// so it returns the size that was reserved.
|
|
927
|
+
func sysReserveAligned(v unsafe.Pointer, size, align uintptr, vmaName string) (unsafe.Pointer, uintptr) {
|
|
928
|
+
if isSbrkPlatform {
|
|
929
|
+
if v != nil {
|
|
930
|
+
throw("unexpected heap arena hint on sbrk platform")
|
|
931
|
+
}
|
|
932
|
+
return sysReserveAlignedSbrk(size, align)
|
|
933
|
+
}
|
|
934
|
+
// Since the alignment is rather large in uses of this
|
|
935
|
+
// function, we're not likely to get it by chance, so we ask
|
|
936
|
+
// for a larger region and remove the parts we don't need.
|
|
937
|
+
retries := 0
|
|
938
|
+
retry:
|
|
939
|
+
p := uintptr(sysReserve(v, size+align, vmaName))
|
|
940
|
+
switch {
|
|
941
|
+
case p == 0:
|
|
942
|
+
return nil, 0
|
|
943
|
+
case p&(align-1) == 0:
|
|
944
|
+
return unsafe.Pointer(p), size + align
|
|
945
|
+
case GOOS == "windows":
|
|
946
|
+
// On Windows we can't release pieces of a
|
|
947
|
+
// reservation, so we release the whole thing and
|
|
948
|
+
// re-reserve the aligned sub-region. This may race,
|
|
949
|
+
// so we may have to try again.
|
|
950
|
+
sysFreeOS(unsafe.Pointer(p), size+align)
|
|
951
|
+
p = alignUp(p, align)
|
|
952
|
+
p2 := sysReserve(unsafe.Pointer(p), size, vmaName)
|
|
953
|
+
if p != uintptr(p2) {
|
|
954
|
+
// Must have raced. Try again.
|
|
955
|
+
sysFreeOS(p2, size)
|
|
956
|
+
if retries++; retries == 100 {
|
|
957
|
+
throw("failed to allocate aligned heap memory; too many retries")
|
|
958
|
+
}
|
|
959
|
+
goto retry
|
|
960
|
+
}
|
|
961
|
+
// Success.
|
|
962
|
+
return p2, size
|
|
963
|
+
default:
|
|
964
|
+
// Trim off the unaligned parts.
|
|
965
|
+
pAligned := alignUp(p, align)
|
|
966
|
+
sysFreeOS(unsafe.Pointer(p), pAligned-p)
|
|
967
|
+
end := pAligned + size
|
|
968
|
+
endLen := (p + size + align) - end
|
|
969
|
+
if endLen > 0 {
|
|
970
|
+
sysFreeOS(unsafe.Pointer(end), endLen)
|
|
971
|
+
}
|
|
972
|
+
return unsafe.Pointer(pAligned), size
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
924
976
|
// enableMetadataHugePages enables huge pages for various sources of heap metadata.
|
|
925
977
|
//
|
|
926
978
|
// A note on latency: for sufficiently small heaps (<10s of GiB) this function will take constant
|
|
@@ -120,21 +120,14 @@ func sysHugePageCollapse(v unsafe.Pointer, n uintptr) {
|
|
|
120
120
|
//
|
|
121
121
|
// sysStat must be non-nil.
|
|
122
122
|
//
|
|
123
|
-
// The size and start address must exactly match the size and returned address
|
|
124
|
-
// from the original sysAlloc/sysReserve/sysReserveAligned call. That is,
|
|
125
|
-
// sysFree cannot be used to free a subset of a memory region.
|
|
126
|
-
//
|
|
127
123
|
// Don't split the stack as this function may be invoked without a valid G,
|
|
128
124
|
// which prevents us from allocating more stack.
|
|
129
125
|
//
|
|
130
126
|
//go:nosplit
|
|
131
127
|
func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) {
|
|
132
|
-
// When using ASAN leak detection, the memory being freed is
|
|
133
|
-
// the sanitizer. We need to unregister it so it's
|
|
134
|
-
//
|
|
135
|
-
// lsanunregisterrootregion matches regions by start address and size,
|
|
136
|
-
// so it is not possible to unregister a subset of the region. This is
|
|
137
|
-
// why sysFree requires the full region from the initial allocation.
|
|
128
|
+
// When using ASAN leak detection, the memory being freed is
|
|
129
|
+
// known by the sanitizer. We need to unregister it so it's
|
|
130
|
+
// not accessed by it.
|
|
138
131
|
if asanenabled {
|
|
139
132
|
lsanunregisterrootregion(v, n)
|
|
140
133
|
}
|
|
@@ -163,12 +156,13 @@ func sysFault(v unsafe.Pointer, n uintptr) {
|
|
|
163
156
|
// (either via permissions or not committing the memory). Such a reservation is
|
|
164
157
|
// thus never backed by physical memory.
|
|
165
158
|
//
|
|
166
|
-
// If the pointer passed to it is non-nil, the caller wants the
|
|
167
|
-
// there, but sysReserve can still choose another
|
|
168
|
-
// unavailable.
|
|
159
|
+
// If the pointer passed to it is non-nil, the caller wants the
|
|
160
|
+
// reservation there, but sysReserve can still choose another
|
|
161
|
+
// location if that one is unavailable.
|
|
169
162
|
//
|
|
170
|
-
// sysReserve returns OS-aligned memory
|
|
171
|
-
//
|
|
163
|
+
// NOTE: sysReserve returns OS-aligned memory, but the heap allocator
|
|
164
|
+
// may use larger alignment, so the caller must be careful to realign the
|
|
165
|
+
// memory obtained by sysReserve.
|
|
172
166
|
func sysReserve(v unsafe.Pointer, n uintptr, vmaName string) unsafe.Pointer {
|
|
173
167
|
p := sysReserveOS(v, n, vmaName)
|
|
174
168
|
|
|
@@ -181,95 +175,6 @@ func sysReserve(v unsafe.Pointer, n uintptr, vmaName string) unsafe.Pointer {
|
|
|
181
175
|
return p
|
|
182
176
|
}
|
|
183
177
|
|
|
184
|
-
// sysReserveAligned transitions a memory region from None to Reserved.
|
|
185
|
-
//
|
|
186
|
-
// Semantics are equivlent to sysReserve, but the returned pointer is aligned
|
|
187
|
-
// to align bytes. It may reserve either n or n+align bytes, so it returns the
|
|
188
|
-
// size that was reserved.
|
|
189
|
-
func sysReserveAligned(v unsafe.Pointer, size, align uintptr, vmaName string) (unsafe.Pointer, uintptr) {
|
|
190
|
-
if isSbrkPlatform {
|
|
191
|
-
if v != nil {
|
|
192
|
-
throw("unexpected heap arena hint on sbrk platform")
|
|
193
|
-
}
|
|
194
|
-
return sysReserveAlignedSbrk(size, align)
|
|
195
|
-
}
|
|
196
|
-
// Since the alignment is rather large in uses of this
|
|
197
|
-
// function, we're not likely to get it by chance, so we ask
|
|
198
|
-
// for a larger region and remove the parts we don't need.
|
|
199
|
-
retries := 0
|
|
200
|
-
retry:
|
|
201
|
-
p := uintptr(sysReserve(v, size+align, vmaName))
|
|
202
|
-
switch {
|
|
203
|
-
case p == 0:
|
|
204
|
-
return nil, 0
|
|
205
|
-
case p&(align-1) == 0:
|
|
206
|
-
return unsafe.Pointer(p), size + align
|
|
207
|
-
case GOOS == "windows":
|
|
208
|
-
// On Windows we can't release pieces of a
|
|
209
|
-
// reservation, so we release the whole thing and
|
|
210
|
-
// re-reserve the aligned sub-region. This may race,
|
|
211
|
-
// so we may have to try again.
|
|
212
|
-
sysUnreserve(unsafe.Pointer(p), size+align)
|
|
213
|
-
p = alignUp(p, align)
|
|
214
|
-
p2 := sysReserve(unsafe.Pointer(p), size, vmaName)
|
|
215
|
-
if p != uintptr(p2) {
|
|
216
|
-
// Must have raced. Try again.
|
|
217
|
-
sysUnreserve(p2, size)
|
|
218
|
-
if retries++; retries == 100 {
|
|
219
|
-
throw("failed to allocate aligned heap memory; too many retries")
|
|
220
|
-
}
|
|
221
|
-
goto retry
|
|
222
|
-
}
|
|
223
|
-
// Success.
|
|
224
|
-
return p2, size
|
|
225
|
-
default:
|
|
226
|
-
// Trim off the unaligned parts.
|
|
227
|
-
pAligned := alignUp(p, align)
|
|
228
|
-
end := pAligned + size
|
|
229
|
-
endLen := (p + size + align) - end
|
|
230
|
-
|
|
231
|
-
// sysUnreserve does not allow unreserving a subset of the
|
|
232
|
-
// region because LSAN does not allow unregistering a subset.
|
|
233
|
-
// So we can't call sysUnreserve. Instead we simply unregister
|
|
234
|
-
// the entire region from LSAN and re-register with the smaller
|
|
235
|
-
// region before freeing the unecessary portions, which does
|
|
236
|
-
// allow subsets of the region.
|
|
237
|
-
if asanenabled {
|
|
238
|
-
lsanunregisterrootregion(unsafe.Pointer(p), size+align)
|
|
239
|
-
lsanregisterrootregion(unsafe.Pointer(pAligned), size)
|
|
240
|
-
}
|
|
241
|
-
sysFreeOS(unsafe.Pointer(p), pAligned-p)
|
|
242
|
-
if endLen > 0 {
|
|
243
|
-
sysFreeOS(unsafe.Pointer(end), endLen)
|
|
244
|
-
}
|
|
245
|
-
return unsafe.Pointer(pAligned), size
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// sysUnreserve transitions a memory region from Reserved to None.
|
|
250
|
-
//
|
|
251
|
-
// The size and start address must exactly match the size and returned address
|
|
252
|
-
// from sysReserve/sysReserveAligned. That is, sysUnreserve cannot be used to
|
|
253
|
-
// unreserve a subset of a memory region.
|
|
254
|
-
//
|
|
255
|
-
// Don't split the stack as this function may be invoked without a valid G,
|
|
256
|
-
// which prevents us from allocating more stack.
|
|
257
|
-
//
|
|
258
|
-
//go:nosplit
|
|
259
|
-
func sysUnreserve(v unsafe.Pointer, n uintptr) {
|
|
260
|
-
// When using ASAN leak detection, the memory being freed is known by
|
|
261
|
-
// the sanitizer. We need to unregister it so it's not accessed by it.
|
|
262
|
-
//
|
|
263
|
-
// lsanunregisterrootregion matches regions by start address and size,
|
|
264
|
-
// so it is not possible to unregister a subset of the region. This is
|
|
265
|
-
// why sysUnreserve requires the full region from sysReserve.
|
|
266
|
-
if asanenabled {
|
|
267
|
-
lsanunregisterrootregion(v, n)
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
sysFreeOS(v, n)
|
|
271
|
-
}
|
|
272
|
-
|
|
273
178
|
// sysMap transitions a memory region from Reserved to Prepared. It ensures the
|
|
274
179
|
// memory region can be efficiently transitioned to Ready.
|
|
275
180
|
//
|
|
@@ -306,11 +306,6 @@ Below is the full list of supported metrics, ordered lexicographically.
|
|
|
306
306
|
The number of non-default behaviors executed by the go/types
|
|
307
307
|
package due to a non-default GODEBUG=gotypesalias=... setting.
|
|
308
308
|
|
|
309
|
-
/godebug/non-default-behavior/htmlmetacontenturlescape:events
|
|
310
|
-
The number of non-default behaviors executed by
|
|
311
|
-
the html/template package due to a non-default
|
|
312
|
-
GODEBUG=htmlmetacontenturlescape=... setting.
|
|
313
|
-
|
|
314
309
|
/godebug/non-default-behavior/http2client:events
|
|
315
310
|
The number of non-default behaviors executed by the net/http
|
|
316
311
|
package due to a non-default GODEBUG=http2client=... setting.
|
|
@@ -354,7 +354,6 @@ func osinit() {
|
|
|
354
354
|
numCPUStartup = getCPUCount()
|
|
355
355
|
physHugePageSize = getHugePageSize()
|
|
356
356
|
vgetrandomInit()
|
|
357
|
-
configure64bitsTimeOn32BitsArchitectures()
|
|
358
357
|
}
|
|
359
358
|
|
|
360
359
|
var urandom_dev = []byte("/dev/urandom\x00")
|
|
@@ -936,64 +935,3 @@ func mprotect(addr unsafe.Pointer, n uintptr, prot int32) (ret int32, errno int3
|
|
|
936
935
|
r, _, err := linux.Syscall6(linux.SYS_MPROTECT, uintptr(addr), n, uintptr(prot), 0, 0, 0)
|
|
937
936
|
return int32(r), int32(err)
|
|
938
937
|
}
|
|
939
|
-
|
|
940
|
-
type kernelVersion struct {
|
|
941
|
-
major int
|
|
942
|
-
minor int
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
// getKernelVersion returns major and minor kernel version numbers
|
|
946
|
-
// parsed from the uname release field.
|
|
947
|
-
func getKernelVersion() kernelVersion {
|
|
948
|
-
var buf linux.Utsname
|
|
949
|
-
if e := linux.Uname(&buf); e != 0 {
|
|
950
|
-
throw("uname failed")
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
rel := gostringnocopy(&buf.Release[0])
|
|
954
|
-
major, minor, _, ok := parseRelease(rel)
|
|
955
|
-
if !ok {
|
|
956
|
-
throw("failed to parse kernel version from uname")
|
|
957
|
-
}
|
|
958
|
-
return kernelVersion{major: major, minor: minor}
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
// parseRelease parses a dot-separated version number. It follows the
|
|
962
|
-
// semver syntax, but allows the minor and patch versions to be
|
|
963
|
-
// elided.
|
|
964
|
-
func parseRelease(rel string) (major, minor, patch int, ok bool) {
|
|
965
|
-
// Strip anything after a dash or plus.
|
|
966
|
-
for i := 0; i < len(rel); i++ {
|
|
967
|
-
if rel[i] == '-' || rel[i] == '+' {
|
|
968
|
-
rel = rel[:i]
|
|
969
|
-
break
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
next := func() (int, bool) {
|
|
974
|
-
for i := 0; i < len(rel); i++ {
|
|
975
|
-
if rel[i] == '.' {
|
|
976
|
-
ver, err := strconv.Atoi(rel[:i])
|
|
977
|
-
rel = rel[i+1:]
|
|
978
|
-
return ver, err == nil
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
ver, err := strconv.Atoi(rel)
|
|
982
|
-
rel = ""
|
|
983
|
-
return ver, err == nil
|
|
984
|
-
}
|
|
985
|
-
if major, ok = next(); !ok || rel == "" {
|
|
986
|
-
return
|
|
987
|
-
}
|
|
988
|
-
if minor, ok = next(); !ok || rel == "" {
|
|
989
|
-
return
|
|
990
|
-
}
|
|
991
|
-
patch, ok = next()
|
|
992
|
-
return
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// GE checks if the running kernel version
|
|
996
|
-
// is greater than or equal to the provided version.
|
|
997
|
-
func (kv kernelVersion) GE(x, y int) bool {
|
|
998
|
-
return kv.major > x || (kv.major == x && kv.minor >= y)
|
|
999
|
-
}
|
|
@@ -7,31 +7,33 @@
|
|
|
7
7
|
package runtime
|
|
8
8
|
|
|
9
9
|
import (
|
|
10
|
+
"internal/runtime/atomic"
|
|
10
11
|
"unsafe"
|
|
11
12
|
)
|
|
12
13
|
|
|
13
|
-
func configure64bitsTimeOn32BitsArchitectures() {
|
|
14
|
-
use64bitsTimeOn32bits = getKernelVersion().GE(5, 1)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
14
|
//go:noescape
|
|
18
15
|
func futex_time32(addr unsafe.Pointer, op int32, val uint32, ts *timespec32, addr2 unsafe.Pointer, val3 uint32) int32
|
|
19
16
|
|
|
20
17
|
//go:noescape
|
|
21
18
|
func futex_time64(addr unsafe.Pointer, op int32, val uint32, ts *timespec, addr2 unsafe.Pointer, val3 uint32) int32
|
|
22
19
|
|
|
23
|
-
var
|
|
20
|
+
var isFutexTime32bitOnly atomic.Bool
|
|
24
21
|
|
|
25
22
|
//go:nosplit
|
|
26
23
|
func futex(addr unsafe.Pointer, op int32, val uint32, ts *timespec, addr2 unsafe.Pointer, val3 uint32) int32 {
|
|
27
|
-
if
|
|
28
|
-
|
|
24
|
+
if !isFutexTime32bitOnly.Load() {
|
|
25
|
+
ret := futex_time64(addr, op, val, ts, addr2, val3)
|
|
26
|
+
// futex_time64 is only supported on Linux 5.0+
|
|
27
|
+
if ret != -_ENOSYS {
|
|
28
|
+
return ret
|
|
29
|
+
}
|
|
30
|
+
isFutexTime32bitOnly.Store(true)
|
|
29
31
|
}
|
|
30
32
|
// Downgrade ts.
|
|
31
33
|
var ts32 timespec32
|
|
32
34
|
var pts32 *timespec32
|
|
33
35
|
if ts != nil {
|
|
34
|
-
ts32.setNsec(ts.tv_sec*1e9 +
|
|
36
|
+
ts32.setNsec(ts.tv_sec*1e9 + ts.tv_nsec)
|
|
35
37
|
pts32 = &ts32
|
|
36
38
|
}
|
|
37
39
|
return futex_time32(addr, op, val, pts32, addr2, val3)
|
|
@@ -43,26 +45,34 @@ func timer_settime32(timerid int32, flags int32, new, old *itimerspec32) int32
|
|
|
43
45
|
//go:noescape
|
|
44
46
|
func timer_settime64(timerid int32, flags int32, new, old *itimerspec) int32
|
|
45
47
|
|
|
48
|
+
var isSetTime32bitOnly atomic.Bool
|
|
49
|
+
|
|
46
50
|
//go:nosplit
|
|
47
51
|
func timer_settime(timerid int32, flags int32, new, old *itimerspec) int32 {
|
|
48
|
-
if
|
|
49
|
-
|
|
52
|
+
if !isSetTime32bitOnly.Load() {
|
|
53
|
+
ret := timer_settime64(timerid, flags, new, old)
|
|
54
|
+
// timer_settime64 is only supported on Linux 5.0+
|
|
55
|
+
if ret != -_ENOSYS {
|
|
56
|
+
return ret
|
|
57
|
+
}
|
|
58
|
+
isSetTime32bitOnly.Store(true)
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
var newts, oldts itimerspec32
|
|
53
62
|
var new32, old32 *itimerspec32
|
|
54
63
|
|
|
55
64
|
if new != nil {
|
|
56
|
-
newts.it_interval.setNsec(new.it_interval.tv_sec*1e9 +
|
|
57
|
-
newts.it_value.setNsec(new.it_value.tv_sec*1e9 +
|
|
65
|
+
newts.it_interval.setNsec(new.it_interval.tv_sec*1e9 + new.it_interval.tv_nsec)
|
|
66
|
+
newts.it_value.setNsec(new.it_value.tv_sec*1e9 + new.it_value.tv_nsec)
|
|
58
67
|
new32 = &newts
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
if old != nil {
|
|
62
|
-
oldts.it_interval.setNsec(old.it_interval.tv_sec*1e9 +
|
|
63
|
-
oldts.it_value.setNsec(old.it_value.tv_sec*1e9 +
|
|
71
|
+
oldts.it_interval.setNsec(old.it_interval.tv_sec*1e9 + old.it_interval.tv_nsec)
|
|
72
|
+
oldts.it_value.setNsec(old.it_value.tv_sec*1e9 + old.it_value.tv_nsec)
|
|
64
73
|
old32 = &oldts
|
|
65
74
|
}
|
|
66
75
|
|
|
76
|
+
// Fall back to 32-bit timer
|
|
67
77
|
return timer_settime32(timerid, flags, new32, old32)
|
|
68
78
|
}
|
|
@@ -122,35 +122,23 @@ func printbool(v bool) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
// float64 requires 1+17+1+1+1+3 = 24 bytes max (sign+digits+decimal point+e+sign+exponent digits).
|
|
126
|
-
const float64Bytes = 24
|
|
127
|
-
|
|
128
125
|
func printfloat64(v float64) {
|
|
129
|
-
var buf [
|
|
126
|
+
var buf [20]byte
|
|
130
127
|
gwrite(strconv.AppendFloat(buf[:0], v, 'g', -1, 64))
|
|
131
128
|
}
|
|
132
129
|
|
|
133
|
-
// float32 requires 1+9+1+1+1+2 = 15 bytes max (sign+digits+decimal point+e+sign+exponent digits).
|
|
134
|
-
const float32Bytes = 15
|
|
135
|
-
|
|
136
130
|
func printfloat32(v float32) {
|
|
137
|
-
var buf [
|
|
131
|
+
var buf [20]byte
|
|
138
132
|
gwrite(strconv.AppendFloat(buf[:0], float64(v), 'g', -1, 32))
|
|
139
133
|
}
|
|
140
134
|
|
|
141
|
-
// complex128 requires 24+24+1+1+1 = 51 bytes max (paren+float64+float64+i+paren).
|
|
142
|
-
const complex128Bytes = 2*float64Bytes + 3
|
|
143
|
-
|
|
144
135
|
func printcomplex128(c complex128) {
|
|
145
|
-
var buf [
|
|
136
|
+
var buf [44]byte
|
|
146
137
|
gwrite(strconv.AppendComplex(buf[:0], c, 'g', -1, 128))
|
|
147
138
|
}
|
|
148
139
|
|
|
149
|
-
// complex64 requires 15+15+1+1+1 = 33 bytes max (paren+float32+float32+i+paren).
|
|
150
|
-
const complex64Bytes = 2*float32Bytes + 3
|
|
151
|
-
|
|
152
140
|
func printcomplex64(c complex64) {
|
|
153
|
-
var buf [
|
|
141
|
+
var buf [44]byte
|
|
154
142
|
gwrite(strconv.AppendComplex(buf[:0], complex128(c), 'g', -1, 64))
|
|
155
143
|
}
|
|
156
144
|
|
|
@@ -4,16 +4,16 @@ the LLVM project (https://github.com/llvm/llvm-project/tree/main/compiler-rt).
|
|
|
4
4
|
|
|
5
5
|
To update the .syso files use golang.org/x/build/cmd/racebuild.
|
|
6
6
|
|
|
7
|
-
internal/amd64v1/race_darwin.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
8
|
-
internal/amd64v1/race_freebsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
9
|
-
internal/amd64v1/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
7
|
+
internal/amd64v1/race_darwin.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
8
|
+
internal/amd64v1/race_freebsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
9
|
+
internal/amd64v1/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
10
10
|
internal/amd64v1/race_netbsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
11
11
|
internal/amd64v1/race_openbsd.syso built with LLVM fcf6ae2f070eba73074b6ec8d8281e54d29dbeeb and Go 8f2db14cd35bbd674cb2988a508306de6655e425.
|
|
12
|
-
internal/amd64v1/race_windows.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
13
|
-
internal/amd64v3/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
14
|
-
race_darwin_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
15
|
-
race_linux_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
16
|
-
race_linux_loong64.syso built with LLVM 83fe85115da9dc25fa270d2ea8140113c8d49670
|
|
12
|
+
internal/amd64v1/race_windows.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
13
|
+
internal/amd64v3/race_linux.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
14
|
+
race_darwin_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
15
|
+
race_linux_arm64.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
16
|
+
race_linux_loong64.syso built with LLVM 83fe85115da9dc25fa270d2ea8140113c8d49670 and Go 037112464b4439571b45536de9ebe4bc9e10ecb7.
|
|
17
17
|
race_linux_ppc64le.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
18
18
|
race_linux_riscv64.syso built with LLVM c3c24be13f7928460ca1e2fe613a1146c868854e and Go a21249436b6e1fd47356361d53dc053bbc074f90.
|
|
19
|
-
race_linux_s390x.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04
|
|
19
|
+
race_linux_s390x.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1375,11 +1375,7 @@ func LoadCreateSymbolicLink() error {
|
|
|
1375
1375
|
|
|
1376
1376
|
// Readlink returns the destination of the named symbolic link.
|
|
1377
1377
|
func Readlink(path string, buf []byte) (n int, err error) {
|
|
1378
|
-
|
|
1379
|
-
if err != nil {
|
|
1380
|
-
return -1, err
|
|
1381
|
-
}
|
|
1382
|
-
fd, err := CreateFile(pathp, GENERIC_READ, 0, nil, OPEN_EXISTING,
|
|
1378
|
+
fd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0, nil, OPEN_EXISTING,
|
|
1383
1379
|
FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0)
|
|
1384
1380
|
if err != nil {
|
|
1385
1381
|
return -1, err
|
|
@@ -6,7 +6,7 @@ golang.org/x/crypto/cryptobyte
|
|
|
6
6
|
golang.org/x/crypto/cryptobyte/asn1
|
|
7
7
|
golang.org/x/crypto/internal/alias
|
|
8
8
|
golang.org/x/crypto/internal/poly1305
|
|
9
|
-
# golang.org/x/net v0.47.1-0.
|
|
9
|
+
# golang.org/x/net v0.47.1-0.20251128220604-7c360367ab7e
|
|
10
10
|
## explicit; go 1.24.0
|
|
11
11
|
golang.org/x/net/dns/dnsmessage
|
|
12
12
|
golang.org/x/net/http/httpguts
|
package/bin/ttsc
CHANGED
|
Binary file
|
package/bin/ttscserver
CHANGED
|
Binary file
|