Skip to content

Commit 220d73c

Browse files
committed
[dev.simd] all: merge master (8dd5b13) into dev.simd
Merge List: + 2025-11-24 8dd5b13 cmd/compile: relax stmtline_test on amd64 + 2025-11-23 feae743 cmd/compile: use 32x32->64 multiplies on loong64 + 2025-11-23 e88be8a runtime: fix stale comment for mheap/malloc + 2025-11-23 a318843 cmd/internal/obj/loong64: optimize duplicate optab entries + 2025-11-23 a18294b cmd/internal/obj/arm64, image/gif, runtime, sort: use math/bits to calculate log2 + 2025-11-23 437323e slices: fix incorrect comment in slices.Insert function documentation + 2025-11-23 1993dca doc/next: pre-announce end of support for macOS 12 in Go 1.27 + 2025-11-22 337f7b1 cmd/go: update default go directive in mod or work init + 2025-11-21 3c26aef cmd/internal/obj/riscv: improve large branch/call/jump tests + 2025-11-21 31aa9f8 crypto/tls: use inner hello for earlyData when using QUIC and ECH + 2025-11-21 d68aec8 runtime: replace trace seqlock with write flag + 2025-11-21 8d9906c runtime/trace: add Log benchmark + 2025-11-21 6aeacdf cmd/go: support sha1 repos when git default is sha256 + 2025-11-21 9570036 crypto/sha3: make the zero value of SHAKE useable + 2025-11-21 155efbb crypto/sha3: make the zero value of SHA3 useable + 2025-11-21 6f16669 database/sql: don't ignore ColumnConverter for unknown input count + 2025-11-21 121bc3e runtime/pprof: remove hard-coded sleep in CPU profile reader + 2025-11-21 b604148 runtime: fix double wakeup in CPU profile buffer + 2025-11-21 22f24f9 cmd/compile: change testing.B.Loop keep alive semantic + 2025-11-21 cfb9d2e net: remove unused linknames + 2025-11-21 65ef314 net/http: remove unused linknames + 2025-11-21 0f32fbc net/http: populate Response.Request when using NewFileTransport + 2025-11-21 3e0a8e7 net/http: preserve original path encoding in redirects + 2025-11-21 831af61 net/http: use HTTP 307 redirects in ServeMux + 2025-11-21 8726922 net/http: update Response.Request.URL after redirects on GOOS=js + 2025-11-21 7aa9ca7 net/http/cookiejar: treat localhost as secure origin + 2025-11-21 f870a1d net/url: warn that JoinPath arguments should be escaped + 2025-11-21 9962d95 crypto/internal/fips140/mldsa: unroll NTT and inverseNTT + 2025-11-21 f821fc4 crypto/internal/fisp140test: update acvptool, test data + 2025-11-21 b59efc3 crypto/internal/fips140/mldsa: new package + 2025-11-21 6274148 runtime: remove linkname for gopanic + 2025-11-21 7db2f0b crypto/internal/hpke: separate KEM and PublicKey/PrivateKey interfaces + 2025-11-21 e15800c crypto/internal/hpke: add ML-KEM and hybrid KEMs, and SHAKE KDFs + 2025-11-21 7c985a2 crypto/internal/hpke: modularize API and support more ciphersuites + 2025-11-21 e7d47ac cmd/compile: simplify negative on multiplication + 2025-11-21 35d2712 net/http: fix typo in Transport docs + 2025-11-21 90c970c net: remove unnecessary loop variable copies in tests + 2025-11-21 9772d3a cmd/cgo: strip top-level const qualifier from argument frame struct + 2025-11-21 1903782 errors: add examples for custom Is/As matching + 2025-11-21 ec92bc6 cmd/compile: rewrite Rsh to RshU if arguments are proved positive + 2025-11-21 3820f94 cmd/compile: propagate unsigned relations for Rsh if arguments are positive + 2025-11-21 d474f1f cmd/compile: make dse track multiple shadowed ranges + 2025-11-21 d0d0a72 cmd/compile/internal/ssa: correct type of ARM64 conditional instructions + 2025-11-21 a9704f8 internal/runtime/gc/scan: add AVX512 impl of filterNil. + 2025-11-21 ccd3890 cmd/internal/objabi: remove -V=goexperiment internal special case + 2025-11-21 e7787b9 runtime: go fmt + 2025-11-21 17b3b98 internal/strconv: go fmt + 2025-11-21 c851827 internal/trace: go fmt + 2025-11-21 f87aaec cmd/compile: fix integer overflow in prove pass + 2025-11-21 dbd2ab9 cmd/compile/internal: fix typos + 2025-11-21 b9d86ba cmd/compile/internal/devirtualize: fix typos + 2025-11-20 4b0e3cc cmd/link: support loading R_LARCH_PCREL20_S2 and R_LARCH_CALL36 relocs + 2025-11-20 cdba82c cmd/internal/obj/loong64: add {,X}VSLT.{B/H/W/V}{,U} instructions support + 2025-11-20 bd2b117 crypto/tls: add QUICErrorEvent + 2025-11-20 3ad2e11 net/http/httputil: wrap ReverseProxy's outbound request body so Close is a noop + 2025-11-20 d58b733 runtime: track goroutine location until actual STW + 2025-11-20 1bc5486 cmd/vendor: update to x/tools@68724af + 2025-11-20 8c31959 runtime: disable stack allocation tests on sanitizers + 2025-11-20 ff654ea net/url: permit colons in the host of postgresql:// URLs + 2025-11-20 a662bad encoding/json: remove linknames + 2025-11-20 5afe237 mime: add missing path for mime types in godoc + 2025-11-20 c1b7112 os/signal: make NotifyContext cancel the context with a cause Change-Id: Ib93ef643be610dfbdd83ff45095a7b1ca2537b8b
2 parents 0c69e77 + 8dd5b13 commit 220d73c

