aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
11 hours[DO-NOT-MERGE] all: changes remove name to "up"HEADmainShulhan
Change-Id: If44d06739ba9a9fc2f8b233e958ee5d1b38a525b
11 hours[DO-NOT-MERGE] all: add Makefile for common tasksShulhan
Change-Id: I2dffb77970d653cdc884bde4c2625293c53a913c
11 hoursinternal/cgrouptest: use t.Cleanup instead of defer in InCgroupV2Shulhan
Using defer may cause the TestCgroupGOMAXPROCS fail with the following error messages, --- FAIL: TestCgroupGOMAXPROCS (5.14s) crash_test.go:193: running /home/ms/src/go/bin/go build -o /tmp/go-build2154548206/testprog.exe crash_test.go:216: built testprog in 5.13507196s --- FAIL: TestCgroupGOMAXPROCS/containermaxprocs=0 (0.00s) cgroup_linux_test.go:60: /tmp/go-build2154548206/testprog.exe PrintGOMAXPROCS (1.191505ms): ok cgrouptest_linux.go:81: Error removing cgroup directory: remove /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/go-cgrouptest4138918176: device or resource busy Under the following environment, - Linux 6.19.9-arch1-1 #1 SMP PREEMPT_DYNAMIC - systemd 260 (260.1-1-arch) Change-Id: Ic36b0b98f0d589ea5730ea35097af04a22dc7469
11 hoursinternal/testenv: exclude GOMAXPROCS when building test programShulhan
In the environment where GOMAXPROCS set explicitly, for example to 3 in shell profile, the runtime tests will fail with the following error, ---- ok regexp/syntax 0.428s --- FAIL: TestCgroupGOMAXPROCS (0.81s) crash_test.go:186: running /home/ms/src/go/bin/go build -o /tmp/go-build1753772192/testprog.exe crash_test.go:208: built testprog in 796.664277ms --- FAIL: TestCgroupGOMAXPROCS/containermaxprocs=0 (0.00s) cgroup_linux_test.go:60: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (907.06µs): ok cgroup_linux_test.go:63: output got "3\n" want "4\n" --- FAIL: TestCgroupGOMAXPROCSNoLimit (0.00s) cgroup_linux_test.go:82: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (879.194µs): ok cgroup_linux_test.go:85: output got "3\n" want "4\n" --- FAIL: TestCgroupGOMAXPROCSHigherThanNumCPU (0.00s) cgroup_linux_test.go:102: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.396µs): ok cgroup_linux_test.go:105: output got "3\n" want "4\n" --- FAIL: TestCgroupGOMAXPROCSRound (0.01s) --- FAIL: TestCgroupGOMAXPROCSRound/50000 (0.00s) cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.099µs): ok cgroup_linux_test.go:159: output got "3\n" want "2\n" --- FAIL: TestCgroupGOMAXPROCSRound/100000 (0.00s) cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (894.001µs): ok cgroup_linux_test.go:159: output got "3\n" want "2\n" --- FAIL: TestCgroupGOMAXPROCSRound/150000 (0.00s) cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (850.897µs): ok cgroup_linux_test.go:159: output got "3\n" want "2\n" --- FAIL: TestCgroupGOMAXPROCSSchedAffinity (0.00s) cgroup_linux_test.go:229: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (867.987µs): ok cgroup_linux_test.go:232: output got "3\n" want "2\n" FAIL FAIL runtime 23.088s ---- This changes exclude the GOMAXPROCS when building program for testing so it does not affect the tests.
11 hoursall: set codereview remote name to upstreamShulhan
Change-Id: I474ea1ac91c7e994a1ec7c24ec1ef23bdc0a988f
11 hourstesting: print the counter if its greater than 1Shulhan
When test run with "-count=Y" and Y is greater that 1, print a line to indicated the current round of test as "### X/Y".
11 hoursencoding/json: realign struct encodeState, structFields, and fieldShulhan
This reduce the struct encodeState size from 56 to 16 bytes (-42), struct structFields size from 40 to 24 bytes (-16), and struct field size from 136 to 128 bytes (-8). Benchmark memory profiling before and after, File: json.test Type: alloc_space Time: Jan 25, 2024 at 4:51am (WIB) Showing nodes accounting for -4.01GB, 4.66% of 85.95GB total Dropped 64 nodes (cum <= 0.43GB) flat flat% sum% cum cum% -4.25GB 4.94% 4.94% -4.01GB 4.67% encoding/json.Marshal 0.19GB 0.22% 4.73% 0.24GB 0.28% encoding/json.mapEncoder.encode 0.05GB 0.057% 4.67% 0.05GB 0.057% reflect.copyVal 0.04GB 0.049% 4.62% 0.04GB 0.049% bytes.growSlice -0.04GB 0.045% 4.66% -0.04GB 0.045% encoding/json.RawMessage.MarshalJSON 0 0% 4.66% 0.04GB 0.046% bytes.(*Buffer).WriteString 0 0% 4.66% 0.04GB 0.049% bytes.(*Buffer).grow 0 0% 4.66% -0.04GB 0.045% encoding/json.(*Encoder).Encode 0 0% 4.66% 0.20GB 0.23% encoding/json.(*encodeState).marshal 0 0% 4.66% 0.20GB 0.23% encoding/json.(*encodeState).reflectValue
11 hoursencoding/json: realign struct UnmarshalTypeError and decodeStateShulhan
This reduce the UnmarshalTypeError size from 64 to 56 bytes (-8 bytes), and decodeState from 128 to 96 (-32 bytes).
11 hoursbufio: realign struct ScannerShulhan
This reduce the Scanner allocation size from 112 to 72 bytes.
11 hoursbufio: realign struct ReaderShulhan
This reduce the Reader allocation size from 72 to 40 bytes and Writer allocation size from 64 to 40 bytes.
11 hoursmime/quotedprintable: fix encoding where a period alone on a lineShulhan
Given the following example of message body, A line that precisely have length 75 with . + LF will cause DATA truncation.\n \n Footer.\n The quotedprintable Writer will encode the message into, A line ... truncation=\r\n .\r\n \r\n Footer.\r\n If we pass the Writer output into SMTP DATA command, the server read the "\r\n.\r\n" as the end of DATA which cause the message truncated on the receiver. This changes fix this issue by encode the period at the end with "=2E" based on recommendation in RFC 2049 Section 3, point (8) [1]. [1] https://www.rfc-editor.org/rfc/rfc2049.html#section-3 Fixes #61235 Change-Id: I350387b183ac6b25886f4084a060dcfcb48232a9
11 hoursencoding/json: optimize isValidNumber functionShulhan
Instead of re-slicing the string for checking the value, use single index variable. Benchmark result, name old time/op new time/op delta NumberIsValid-8 19.0ns ± 0% 14.5ns ± 1% -23.70% (p=0.008 n=5+5) name old alloc/op new alloc/op delta NumberIsValid-8 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta NumberIsValid-8 0.00 0.00 ~ (all equal) Change-Id: I4698c5db134998f83ff47fb3add6a04ba6ec3aa0
11 hoursall: prealloc slice with possible minimum capabilitiesShulhan
11 hoursgo/types: fix inNode debug assertion for "for range x {}"Rob Findley
For a RangeStmt with no range variables, s.TokPos is invalid (NoPos). The inNode debug assertion (start <= pos && pos < end) fails on the zero pos. The position is unused in that case (noNewVarPos is only read when isDef is true), but inNode still asserts. Use s.For as a fallback so the assertion holds. types2 is unaffected because syntax.ForStmt does not have this shape. Found while running go/types tests with debug=true. Change-Id: I82ebffca98bc9f41cda4364d31d0845bac97b5ae Reviewed-on: https://go-review.googlesource.com/c/go/+/766181 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
11 hoursos/exec: doc typoWeixie Cui
Change-Id: I623eee6738a8ebb1db2bc5693a9973c58878260c GitHub-Last-Rev: d7d918d4ede9d7a374a0a51f569c6890d74c8f91 GitHub-Pull-Request: golang/go#78609 Reviewed-on: https://go-review.googlesource.com/c/go/+/764364 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Sean Liao <sean@liao.dev>
11 hoursnet: cancel2 should not be shadowWeixie Cui
Fixes #78531 Change-Id: I7ccd84f9a3ced75c86b7540d84309e094717ffba GitHub-Last-Rev: 03a8ee1fd132a597e1a1e30add7cf7ba00ac114a GitHub-Pull-Request: golang/go#78532 Reviewed-on: https://go-review.googlesource.com/c/go/+/762780 Auto-Submit: Nicholas Husin <husin@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
11 hoursinternal/coverage: first write error never recordedWeixie Cui
Change-Id: Ie51246263ede8e069cd72a9646e0d485ec3d3806 GitHub-Last-Rev: 5a610d393a01e710db8db4639837b75816e06e04 GitHub-Pull-Request: golang/go#78610 Reviewed-on: https://go-review.googlesource.com/c/go/+/764483 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
11 hoursbytes,strings: add CutLastqiulaidongfeng
Fixes #71151 Change-Id: I3b3d49c35b0fa2c1220d3f39bbd506cc072b52b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/764601 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
23 hoursos/exec: use argv() to avoid panic inside of Cmd.String()Neal Patel
A surprisingly non-zero amount of direct uses Cmd make this panic possible. Change-Id: If86cabfb0f7c0250e2a5aa3fcaba367de5d10ca4 Reviewed-on: https://go-review.googlesource.com/c/go/+/765680 Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Neal Patel <nealpatel@google.com> TryBot-Bypass: Nicholas Husin <nsh@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Nicholas Husin <nsh@golang.org> Reviewed-by: Keith Randall <khr@google.com>
24 hoursnet/http: temporarily disable HTTP/3 testsNicholas S. Husin
Tests for HTTP/3 are unfortunately still flaky. The flakes seem to come mostly from two sources: 1. QUIC connections are not shutdown fast enough, causing them to be detected as goroutine leaks. 2. x/net/quic has a race condition where its output buffer are written to without locks (synchronously and intentionally, for optimization), but may be asynchronously written when the QUIC stream receives a STOP_SENDING frame. Therefore, skip http3Mode for now until the above flakes are fixed. For #70914 Fixes #78701 Change-Id: If0c857c0933b977fb10a4481124680726a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/766740 Reviewed-by: Nicholas Husin <husin@google.com> Auto-Submit: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
27 hourscmd/go: avoid redundant work in go work syncPierre Gimalac
First, updateWorkspaceRoots creates a new Requirements to update the direct map, but always with an empty graph cache, discarding the cached module graph. Since workspace roots do not change during package loading, the graph is identical each time; propagate the cached graph to the new Requirements to avoid rebuilding it from scratch on each call to Graph. Second, checkMultiplePaths iterates the full build list on every loadFromRoots call. Its result depends only on the build list and workspace replace directives, both fixed for the lifetime of the module graph. Updated the code to only run once per graph. Together these reduce go work sync time on a workspace with 184 modules from ~35s to ~8.5s. Fixes #77889 Change-Id: I7276aed3109424b3b74a4064b369ed7cbfca7735 Reviewed-on: https://go-review.googlesource.com/c/go/+/750500 Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Bypass: Michael Matloob <matloob@golang.org>
27 hoursgo/types, types2: fail interface inference against generic methodsRob Findley
When unifying an interface against a concrete type, interface inference looks up each interface method on the concrete type and unifies the signatures. If the concrete method is generic, the *Signature unify case (which ignores type parameter lists) would unify the method's own type parameter into the inference variable, leading to errors mentioning a leaked P and recording the wrong type in Info. A generic method never satisfies an interface method, so fail the unification at the lookup site instead. Change-Id: Id01eefcde492399cb94f4452f5627c4edbd22a1c Reviewed-on: https://go-review.googlesource.com/c/go/+/766160 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
29 hourscmd/asm, cmd/internal/obj/arm64: support memory with MUL VL imm offsetJunyang Shao
This CL is generated by CL 765440. This CL supports this addressing pattern: (VL*imm)(Reg) (-VL*imm)(Reg) Change-Id: I4d1bab2ef6c4141699a47b28aa14b28cdee6cb3f Reviewed-on: https://go-review.googlesource.com/c/go/+/765420 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Commit-Queue: Junyang Shao <shaojunyang@google.com>
29 hourscmd/asm, cmd/internal/obj/arm64: support memory with imm offset in SVEJunyang Shao
This CL is generated by CL 765100 This CL supports this addressing pattern: imm(reg.T) Change-Id: I16789e8e6cf03c4fa225c0fe1bd31dc23c9feb21 Reviewed-on: https://go-review.googlesource.com/c/go/+/765080 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
29 hourscmd/asm, cmd/internal/obj/arm64: support special operands in SVEJunyang Shao
This CL is generated by CL 764980. This CL supports these new special constants: <prfop>, which Go already support (prefetch modifier) <vl>, which include VLx2 and VLx4, which is the vector length specifier. Change-Id: I831f306a816493c08f3c22786e5360f2a37acf6c Reviewed-on: https://go-review.googlesource.com/c/go/+/765000 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
29 hourscmd/asm, cmd/internal/obj/arm64: support memory with extensions in SVEJunyang Shao
This CL is generated by CL 764800. Supported addressing patterns: (Z7.D.SXTW<<2)(Z6.D), where Z6.D is the base, Z7.D is the indices. SXTW/UXTW represents signed/unsigned extension, << represents LSL. Change-Id: Ifc6c47833d5113be7cfe96943d369ab977b3a6ee Reviewed-on: https://go-review.googlesource.com/c/go/+/764780 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Junyang Shao <shaojunyang@google.com>
29 hourscmd/asm, cmd/internal/obj/arm64: support SVE register listsJunyang Shao
This CL adds the register list support for SVE: [Z1.B, Z2.B] [P1.B, P2.B] [Z1.D] [Z1.D, Z2.D, Z3.D] [Z1.D, Z2.D, Z3.D, Z4.D] This CL is generated by CL 763780. Change-Id: I92210097a8a7525a5a53a2dce0b7652397275dd6 Reviewed-on: https://go-review.googlesource.com/c/go/+/763820 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
29 hourscmd/asm, cmd/internal/obj/arm64: add support for immediatesJunyang Shao
This CL supports various immediate operand patterns. ARM designs the immediate to carry significant semantics, this CL tries to address them as what GNU assembler do, and what the ARM ASL specifies. This CL is generated by CL 763781. Change-Id: I40e2b573f196a947c4f3e55c2be7b8d551471c84 Reviewed-on: https://go-review.googlesource.com/c/go/+/763769 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Commit-Queue: Junyang Shao <shaojunyang@google.com>
30 hoursnet/http: fix wrong context being used when shutting down HTTP/3 serverNicholas S. Husin
t.Context was accidentally used within a t.Cleanup. This is a mistake since t.Context will always have been cancelled by the time t.Cleanup runs. This is likely the reason for flakiness in some builders: our HTTP/3 finishes before QUIC connections can finish closing asynchronously, which are then detected as goroutine leaks. To account for this, also make the shutdown context timeout more generous. For #70914 Change-Id: I0e5f06a47ef25c5df535543fc1e602f16a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/766620 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Damien Neil <dneil@google.com>
31 hourscmd/compile: handle min integer step in loopCuong Manh Le
Since negating min int will overflows back to itself, causing a panic inside subWillUnderflow check. Fixes #78641 Change-Id: Ibbf2fa3228b9890a1a76ac6f4ff504b7e125b29f Reviewed-on: https://go-review.googlesource.com/c/go/+/766260 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@google.com>
32 hourscmd/compile: remove redundant codeWeixie Cui
Change-Id: If524465cc898a36a31f9034d5b2f13e8842357a9 GitHub-Last-Rev: bdf52219d7d38b94213529f3d399acca69fa5bae GitHub-Pull-Request: golang/go#78604 Reviewed-on: https://go-review.googlesource.com/c/go/+/764361 Reviewed-by: Mark Freeman <markfreeman@google.com> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Keith Randall <khr@google.com>
33 hoursruntime/pprof: using buffer writer instead of original writerWeixie Cui
Change-Id: Ibff8e7a08090d67d9a0625dee068c8d2eefbd190 GitHub-Last-Rev: b90b986121314615cf5d259d76a7be59303de1b0 GitHub-Pull-Request: golang/go#78630 Reviewed-on: https://go-review.googlesource.com/c/go/+/765480 Reviewed-by: Florian Lehner <lehner.florian86@gmail.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
33 hourscmd/trace: pcs overflow would panicWeixie Cui
Fixes #78538 Change-Id: I4bf9add8eab7785504a366331f9ec7c0fb1ca40e GitHub-Last-Rev: 8f3389dd5ac37ea5d7584036c90c353d2d64d7a5 GitHub-Pull-Request: golang/go#78539 Reviewed-on: https://go-review.googlesource.com/c/go/+/762960 Reviewed-by: Florian Lehner <lehner.florian86@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
35 hoursnet: dnsdata should be p not rWeixie Cui
Change-Id: I9091ea54b2f3d78827d380214147cd04b951c1cc GitHub-Last-Rev: 06dbeb9d24f7f53827de56a53b3ad4bce0d84453 GitHub-Pull-Request: golang/go#78606 Reviewed-on: https://go-review.googlesource.com/c/go/+/764362 Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Nicholas Husin <nsh@golang.org> Reviewed-by: Nicholas Husin <nsh@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
39 hourscmd/compile: add boolean absorption laws to SSA rewrite rulesTimo Friedl
The SSA generic rewrite rules implement DeMorgan's laws but are missing the closely related boolean absorption laws: x & (x | y) == x x | (x & y) == x These are fundamental boolean algebra identities (see https://en.wikipedia.org/wiki/Absorption_law) that hold for all bit patterns, all widths, signed and unsigned. Both GCC and LLVM recognize and optimize these patterns at -O2. Add two generic rules covering all four widths (8, 16, 32, 64). Commutativity of AND/OR is handled automatically by the rule engine, so all argument orderings are matched. The rules eliminate two redundant ALU instructions per occurrence and fire on real code (defer bit-manipulation patterns in runtime, testing, go/parser, and third-party packages). Fixes #78632 Change-Id: Ib59e839081302ad1635e823309d8aec768c25dcf GitHub-Last-Rev: 23f8296ece08c77fcaeeaf59c2c2d8ce23d1202c GitHub-Pull-Request: golang/go#78634 Reviewed-on: https://go-review.googlesource.com/c/go/+/765580 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
3 dayscmd/go: remove bzr supportMichael Matloob
Fixes #78090 Change-Id: Ib222ca91a8421f6de3934d46b68b03c56a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/764760 Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
3 dayscrypto/tls: fix ECH SNI encoded lengthNeal Patel
https://datatracker.ietf.org/doc/html/rfc9849#section-6.1.3 Change-Id: Ifccf7b92f69ddb9ae288991763111bd1f00e61de Reviewed-on: https://go-review.googlesource.com/c/go/+/765446 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
4 dayscmd/compile/internal/noder: revert to UIR V3Mark Freeman
Upgrading to V4 early doesn't seem to make much sense while we refine things. Any change to encoding would require another version gate and propagation; this gets tedious fast. Instead, let's keep on V3 and test locally with V4. We can commit skipped tests as we refine and then turn them all on *with* the bump up to V4. Change-Id: I571715e5da75095612f68b224c82e6d22ad3ab25 Reviewed-on: https://go-review.googlesource.com/c/go/+/765444 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Mark Freeman <markfreeman@google.com>
4 daysnet/http: run tests for HTTP/3 where it can already passNicholas S. Husin
By default, our test harnesses (run and runSynctest) now use http3Mode, in addition to http1Mode and http2Mode, when no []testMode were explicitly defined for a given test. Tests that cannot currently pass for HTTP/3 have been modified to use http3SkippedMode, which serves as a convenient alias for the old default of []testMode{http1Mode, http2Mode}. We changed the default mode and defined http3SkippedMode so we have a clear list of TODOs in terms of how much changes are still needed before our HTTP/3 implementation reaches basic feature parity with HTTP/1 and HTTP/2. For #70914 Change-Id: I719d5d66399a51f7c3d96180ebed9b606a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/765320 Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com>
4 daysnet/http: fix data race in TestClientRedirectUseResponseNicholas S. Husin
There is a data race between the assignment of ts, and the access of ts.URL in the server handler. The data race seems to be more common when running the test against our HTTP/3 implementation. Fix the issue by deriving ts.URL via the given Request in the server handler. For #70914 Change-Id: Ic1924bf2c814517bae6b2e999d5f7efa6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/765443 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Damien Neil <dneil@google.com>
4 daysall: update to x/net@cd64923cd7f4Nicholas S. Husin
This brings in CL 765520. For #70914 Change-Id: I5b67c8a555c68b03cebe687aeb5095936a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/765441 Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
4 daysdebug/elf: use saferio.SliceCap for segment sliceIan Lance Taylor
This avoids using a lot of memory for an invalid segment count. No test case because the problem can only happen for invalid ata. Let the fuzzer find cases like this. For #47653 Fixes #78611 Change-Id: I649f5446496bfa46668e7a3e5c84c82131e1d136 Reviewed-on: https://go-review.googlesource.com/c/go/+/765061 Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
4 daysnet: drop always nil (*netFD).netFD error return valueTobias Klauser
Drop the always-nil error to simplify callers. This was missed in CL 764620. Change-Id: I7a93640b5422d7441234e226aa8b541888b2ebea Reviewed-on: https://go-review.googlesource.com/c/go/+/765220 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
4 daysnet: should close the netfd not listen fdWeixie Cui
Change-Id: I58e4ca136df73cd79ae2bcc7794c867d2e53261b GitHub-Last-Rev: 5381773704ba35819e5c723525ee3428c939b582 GitHub-Pull-Request: golang/go#78607 Reviewed-on: https://go-review.googlesource.com/c/go/+/764363 Reviewed-by: Nicholas Husin <nsh@golang.org> Auto-Submit: Nicholas Husin <nsh@golang.org> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
4 dayscmd/compile: fix typoWeixie Cui
Change-Id: Ia9ee618aa68aad5bab73ee62eea176084ee162da GitHub-Last-Rev: 4cc005d3cd1ae4e5eaa283b1799c7be26b2279f5 GitHub-Pull-Request: golang/go#78625 Reviewed-on: https://go-review.googlesource.com/c/go/+/765280 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Keith Randall <khr@google.com>
4 daysnet/http: add support for running HTTP tests against HTTP/3Nicholas S. Husin
Add support within clientserver_test.go to bring up a test HTTP/3 server and client when http3Mode testMode option is passed. To be able to reuse net/http/httptest, net/http/httptest.Server.StartTLS (and Start) have been modified so they can be called with a nil Listener. In such cases, both methods will behave identically as usual, but will not actually make its server serve or set its transport dialer, both of which requires having a listener. This should be a no-op for regular users of the package, whose entrypoint via functions such as NewServer will automatically set a local listener. Actually enabling HTTP/3 for our tests will be done in a separate CL. For #70914 Change-Id: Ibc5fc83287b6a04b46e668a54924761a92b620a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/740122 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
4 dayscmd/asm, cmd/internal/obj/arm64: support register with index in SVEJunyang Shao
This CL is generated by CL 759800. The new register patterns are (examples): Z1.B[5] Z2[6] P1[7] PN1[8] Change-Id: I5bccc4f1c0474dbd4cd4878bd488f36a7026c7ca Reviewed-on: https://go-review.googlesource.com/c/go/+/759780 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
4 dayscmd/asm, cmd/internal/obj/arm64: add GP and SIMD reg support for SVEJunyang Shao
The GP registers and SIMD registers are comforming to the existing Go syntax: they are V or R registers, their widths are specified in the Opcode, the rules to specify them is: - if that instruction only contains one GP or SIMD register: If it's 32-bit GP, then append W to the end of the opcode. If it's 64-bit GP, no changes. If it's SIMD register with BHWD width specification, BHSDQ will just be appended to the end of the opcode. - if it contains multiple GP or SIMD registers, then manual observation found that they are either specified the same width, or they are fixed width. We distinguish them by their first Go ASM operand width. The rule to append suffixes are the same to the single-reg case above. This CL is generated by CL 759280. Change-Id: Icc819cc30dd8fd1609de31ba7bcb4e3ac83c465e Reviewed-on: https://go-review.googlesource.com/c/go/+/759261 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
5 daysruntime: fix AIX library initializationqmuntal
On AIX, libInit passes a function descriptor instead of the function pointer to pthread_create. This is a regression from CL 706417. Change-Id: I660175eb992a41ef61b1927c51392887a724cd76 Reviewed-on: https://go-review.googlesource.com/c/go/+/761780 Reviewed-by: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: David Chase <drchase@google.com>
5 dayssyscall: avoid nil pointer dereference in UtimeTobias Klauser
Passing a nil buf *Utimbuf to Utime on linux/{arm64,loong64,riscv64} will cause a nil pointer dereference. Check buf explicitly to avoid this case. Change-Id: Ic93484e95e10f92b8266aa598de82ad35fab17d8 Reviewed-on: https://go-review.googlesource.com/c/go/+/764580 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>