| Age | Commit message (Collapse) | Author |
|
For #78152
Change-Id: I0989eba3db259dc8fd7623c105f7ebc06a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/754260
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Michael Matloob <matloob@google.com>
|
|
vcweb does not like multiple tests trying to access the hg server
concurrently. Hold a lock while proxying the request to the hg server to
serialize access.
This is needed to enable us to split our tests using hg repos into
multiple test cases so that they can run concurrently.
For #78152
Change-Id: I4fb997f2be8cf8797f70adab1694be916a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/754760
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
The current bloop pass implementation skips blank nodes silently. This
CL makes it aware of that and keep them alive in temps.
Fixes #77654.
Change-Id: Iaffa5194ba1f0fe8d7c80a4c8e5c9a65a47bf534
Reviewed-on: https://go-review.googlesource.com/c/go/+/754920
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
These tests are exceptionally slow. Move them out of the normal cmd/go
test suite to try to make it more reasonable to run 'go test cmd/go' in
a regular dev cycle. More tests can be moved here as needed. (Hopefully
this can also help longtest sharding)
Change-Id: I4ca0696d0afe72aa0234ed4ed87679ab6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/753860
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
|
|
Change-Id: I601b842f8690f723682dccca0df778f124ac99a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/729500
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Write our own load command for macOS builds,
to make sure we can put the versions in.
Builds on older macOS were seeing an LC_VERSION_MIN instead
and scribbling over fields that didn't exist.
Fixes #78070.
Change-Id: If338d0506b1156b133253e496f29818a29a22a91
Reviewed-on: https://go-review.googlesource.com/c/go/+/754241
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
|
|
CL 752560 accidentally niled out the target symbol.
Re-initialize the target symbol field when doing a direct tail call.
Fixes #78053
Change-Id: I007471587a38077b52daa134640d09c7b8b6becb
Reviewed-on: https://go-review.googlesource.com/c/go/+/753840
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
Static initialization only expected OCONVNOP wrappings.
Unwrap OCONVIFACE too, since it occurs when multiple return values
of an OAS2FUNC are implicitly converted to an interface.
Fixes #78016
Change-Id: Ic3fd6151403aabfc087d3240c1fcfabe7108cc0e
GitHub-Last-Rev: 98976d9e64baa85f4f3181764308566aae991bbf
GitHub-Pull-Request: golang/go#78017
Reviewed-on: https://go-review.googlesource.com/c/go/+/752780
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
In the normal case spadj is not needed because ARET handles the frame pop
and return in a single instruction. However, if the ARET is a tailcall then
there will be a second instruction where the pcsp stack depth is
incorrect.
Fixes #78021
Change-Id: I20db57eee03945a369a4b185b8f3311f4accd7ae
GitHub-Last-Rev: 7226e2e07472549954ca9771b4f528e208703953
GitHub-Pull-Request: golang/go#78022
Reviewed-on: https://go-review.googlesource.com/c/go/+/752881
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
These are for debugging problems with the build versions
in the load commands. We still want to set them correctly by
default for most users, provided we can determine what that means.
Fixes #58722.
Change-Id: Iccab7044ac7b0c58e7e01258a5e374c4155528fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/751260
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
Add a rule to collapse cascaded I64And operations with constant masks
into a single mask:
(I64And (I64And x (I64Const [c1])) (I64Const [c2])) =>
(I64And x (I64Const [c1 & c2]))
This pattern arises from sub-word comparisons. For example,
(Eq32 x y) lowers to (I64Eq (ZeroExt32to64 x) (ZeroExt32to64 y)),
which becomes (I64Eq (I64And x 0xffffffff) (I64And y 0xffffffff)).
If x or y is the result of another sub-word operation that already
inserted a mask, the masks cascade and this rule collapses them.
Cq-Include-Trybots: luci.golang.try:gotip-wasip1-wasm_wasmtime,gotip-wasip1-wasm_wazero
Change-Id: Id7856b391be3ac20f1bc9eee40995b52c0754aed
Reviewed-on: https://go-review.googlesource.com/c/go/+/753620
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
The function "indexBytePortable" is no longer in use, and we have an
identical one in "internal/bytealg".
Remove this function and related tests.
Change-Id: I018a92902f881836699c6a90511359d8bfa16f80
GitHub-Last-Rev: d9c8917253d9e961798660ac62fa8e8ba35523bc
GitHub-Pull-Request: golang/go#78029
Reviewed-on: https://go-review.googlesource.com/c/go/+/753080
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
|
|
It should be 2, not 1.
Fixes #78013
Change-Id: If1c48c84c324a3fd50e9f4b43cca2ea62a995dc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/752740
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
|
|
Fixes #77720
Add a generic SSA rewrite that forwards `Load` from a `Move` destination
back to the `Move` source when it is provably safe, so field reads like
`s.h.Value().typ` don’t force a full struct copy.
- Add `Load <- Move` rewrite in `generic.rules` with safety guard:
non-volatile source
- Tweak `fixedbugs/issue22200*` so that it can still trigger the "stack frame too large" error.
- Regenerate `rewritegeneric.go`.
- Add `test/codegen/moveload.go` to assert no `MOVUPS` and direct `MOVBLZX`
in both direct and inlined forms.
Benchmark results (linux/amd64, i7-14700KF):
$ go test cmd/compile/internal/test -run='^$' -bench='MoveLoad' -count=20
Before:
BenchmarkMoveLoadTypViaValue-20 ~76.9 ns/op
BenchmarkMoveLoadTypViaPtr-20 ~1.97 ns/op
After:
BenchmarkMoveLoadTypViaValue-20 ~1.894 ns/op
BenchmarkMoveLoadTypViaPtr-20 ~1.905 ns/op
The rewrite removes the redundant struct copy in
`s.h.Value().typ`, bringing it in line with the direct pointer form.
Change-Id: Iddf2263e390030ba013e0642a695b87c75f899da
Reviewed-on: https://go-review.googlesource.com/c/go/+/748200
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
|
|
For #76038
Change-Id: I4c30d5854fcaacc7fd7f84b4679a5be30379122d
Reviewed-on: https://go-review.googlesource.com/c/go/+/729200
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Pagol Mon <mpagol707@gmail.com>
|
|
Since Go 1.22, loop variables have per-iteration scope, making
the x := x this pattern unnecessary for goroutine capture.
No issue required for this trivial cleanup.
Change-Id: I00d98522537fc2b9a6b4d598c8aa21b447628d41
Reviewed-on: https://go-review.googlesource.com/c/go/+/753400
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
|
|
In the case where GO111MODULE=auto, we checked whether there was a
go.mod file to see if modules would be enabled, but did not check for a
go.work file. This brought WillBeEnabled out of sync with Init, which
does check for a go.work file. And that resulted with toolchain
selection not taking workspaces into account with GO111MODULE=auto.
For #76728
Change-Id: I9dd232b2e645b97524ffdf544bcd7e3d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/753700
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
|
|
Currently, we only materialise 32 bit signed constants - a 32 unsigned
value that exceeds the 32 bit signed maximum value is loaded from rodata.
A 32 bit unsigned value can be materialized by loading and zero extending,
which requires four instructions on rva20u64 - on rva22u64 and above only
three instructions are required.
Change-Id: I874a457f329ac75c2a0fb59b453cf8ef17df2972
Reviewed-on: https://go-review.googlesource.com/c/go/+/748962
Reviewed-by: Mark Ryan <markdryan@meta.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Pull the constant materialisation code out into its own function, which
reduces indentation and improves readability.
Change-Id: Ia06baefa99c8f1a738c1b13d1a8b27111fa948b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/748961
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Ryan <markdryan@meta.com>
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
Change-Id: Ia7fedd934ecc2b11cb0de445f299dc5c6004e7b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/748960
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Mark Ryan <markdryan@meta.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
Add post-lowering identity and absorption rules for I64And, I64Or,
I64Xor, and I64Mul with constant operands:
(I64And x (I64Const [-1])) => x
(I64And x (I64Const [0])) => (I64Const [0])
(I64Or x (I64Const [0])) => x
(I64Or x (I64Const [-1])) => (I64Const [-1])
(I64Xor x (I64Const [0])) => x
(I64Mul x (I64Const [0])) => (I64Const [0])
(I64Mul x (I64Const [1])) => x
The generic SSA rules handle these patterns before lowering, but
these rules catch cases where wasm-specific lowering or other
post-lowering optimization passes produce new nodes with identity
or absorbing constant operands.
For example, the complement rule lowers Com64(x) to
(I64Xor x (I64Const [-1])), and if x is later determined to be
all-ones, the I64And absorption rule can fold the result to zero.
Cq-Include-Trybots: luci.golang.try:gotip-wasip1-wasm_wasmtime,gotip-wasip1-wasm_wazero
Change-Id: Ie9a40e075662d4828a70e30b258d92ee171d0bc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/752861
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
|
|
CL 226737 optimized len check when make slice in common case when len is
within range of cap. However, the generated code does not walk the AST
for the if condition, causing un-walked nodes passed to the backend.
Fixes #78028
Change-Id: I492fb230c10e585dc09391728ef4df2c0058ce12
Reviewed-on: https://go-review.googlesource.com/c/go/+/753100
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
hg is very slow (takes about 150ms per invocation on my machine) and in
modfetch.(*codeRepo).convert we do many vcs operations that are
sometimes repeated. We can cache the stat and readFile operations and
make a single go get operation twice as fast (about 4 to 2 seconds).
Change-Id: I3f30403c941ff9d91461c8f8a458615c6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/725700
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
Will be used to detect overlapping field selectors in
struct literals.
Change-Id: I6f939171ba1491251489698d40123f5283602458
Reviewed-on: https://go-review.googlesource.com/c/go/+/752601
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This reduces the chance that multiple go commands running in CI will
try to trim at the same time, causing contention and slowing things
down.
Fixes #76314
Change-Id: I3edf818fc9583795f3f51b715fdbe75b6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/753240
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
|
|
This only changes the type checkers and tests.
Backend compiler changes are not included.
For #77273.
Change-Id: I8cf0b6fddf6afd6b08b06ba6fdf9c726af4bea8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/746820
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
|
|
This template is frequently used to create test cases.
Change the date so new tests use the correct date.
Change-Id: I83075e105b8b97c673d9ff47fb0d47e32e5184de
Reviewed-on: https://go-review.googlesource.com/c/go/+/752600
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
|
|
Adds a mechanism for generating test2json test artifacts from and validating them against a real test. If a .test file has a corresponding .src file, TestGolden will now treat the .src file as a script test, executing it and verifying that the output matches the contents of the .test file. Running TestGolden with the -update flag will also regenerate .test files if they have a corresponding .src file.
Capturing the output of the script test in this way required making minor changes to cmd/internal/script/scripttest.
This was motivated by CL 601535 (golang/go#62728). Specifically, testing that CL required adding src/cmd/internal/test2json/testdata/frameescape.test which has a multitude of non-printing characters and thus must be generated by executing `go test`. Using a script test to generate the test file is more reliable than doing it by hand.
Change-Id: I60456700e37e21a42d0514be2ce86dc6df2bccb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/628615
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
|
|
Provides a way to disambiguate output produced by (*testing.T).Error{,f}
and (*testing.T).Fatal{,f} from other test logging. This allows test
tooling such as CI systems to identify which part of the output is most
pertinent for constructing summaries of test failures.
This is achieved by adding an OutputType field to output events. The
output type for an error is "error" for the first line and
"error-continue" for subsequentlines. The output type for framing is
"frame". This is achieved by bracketing error output with ^O and ^N,
escaped with ^[.
Fixes golang/go#62728.
Change-Id: Ib09c18ed5f729e1ae6d335cd1ec7d818c71532e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/601535
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
|
|
Also update get_panic_issue75251 to reflect that "golang.org/x/net" now
exists in the proxy. The new message is closer to the real world
behavior of the go command.
Change-Id: Icb916f7eb7628bf5340c15275f4d08086a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/752940
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <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>
|
|
For these tests, I've been able to use modules that are in the local
proxy and vcstest server (or add modules to them where modules didn't
already exist) to exercise the tested functionality of the go command.
This should help make our longtests run faster and be less flaky.
This CL also removes lines in the tests that set GO111MODULE=on since
that's now the default.
Change-Id: Ie0b2c905850f84100213e1ab35ec2a226a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/753140
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Alexander <jitsu@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
|
|
Use vcstest to deflake the test.
Fixes #68420
Change-Id: I0c54a0e9cbab160636e3be53e615b7816a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/751600
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Alexander <jitsu@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
|
|
This change renames the type `loader` to `packageLoader` to better
distinguish it from the concept of a "module loader". This is also done
to prepare for the renaming of the type `modload.State` to
`modload.Loader` which will represent the module loader concept.
Change-Id: Id39ca746acc1862451069fefc005651a9d94bc51
Reviewed-on: https://go-review.googlesource.com/c/go/+/748160
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
|
|
The go command determines GOROOT from where the binary is.
It is an error to try to run a go command with a mismatched Go tree.
The only possible use for 'go env -w GOROOT=...' would be if you
copied the go executable to a new place (say, $HOME/bin) and needed
to set the default GOROOT so that it could find its way back home.
Don't do that. Use a symlink or a tiny shell script.
Fixes #77825.
Change-Id: I2b4430c46a9ef35fccb7406ffba3e44b3de191be
Reviewed-on: https://go-review.googlesource.com/c/go/+/749461
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
|
|
The assembler isn't handling this correctly for most architectures.
Of course, the two I tried first, arm64 and amd64, worked, so I assumed
other archs could handle it also. Apparently not.
Should fix dashboard failures introduced by CL 751465.
Change-Id: I9fc4f123d11acf3d10cc9806abfb93ec077509a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/752560
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
|
|
Uses `^[` to escape the framing marker `^V` used to delimit test output. A test
that itself executes a go test binary, or otherwise emits that control
character, previously would corrupt the test2json parse of the enclosing run.
Updates #62728.
Change-Id: I0e8790a05fd7af469cd7ee2e8ccc13786cc372dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/751940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
|
|
Add OpARM64FMOVQload, OpARM64FMOVQstore, OpARM64FLDPQ, and
OpARM64FSTPQ for loading and storing Vec128 values.
Includes offset folding and address combining rules.
These ops will be used by subsequent CLs.
Change-Id: I4ac86a0a31f878411f49d390cb8df01f81cfc4d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/738260
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
|
|
Negation on a condition can be eliminated.
Change-Id: I94fab5f019cbaebb2ca589e1d8796a9cb72f3894
Reviewed-on: https://go-review.googlesource.com/c/go/+/748401
Reviewed-by: Xueqi Luo <1824368278@qq.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Julian Zhu <jz531210@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
|
|
Loosely based on CL 678795.
The PE/COFF spec requires RUNTIME_FUNCTION entries in the .pdata
section to be ordered by their function start address. Previously
the linker emitted them in symbol order.
An unsorted table triggers the MSVC linker error:
fatal error LNK1223: invalid or corrupt file: file contains invalid
.pdata contributions
Fixes #65116.
Change-Id: I589cb4e6787a9edb34400b56e60fe23065b59162
Reviewed-on: https://go-review.googlesource.com/c/go/+/743820
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
This changes modifies Go to allow the -nostdlib++ flag to the list of
allowed flags to be passed to the c compiler invocation when testing flags
in cmd/link.
It is similar to #76858 and complements #76825.
This is needed for hermetic c only toolchains where -nostdlib++ is passed
transitively.
Given prior discussions about security considerations when adding flags to
the whitelist, this particular one may be particularly safe to whitelist.
Change-Id: If2e295f9de544b4498ad37fb07d3f7b3b11bbf6d
GitHub-Last-Rev: e59fd659d7e7e2e057bbb29e5ae12b0fa11fdb60
GitHub-Pull-Request: golang/go#77601
Reviewed-on: https://go-review.googlesource.com/c/go/+/745340
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Replace one of the boolean simplification rules with two new rules
in order to cover more cases.
This is a rebase of CL 42516 which slipped through the cracks.
Change-Id: I6da4cf30e5156174e8eac6bc2f0e2cebe95e555c
Reviewed-on: https://go-review.googlesource.com/c/go/+/750520
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
|
|
Change-Id: I0e0a5919536b643477a6f9278fcc60492ea5a759
Reviewed-on: https://go-review.googlesource.com/c/go/+/750540
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
When go get encounters an invalid version string like "branch/with/slash",
the error message redundantly repeats the version information:
go get: pkg@branch/with/slash: invalid version: version "branch/with/slash" invalid: disallowed version string
This happens because proxyRepo.versionError wraps the error from
module.EscapeVersion (which already returns an InvalidVersionError) in
another InvalidVersionError, causing ModuleError.Error to format both
layers.
Avoid the double wrapping by checking whether the error is already an
InvalidVersionError before creating a new one. The resulting message is:
go get: pkg@branch/with/slash: invalid version: disallowed version string
Fixes #44810
Change-Id: I5c259ef6f1ea23b6673689defbe7e51c8ec813ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/744920
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Antonio Camacho <antoniocho444@gmail.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
When using "go work use -r" to recursively add modules, vendor
directories are incorrectly included. Modules under vendor/ are
managed by "go mod vendor" and should not be added to go.work.
The WalkDir callback in workUse did not skip directories named
"vendor", unlike other recursive walkers in the codebase (e.g.
modload/search.go, doc/dirs.go) which all use SkipDir on
d.Name() == "vendor".
Add the same vendor skip to the WalkDir callback. This uses
d.Name() == "vendor" rather than path prefix matching, consistent
with Bryan Mills's review feedback on the earlier CL 393814 which
was abandoned for using the wrong approach.
Fixes #51710
Change-Id: I4cdd46a8566e9461bf1f5f9e60099f0585e3fae3
Reviewed-on: https://go-review.googlesource.com/c/go/+/744900
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
So that it doesn't try to fetch from github.
Change-Id: I634e9ca2e222f4f650c05faf60a973aa6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/752361
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
When stat cache updates fail due to read-only filesystems (such as
gomodfs), don't log the warning. It's harmless and not worth the spam.
Change-Id: I337b41e1958da89d904495fec6d61240c024da44
Reviewed-on: https://go-review.googlesource.com/c/go/+/750700
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Add the missing I64Sub constant folding rule to the wasm backend.
Every other wasm arithmetic operation (I64Add, I64Mul, I64And, I64Or,
I64Xor, I64Shl, I64ShrU, I64ShrS) already had a post-lowering
constant folding rule, but I64Sub was missing.
While the generic SSA pass folds Sub64(Const64, Const64) before
lowering, this rule ensures consistency and handles any edge cases
where later wasm-specific passes produce I64Sub with two constant
operands.
Cq-Include-Trybots: luci.golang.try:gotip-wasip1-wasm_wasmtime,gotip-wasip1-wasm_wazero
Change-Id: Ie8bc044dd300dcc6d077feec34f9a65f4a310b13
Reviewed-on: https://go-review.googlesource.com/c/go/+/751441
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Commit-Queue: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Updates #77919
Change-Id: I300025cbfc1baf95dacde0ef66bd4b13484f2aa4
Reviewed-on: https://go-review.googlesource.com/c/go/+/751380
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
types2 handles all constant-related bounds checks in user Go code now,
so it's safe to remove all constants checking in tcSliceHeader function.
Fixed #77919
Change-Id: Ibc137c84792d4898eb073cdeabac175684f73746
Reviewed-on: https://go-review.googlesource.com/c/go/+/751040
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
|
|
type I interface {
foo()
}
type S struct {
I
}
Because I is embedded in S, S needs a foo method. We generate a
wrapper function to implement (*S).foo. It just loads the embedded
field I out of S and calls foo on it.
When the thing in S.I itself needs a wrapper, then we have a wrapper
calling another wrapper. This can continue, leaving a potentially long
sequence of wrappers on the stack. When we then call runtime.Callers
or friends, we have to walk an unbounded number of frames to find a
bounded number of non-wrapper frames.
This really happens, for instance with I = context.Context, S =
context.ValueCtx, and runtime.Callers = pprof sample (for any of
context.Context's methods).
To fix, make the interface call in the wrapper a tail call.
That way, the number of wrapper frames on the stack does not
increase when there are lots of wrappers happening.
Fixes #75764
Fixes #77781
Change-Id: I03b1731159d9218c7f14f72ecbbac822d6a6bb87
Reviewed-on: https://go-review.googlesource.com/c/go/+/751465
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
|