File tree

161 files changed

+11124
-1333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+11124
-1333
lines changed

api/next/75108.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pkg crypto/tls, const QUICErrorEvent = 10 #75108
2+
pkg crypto/tls, const QUICErrorEvent QUICEventKind #75108
3+
pkg crypto/tls, type QUICEvent struct, Err error #75108
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The [QUICConn] type used by QUIC implementations includes new event
2+
for reporting TLS handshake errors.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[NotifyContext] now cancels the returned context with [context.CancelCauseFunc]
2+
and an error indicating which signal was received.

doc/next/7-ports.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
## Ports {#ports}
22

3+
### Darwin
4+
5+
<!-- go.dev/issue/75836 -->
6+
7+
Go 1.26 is the last release that will run on macOS 12 Monterey. Go 1.27 will require macOS 13 Ventura or later.
8+
39
### Windows
410

511
<!-- go.dev/issue/71671 -->
12+
613
As [announced](/doc/go1.25#windows) in the Go 1.25 release notes, the [broken](/doc/go1.24#windows) 32-bit windows/arm port (`GOOS=windows` `GOARCH=arm`) is removed.

src/cmd/asm/internal/asm/testdata/loong64enc1.s

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,42 @@ lable2:
597597
XVSEQV $15, X2, X4 // 44bc8176
598598
XVSEQV $-15, X2, X4 // 44c48176
599599

600+
// VSLTB{B,H,W,V}, XVSLTB{B,H,W,V} instruction
601+
VSLTB V1, V2, V3 // 43040670
602+
VSLTH V1, V2, V3 // 43840670
603+
VSLTW V1, V2, V3 // 43040770
604+
VSLTV V1, V2, V3 // 43840770
605+
XVSLTB X1, X2, X3 // 43040674
606+
XVSLTH X1, X2, X3 // 43840674
607+
XVSLTW X1, X2, X3 // 43040774
608+
XVSLTV X1, X2, X3 // 43840774
609+
VSLTB $1, V2, V3 // 43048672
610+
VSLTH $16, V2, V3 // 43c08672
611+
VSLTW $-16, V2, V3 // 43408772
612+
VSLTV $-15, V2, V3 // 43c48772
613+
XVSLTB $1, X2, X3 // 43048676
614+
XVSLTH $16, X2, X3 // 43c08676
615+
XVSLTW $-16, X2, X3 // 43408776
616+
XVSLTV $-16, X2, X3 // 43c08776
617+
618+
// VSLTB{B,H,W,V}U, XVSLTB{B,H,W,V}U instruction
619+
VSLTBU V1, V2, V3 // 43040870
620+
VSLTHU V1, V2, V3 // 43840870
621+
VSLTWU V1, V2, V3 // 43040970
622+
VSLTVU V1, V2, V3 // 43840970
623+
XVSLTBU X1, X2, X3 // 43040874
624+
XVSLTHU X1, X2, X3 // 43840874
625+
XVSLTWU X1, X2, X3 // 43040974
626+
XVSLTVU X1, X2, X3 // 43840974
627+
VSLTBU $0, V2, V3 // 43008872
628+
VSLTHU $31, V2, V3 // 43fc8872
629+
VSLTWU $16, V2, V3 // 43408972
630+
VSLTVU $1, V2, V3 // 43848972
631+
XVSLTBU $0, X2, X3 // 43008876
632+
XVSLTHU $31, X2, X3 // 43fc8876
633+
XVSLTWU $8, X2, X3 // 43208976
634+
XVSLTVU $0, X2, X3 // 43808976
635+
600636
// VPCNT{B,H,W,V}, XVPCNT{B,H,W,V} instruction
601637
VPCNTB V1, V2 // 22209c72
602638
VPCNTH V1, V2 // 22249c72

src/cmd/cgo/internal/test/test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,12 @@ typedef struct {
953953
} issue69086struct;
954954
static int issue690861(issue69086struct* p) { p->b = 1234; return p->c; }
955955
static int issue690862(unsigned long ul1, unsigned long ul2, unsigned int u, issue69086struct s) { return (int)(s.b); }
956+
957+
char issue75751v = 1;
958+
char * const issue75751p = &issue75751v;
959+
#define issue75751m issue75751p
960+
char * const volatile issue75751p2 = &issue75751v;
961+
#define issue75751m2 issue75751p2
956962
*/
957963
import "C"
958964

@@ -2396,3 +2402,8 @@ func test69086(t *testing.T) {
23962402
t.Errorf("call: got %d, want 1234", got)
23972403
}
23982404
}
2405+
2406+
// Issue 75751: no runtime test, just make sure it compiles.
2407+
func test75751() int {
2408+
return int(*C.issue75751m) + int(*C.issue75751m2)
2409+
}

