Nextafter and Nextafter32 have distinct behavior when the starting
value is a signed zero, which the special-case lists did not mention:
towards the oppositely-signed zero the result keeps the starting sign,
and towards any nonzero y the result is the smallest subnormal with the
sign of y. Document these cases; the behavior is unchanged.
Fixes#42613
Change-Id: I8c6f0f3fc821d285d6870e76edf72391b124d350
GitHub-Last-Rev: 34eb6cc9b47720f3d330b1d385a16fd62adae107
GitHub-Pull-Request: golang/go#80359
Reviewed-on: https://go-review.googlesource.com/c/go/+/799400
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: Michael Pratt <mpratt@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
It's late in the cycle, let's just disable this new pass and
try again for 1.28.
Update #80102
Change-Id: Idcda2814e22f017999813a52b06013df3735bf18
Reviewed-on: https://go-review.googlesource.com/c/go/+/799700
Reviewed-by: Chencheng Jiang <dorbmons@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Using reflect.Value.Pointer to compare function values for
equality is problematic. For closures, the same code pointer does
not necessarily mean the functions have the same behavior, as the
captured variables may have different values, which are not
included in the comparison.
Change-Id: Ib95912cce52d3863f8fe77d874ffa2f277dbd0b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/788441
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
read() on a directory file seems like it should produce an error,
just like every other Unix, but #80322 indicates that it doesn't seem to.
Just check that we're consistent with the non-Root case.
Fixes#80322
Change-Id: I499f9b0e2bac8e87647c83c5098db9cf6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/799080
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
MkdirAll("dir/") should create "dir", not return an error.
Fixes#80308
Change-Id: I75458c30b6cb94be3a3d368f6024caef6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/799064
Auto-Submit: Damien Neil <dneil@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 <husin@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
The -failfast flag stops a test binary from starting new tests after
the first failure.
When a test had a parallel subtest, its failure was recorded before
its cleanup functions ran. A failure inside a t.Cleanup was therefore
not counted, and -failfast kept starting new tests. Tests without a
parallel subtest run their cleanup earlier and were unaffected.
Record the failure after cleanup has run, so a cleanup failure counts
for -failfast regardless of whether the test has a parallel subtest.
Fixes#61034
Change-Id: Icea654cbaf3904936200566d7d7d72ca8ccc5958
GitHub-Last-Rev: e46ad5ad314c5cee2a835be3627f4a6455b81c32
GitHub-Pull-Request: golang/go#80165
Reviewed-on: https://go-review.googlesource.com/c/go/+/794541
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
CL 797880 changed Root to handle trailing slashes in
paths and added TestRootConsistencyRemoveAll.
However, this test is failing on Plan 9 because the "noat"
implementation of RemoveAll disagrees with Root.RemoveAll
when a path ends in a slash and its target is not a
directory. Root.RemoveAll strips the trailing slash and
removes the file, while os.RemoveAll leaves the slash in
place. On Plan 9, Remove and Lstat then fail on the
slash-terminated path, so os.RemoveAll returns an error
instead.
This change strips trailing slashes in the "noat"
implementation of RemoveAll, so RemoveAll("not_a_directory/")
removes the file and returns nil, and remains consistent
with the "at" implementation and Root.RemoveAll.
Fixes#80319.
Change-Id: I5c47ccd239c629da78772f39a831cccf8c9d1500
Reviewed-on: https://go-review.googlesource.com/c/go/+/798721
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Richard Miller <millerresearch@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
We have various small submodules in the repository, mostly used for code
generation tools with external dependencies.
Currently naming is fairly ad-hoc. Some name the module based on the
path of the directory, while others use a single name like _gen.
If a developer creates a go.work file creating a workspace containing
these submodules (go work use -r .) [1], then all module names must be
unique.
Since CL 772102, we have two modules named _gen, so any operation after
creating go.work immediately fails with a duplicate module error.
Resolve this by using module paths based on the path to the directory.
The load bearing changes here are modifying
cmd/compile/internal/ssa/_gen/go.mod and/or simd/archsimd/_gen/go.mod so
they no longer conflict, but I've changed all module paths to use the
same naming scheme for consistency.
Note that std and cmd get special treatment by cmd/go, so avoid those
prefixes. e.g., the cmd/vet modules seem to ignore the Go language
version when using a cmd/ prefix.
[1] I found this issue because the build process for cross-references on
https://cs.opensource.google/go does this and is currently broken.
Change-Id: I8b3a351c16bd6d52192fb7b45186c38f6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/798560
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
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>
Takes an upstream update to the Wycheproof test vectors. This includes
an update to the ML-KEM semi-expanded form decapsulation test schema
that adds the expected K. We use that to tighten up
TestMLKEMSemiExpandedDecapsWycheproof to take advantage.
Change-Id: I67abcc9c1c6728ab154742f9a466e18be22eef89
Reviewed-on: https://go-review.googlesource.com/c/go/+/792940
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Generated with updatestd, though it's equivalent to manually running:
cd src/cmd
go get golang.org/x/tools@internal-branch.go1.27-vendor # v0.45.1-0.20260708165844-7044391f8d9f
go mod tidy
go mod vendor
Fixes#78452.
[git-generate]
updatestd -goroot=$(pwd) -branch=internal-branch.go1.27-vendor
Change-Id: I633f029a6c2201b92c499a8a4e2534c6824946d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/798501
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Madeline Kalil <mkalil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Monomorphization checks do not run in the presence of errors, which was
suppressing the error from this test and making it appear to pass. This
is a bit misleading.
For #48703
For #80172
Change-Id: I87f672275df189366b88cf3ffac8b3d21b7a1a83
Reviewed-on: https://go-review.googlesource.com/c/go/+/798500
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Currenty `go fmt` does not truncate the symlinked file, as it compares
the size of the recorded data not with the real file size, but with
the symlink reference path length.
Fixes#79735
Change-Id: I0cedccb061aa1a9844bce698c19cb0e96e2e3d14
GitHub-Last-Rev: 6126f26df475ab0fe090299eff88a3429fd804df
GitHub-Pull-Request: golang/go#79774
Reviewed-on: https://go-review.googlesource.com/c/go/+/785800
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Alan Donovan <adonovan@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>
All other dirFS methods (Open, ReadFile, ReadDir, Stat, Lstat) rewrite
PathError.Path to the relative name on error. Do the same in
dirFS.ReadLink to be consistent and so callers of
DirFS("/prefix").ReadLink("file") see PathError{Path: "file"} instead of
PathError{Path: "/prefix/file"}.
Change-Id: Id49cb43d79f459c855f94e5544e4c727fe68a7b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/796540
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This change fixes a significant mechanism by which
operations in a Root can escape the root.
The implementation of Root on platforms supporting the openat
family of functions assumed that openat(parent, "f/", O_NOFOLLOW)
would not resolve symlinks in "f". This is not correct; the
trailing slash causes f to be resolved.
This permits Root operations to escape when the target filename
ends in a slash and the target is a symlink to a directory outside the
root. This does not permit directly accessing non-directory files
outside a root, since the trailing slash adds a requirement that the
target be a directory. However, under some circumstances an attacker
might exploit this flaw to access non-directory files outside
a root, for example by first renaming a directory outside the root
to a location within it and then accessing files within that directory.
This change adjusts Root's handling of slash-terminated paths.
Trailing slashes are removed from the path at the start of an
operation, and the presence of slashes is tracked as a boolean.
Slashes are never reattached to a path component.
In addition, the doInRoot helper function now automatically
handles trailing slashes in a POSIX-compatible fashion.
When a path ends in one or more slashes:
- symlinks in the final component are resolved; and
- the final path component after symlink resolutions
must reference a directory.
This change also adds a new sets of tests to exercise Root's
behavior in a wider variety of circumstances. These tests
run through a matrix of file configurations, such as:
- path "target", a regular file
- path "dir/../target", a directory
- path "target/", a symlink to "dir/../target/", which does not exist
- etc.
These tests execute Root operations and the corresponding unrooted
operation, validate specific expected results for some configurations,
and verify that the rooted and unrooted versions of the operation
produce the same result.
Thanks to Mundur (https://github.com/M0nd0R) for reporting this issue.
Fixes#79005
Fixes CVE-2026-39822
Change-Id: I34072ab63f2367baf236592f11143f4e6a6a6964
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/4740
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/797880
Auto-Submit: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Importing generic methods with recursive bounds can currently deadlock.
This is because SetConstraint, which is called from a delayed function,
requires the underlying type. We already have this information handy,
so the fix is somewhat simple.
Credit goes to Lauro Santana for reporting this issue and contributing
a test case (attached here).
Fixes#80258
Change-Id: I06ec71edbbd113743273f7c4be15b142e2f6938c
Reviewed-on: https://go-review.googlesource.com/c/go/+/797640
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This effectively removes the ability to make external network connection
from scripttest suites.
Fixes#80243
Change-Id: Id90d0333176384ed69ada5bf774ac53d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796380
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Funda Secgin <fundasecgin73@gmail.com>
Reviewed-by: Michael Matloob <matloob@google.com>
For #80243
Change-Id: I4a1652cc26869e5256449f998603898e6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796021
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
There is a case in gotoolchain_net that tries to download a real
GOTOOLCHAIN from the network. Move it to verylongtest so that it doesn't
affect the normal cmd/go test suite.
Also modify scripttest.RunTest to make files writable so that we can
clean up modcaches with readonly files.
For #80243
Change-Id: I3148fb07249358c7471dae7a7e1b97d76a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796020
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Ideally we could convert them to not use net but for now let's isolate
them. mod_proxy_https is probably easier to convert, but we'd have to
start serving an HTTPS proxy for it.
The net condition is simple than the one in the standard suite because
it doens't enable network access, it just checks if it's available.
The git condition is a copy of the condition in the standard suite.
We also add GOROOT to the tests' environment so the mod_proxy_https test
case can find the go.env file.
For #80243
Change-Id: I3b36b927be34f15cf4e933805c73cdae6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796000
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
mod_replace_gopkgin is unconditionally skipped, and there is an
unconditional skip in mod_replace_gopkgin. Remove the net condition
checks from these tests. We want to add an allowlist for the tests that
use net and make it as small as possible. Since these tests shouldn't
access the network once they're fixed and reenabled, just remove the
condition.
For #80243
Change-Id: I690e2668281901103b55f6d66eaa81816a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795920
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Create both test proxy and vcstest git modules that share the elements
of blackfriday that we used for the test: we needed v1 and v2 versions
without go.mod files, and v1 and v2 versions with go.mod files in the
git repo.
For #80243
Change-Id: Ibb03627797bb80ac6e804072a1bbf0686a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795908
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Create fake modules in the proxy that we intend to not fetch.
For #80243
Change-Id: Iad6a205039fa2cf512073d5f4870ce776a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795907
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Use the vsstest auth handler to create a 401 from a fake http git repo.
For #80243
Change-Id: Ia9faba99e37951e9ef949707bf52b6456a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795906
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Export the test sumdb to the test case as TESTGO_SUBDB. The test wants
to check the proxy's supported file for the sumdb, so we need the name
of the proxy's sumdb if we're going to use it. Then instead of the
supported file in the sum.golang.org directory, we can use the name of
the test sumdb instead.
For #80243
Change-Id: I24a4bd43f4e21333052d0a90271f9c966a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795904
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The export-subst vcstest git repo adds the necessary parts of
github.com/jasonkeene/export-subst that were used in the test earlier.
For #80243
Change-Id: I9cf1bc0fb304ac5cbbd9ce49605a44e16a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795903
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
We already have a bunch of fake toolchain versions in our test proxy. We
just need to add 1.20.1 and 1.19rc2 for this test to work.
For #80243
Change-Id: I360cb569af62124aae76bf4491d375a96a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795902
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
We don't actually go to the network here. The check says it's silenced
just in case, but if we're actually trying to go to github, we should
either fix the underlying problem, or migrate the test to use vcstest.
For #80243
Change-Id: Ib3c4786c96d5bb93c3b15ccd80bb497d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795901
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
We can use one of the vcs-test git repos instead for the cases where
we actually try to access a git repo. The rest of the cases don't try to
go to VCS.
For #80243
Change-Id: I38d6f1f7fa28282fb036ca9dae0a53826a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795900
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
When a server is configured to support unencrypted HTTP/2,
it reads a few bytes from each new connection to see if they
contain the HTTP/2 client preface. This read was being done
with no timeout applied. Apply the header timeout (since this
is essentially reading the first headers from the connection).
Hoist the header timeout into the server serve loop so we can
use a single timeout to cover both the HTTP/2 preface and
the first HTTP/1 headers.
Thanks to Vsevolod Naumov and Ainar Garipov from AdGuard for reporting this issue.
Fixes#80205
Fixes CVE-2026-56853
Change-Id: I4bbb917e11ccb9616594379ef556cee66a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/797520
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: Nicholas Husin <nsh@golang.org>
In applyUpgrades, in the go get upgrade loop, switch to a newer version
of the toolchain if we encounter a dependency we want to add that
requires a newer go version.
This fixes the case where go get -u work adds a dependency that bumps up
the minimum required go version of the work module.
Fixes#79917
Change-Id: Ia01a692cf2f17de15a9ac3e3ebf9704c6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/794800
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
When resolving a shorthand package path, go doc previously returned the
first matching suffix. That let internal/synctest win over
testing/synctest for synctest.Wait because the internal package appears
earlier in the directory scan.
Defer internal package matches unless the query explicitly contains an
internal path element. If no non-internal match is found, keep returning
the deferred internal matches so fallback behavior still works.
Fixes#79988
Change-Id: I98e6ddf789519228cabdad240864c622f2ca47ad
GitHub-Last-Rev: 1f6d424bc42a8a472d464fefb70aaf68e3de374d
GitHub-Pull-Request: golang/go#80002
Reviewed-on: https://go-review.googlesource.com/c/go/+/790520
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
This is a follow-up to CL 795460, in which Server.MaxHeaderValueCount
was added, allowing a Server to limit the number of headers that it is
willing to accept.
In CL 795460, Server.MaxHeaderValueCount is applied to trailer headers
only for HTTP/2 servers, mostly because of the existing code structure
around Server.MaxHeaderBytes. This CL makes it so that
Server.MaxHeaderValueCount is applied to trailer headers in HTTP/1 too.
For #79936
Change-Id: I0ab9d1ac03fe05474b6d4d36c16586396a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796400
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Take a temporary replace directive in the go.mod for the
crypto/internal/cryptotest/wycheproof/_schema go.mod on
a yet-to-be-merged upstream fix to atombender/go-jsonschema. This fixes
a limitation where schemas with certain unmodelled properties (e.g.
conditional validation requirements) would result in the generated
code using a generic interface type instead of a structure.
With this in place the ML-DSA wycheproof test can lose its manually
defined structure + unmarshalling code in favour of using the generated
structure type that's always in-sync with upstream.
Change-Id: Ibbd7b41aaa0caf6414b319b77e62762b498ed6f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/795301
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
After CL 795460, a couple of longtest builders got broken because
the max header value count for incoming requests was set by default
to 500, yet the subject benchmark operates on 1,000 headers so this
change simply gives it more breathing space by 30+nheaders.
Updates #79936Fixes#80230
Change-Id: I0ab8a699be062ca967d090a070b803d8137453f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/796520
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
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>
HTTP/2 transport currently applies Transport.MaxResponseHeaderBytes
limit to trailer headers. However, due to a missing check, when a server
sends trailers that exceeds the limit, it would silently truncate it
rather than giving an explicit error.
Change-Id: I749fa54447bb1eeb9c822cff6fb4c6416a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/796381
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
This reverts commit 1952e618b834bda60fb9efff0fc0af46b38e110d.
Reason for revert: The release is too close for the minors, to make rc2 consistent with minors we revert it until rc3.
Change-Id: Id463ab4f078e75e4fac46d5651f3c9aa0ac774bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/795909
Reviewed-by: Neal Patel <nealpatel@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
An edge case exists where index exceeds len(upper.mant)
due to decimal trailing-zero trimming; the new invariant
permits round-up past upper's mantissa when incrementing
the digit will not force a carry.
Fixes#80206
Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
Reviewed-on: https://go-review.googlesource.com/c/go/+/779080
Reviewed-by: Neal Patel <nealpatel@google.com>
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>
Implement MaxHeaderValueCount support for both the HTTP/1 and HTTP/2
server. This allows servers who want to support large headers such as
SSO or OIDC cookies (and therefore has to set MaxHeaderBytes to a large
value), to still limit the number of headers that they are willing to
accept.
Also added the usual note for linknamed symbols for
net/textproto.readMIMEHeader, which seems to have been missed
originally.
Release note changes will be added directly in x/website.
For #79936
Change-Id: I600ac6c492f64f9cfa2730836be64dc76a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795460
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>