src/cmd/cgo/out.go

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,36 @@ func checkImportSymName(s string) {
457457
// Also assumes that gc convention is to word-align the
458458
// input and output parameters.
459459
func (p *Package) structType(n *Name) (string, int64) {
460+
// It's possible for us to see a type with a top-level const here,
461+
// which will give us an unusable struct type. See #75751.
462+
// The top-level const will always appear as a final qualifier,
463+
// constructed by typeConv.loadType in the dwarf.QualType case.
464+
// The top-level const is meaningless here and can simply be removed.
465+
stripConst := func(s string) string {
466+
i := strings.LastIndex(s, "const")
467+
if i == -1 {
468+
return s
469+
}
470+
471+
// A top-level const can only be followed by other qualifiers.
472+
if r, ok := strings.CutSuffix(s, "const"); ok {
473+
return strings.TrimSpace(r)
474+
}
475+
476+
var nonConst []string
477+
for _, f := range strings.Fields(s[i:]) {
478+
switch f {
479+
case "const":
480+
case "restrict", "volatile":
481+
nonConst = append(nonConst, f)
482+
default:
483+
return s
484+
}
485+
}
486+
487+
return strings.TrimSpace(s[:i]) + " " + strings.Join(nonConst, " ")
488+
}
489+
460490
var buf strings.Builder
461491
fmt.Fprint(&buf, "struct {\n")
462492
off := int64(0)
@@ -468,7 +498,7 @@ func (p *Package) structType(n *Name) (string, int64) {
468498
}
469499
c := t.Typedef
470500
if c == "" {
471-
c = t.C.String()
501+
c = stripConst(t.C.String())
472502
}
473503
fmt.Fprintf(&buf, "\t\t%s p%d;\n", c, i)
474504
off += t.Size
@@ -484,7 +514,7 @@ func (p *Package) structType(n *Name) (string, int64) {
484514
fmt.Fprintf(&buf, "\t\tchar __pad%d[%d];\n", off, pad)
485515
off += pad
486516
}
487-
fmt.Fprintf(&buf, "\t\t%s r;\n", t.C)
517+
fmt.Fprintf(&buf, "\t\t%s r;\n", stripConst(t.C.String()))
488518
off += t.Size
489519
}
490520
if off%p.PtrSize != 0 {

0 commit comments

Comments
 (0)