aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
5 hoursruntime: remove unused code in (*pallocBits).findLargeNHEADmasterMichael Mitchell
Change-Id: I9611edb9663a9c32bb23d26b9b22b79a54a97498 Reviewed-on: https://go-review.googlesource.com/c/go/+/586196 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
17 hoursnet: use stringslite package for string operationsaimuz
- Replace manual string suffix removal with stringslite.TrimSuffix in conf.go - Use stringslite.Cut for string splitting in ParseCIDR function in ip.go - Add stringslite import in ip.go This change simplifies string operations and improves code readability. Change-Id: I02c238d0bc91e95789d8060e6ef4c7d4f6e3f0d9 GitHub-Last-Rev: aef5dc5011217abc95b2a2d7c1d991ca84060d59 GitHub-Pull-Request: golang/go#67461 Reviewed-on: https://go-review.googlesource.com/c/go/+/586157 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Commit-Queue: Ian Lance Taylor <iant@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
22 hourscmd/asm: on PPC64, fix assembling of FCMPO opcodePaul E. Murphy
The assembler should pack 3 argument usage of FCMPO similar to other CMP-like opcodes. Fixes #67359 Change-Id: Icfb42a67d741431a70dd880806857b4c38f42d62 Reviewed-on: https://go-review.googlesource.com/c/go/+/585640 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
22 hoursruntime: skip coro cgo test on platforms without cgoAustin Clements
Change-Id: Ibbe82a3ae2a67fb8f2b831130123dc74bc4dc9dc Reviewed-on: https://go-review.googlesource.com/c/go/+/586535 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
24 hoursinternal/runtime/atomic: fix missing linknamesAustin Clements
CL 544455, which added atomic And/Or APIs, raced with CL 585556, which enabled stricter linkname checking. This caused linkname-related failures on ARM and MIPS. Fix this by adding the necessary linknames. We fix one other linkname that got overlooked in CL 585556. Updates #61395. Change-Id: I454f0767ce28188e550a61bc39b7e398239bc10e Reviewed-on: https://go-review.googlesource.com/c/go/+/586516 Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Austin Clements <austin@google.com>
24 hoursruntime: fix coro interactions with thread-locked goroutinesMichael Anthony Knyszek
This change fixes problems with thread-locked goroutines using newcoro/coroswitch/etc. Currently, the coro paths do not consider thread-locked goroutines at all and can quickly result in broken scheduler state or lost/leaked goroutines. One possible fix to these issues is to fall back on goroutine+channel semantics, but that turns out to be fairly complicated to implement and results in significant performance cliffs. More complex thread-lock state donation tricks also result in some fairly complicated state tracking that doesn't seem worth it given the use-cases of iter.Pull (and even then, there will be performance cliffs). This change implements a much simpler, but more restrictive semantics. In particular, thread-lock state is tied to the coro at the first call to newcoro (i.e. iter.Pull). From then on, the invariant is that if the coro has any thread-lock state *or* a goroutine calling into coroswitch has any thread-lock state, that the full gamut of thread-lock state must remain the same as it was when newcoro was called (the full gamut meaning internal and external lock counts as well as the identity of the thread that was locked to). This semantics allows the common cases to be always fast, but comes with a non-orthogonality caveat. Specifically, when iter.Pull is used in conjunction with thread-locked goroutines, complex cases (passing next between goroutines or passing yield between goroutines) are likely to fail. Simple cases, where any number of iter.Pull iterators are used in a straightforward way (nested, in series, etc.) from the same goroutine, will work and will be guaranteed to be fast regardless of thread-lock state. This is a compromise for the near-term and we may consider lifting the restrictions imposed by this CL in the future. Fixes #65889. Fixes #65946. Change-Id: I3fb5791e36a61f5ded50226a229a79d28739b24e Reviewed-on: https://go-review.googlesource.com/c/go/+/583675 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Austin Clements <austin@google.com>
25 hoursinternal/trace: move v2 tracer into trace directoryCarlos Amedee
This change moves the v2 tracer into the trace directory. Updates #67367 Change-Id: I3657b4227002cb00fdf29c797434800ea796715e Reviewed-on: https://go-review.googlesource.com/c/go/+/584538 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
25 hourssync/atomic: public And/Or ops and race instrumentationMauri de Souza Meneguzzo
This CL implements the new sync/atomic AND and OR apis as well as their race counterparts. Fixes #61395 Change-Id: I294eefe4b3ac27bc4ed237edcbfa88a8c646d86f GitHub-Last-Rev: f174297007c7b81b1ff4a687ef23d955a3ffd4db GitHub-Pull-Request: golang/go#64331 Reviewed-on: https://go-review.googlesource.com/c/go/+/544455 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
25 hoursinternal/trace: remove remnanats of v1 tracerCarlos Amedee
This change removes unused parts of the v1 tracer in preperation of the move of the v2 tracer into the trace package. Updates #67367 Change-Id: I3e53a8afdef72dc90c2d5b514380d1077d284bc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/584537 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
25 hourscmd/go/internal/envcmd: remove duplicate env value setMichael Matloob
CL 586095 wasn't needed because setting the GODEBUG value was just moved lower in CL 563137. Now we set it twice. Remove the second set so that it's only set once. Change-Id: I4a830977833b007e996d0ccaec705a1da4631e6c Reviewed-on: https://go-review.googlesource.com/c/go/+/586477 Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
27 hourscmd/trace: collapse v2 directory into traceCarlos Amedee
This change removes the old trace code and replaces it with the new tracer. It does the following: - Moves the contents of the v2 directory into the parent trace directory. - Combines the old tracer main file with the new main file. - Replaces any existing files with the corresponding v2 files. - Removes any unused files. Updates #67367 Change-Id: I2237920e13588258a2442b639d562cf7f8a8e944 Reviewed-on: https://go-review.googlesource.com/c/go/+/584536 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
27 hourscmd/link: enable checklinkname by defaultCherry Mui
Fixes #67401. Change-Id: Ia8e091c77414cd1281cadc524215ef89ba9184b2 Reviewed-on: https://go-review.googlesource.com/c/go/+/585556 Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
27 hoursall: add push linknames to allow legacy pull linknamesCherry Mui
CL 585358 adds restrictions to disallow pull-only linknames (currently off by default). Currently, there are quite some pull- only linknames in user code in the wild. In order not to break those, we add push linknames to allow them to be pulled. This CL includes linknames found in a large code corpus (thanks Matthew Dempsky and Michael Pratt for the analysis!), that are not currently linknamed. Updates #67401. Change-Id: I32f5fc0c7a6abbd7a11359a025cfa2bf458fe767 Reviewed-on: https://go-review.googlesource.com/c/go/+/586137 Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
27 hoursgo/types: re-enable suppressed gcimporter testsRobert Griesemer
Port CL 577616 from types2 to go/types allows us to re-enable these tests. Fixes #66859. Fixes #67436. Updates #50259. Updates #65294. Change-Id: I573e51cf16546ac1c115beac5322b51dd998c881 Reviewed-on: https://go-review.googlesource.com/c/go/+/586236 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
28 hoursnet/http: return correct error when reading from a canceled request bodyDamien Neil
CL 546676 inadvertently changed the error returned when reading from the body of a canceled request. Fix it. Rework various request cancelation tests to exercise all three ways of canceling a request. Fixes #67439 Change-Id: I14ecaf8bff9452eca4a05df923d57d768127a90c Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-linux-amd64-longtest-race Reviewed-on: https://go-review.googlesource.com/c/go/+/586315 Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
28 hoursruntime: make use of stringslite.{HasPrefix, HasSuffix}Jes Cok
Change-Id: I7461a892e1591e3bad876f0a718a99e6de2c4659 Reviewed-on: https://go-review.googlesource.com/c/go/+/585435 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
28 hourscmd/compile/internal/ssa: cleanup ANDCCconst rewrite rules on PPC64Paul E. Murphy
Avoid creating duplicate usages of ANDCCconst. This is preparation for a patch to reintroduce ANDconst to simplify the lower pass while treating ANDCCconst like other *CC* ssa opcodes. Also, move many of the similar rules wich retarget ANDCCconst users to the flag result to a common rule for all compares against zero. Change-Id: Ida86efe17ff413cb82c349d8ef69d2899361f4c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/585400 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
42 hoursos: make use of pidfd on linuxKir Kolyshkin
Use Process.handle field to store pidfd, and make use of it. Only use pidfd functionality if all the needed syscalls are available. 1. Add/use pidfdWorks, which checks that all needed pidfd-related functionality works. 2. os.StartProcess: obtain the pidfd from the kernel, if possible, using the functionality added by CL 520266. Note we could not modify syscall.StartProcess to return pidfd directly because it is a public API and its callers do not expect it, so we have to use ensurePidfd and getPidfd. 3. (*Process).Kill: use pidfdSendSignal, if available and the pidfd is known. Otherwise, fall back to the old implementation. 4. (*Process).Wait: use pidfdWait, if available, otherwise fall back to using waitid/wait4. This is more complicated than expected due to struct siginfo_t idiosyncrasy. NOTE pidfdSendSignal and pidfdWait are used without a race workaround (blockUntilWaitable and sigMu, added by CL 23967) because with pidfd, PID recycle issue doesn't exist (IOW, pidfd, unlike PID, is guaranteed to refer to one particular process) and thus the race doesn't exist either. Rework of CL 528438 (reverted in CL 566477 because of #65857). For #62654. Updates #13987. Change-Id: If5ef8920bd8619dc428b6282ffe4fb8c258ca224 Reviewed-on: https://go-review.googlesource.com/c/go/+/570036 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Cherry Mui <cherryyz@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
44 hourscmd/go: unexport loadImportqiulaidongfeng
Complete a TODO. Change-Id: I39869df4d95a5a5f6019e281719b942fbf4ba7db GitHub-Last-Rev: c664b5332e4f0afc84ae9bf1f91c0664903ebb7e GitHub-Pull-Request: golang/go#67091 Reviewed-on: https://go-review.googlesource.com/c/go/+/581939 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
45 hourscmd/compile: fix indentation level in generic.rulesJorropo
Change-Id: I60a9abe72f786e18a59339df271c5521d2d1cda2 Reviewed-on: https://go-review.googlesource.com/c/go/+/555155 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
46 hoursruntime: cleanup crashstack codeMauri de Souza Meneguzzo
This patch removes redundant guards for the crash stack feature, as all supported Go architectures now have a crash stack implementation. Change-Id: I7ffb61c57955778d687073418130b2aaab0ff183 GitHub-Last-Rev: 6ff56d6420093ee8f95c75019557dc8bcec32ed7 GitHub-Pull-Request: golang/go#67202 Reviewed-on: https://go-review.googlesource.com/c/go/+/583416 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
48 hourscmd/go: add go telemetry command and GOTELEMETRY, GOTELEMETRYDIRMichael Matloob
Add the go telemetry command to support setting and viewing the telemetry mode. Also add the non-settable GOTELEMETRY and GOTELEMETRYDIR variables to go env, which contain the mode and telemetry dir. For #67111 Change-Id: Id7e89cefe30acfe3d865fa467315fe7cda975de9 Reviewed-on: https://go-review.googlesource.com/c/go/+/584535 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2 daysgo/types, types2: report error for floating-point iteration variableRobert Griesemer
While at it, slightly improve documentation and code. Also, add additional test cases for #66561. Updates #66561. Fixes #67027. Change-Id: I682b0e9227e065d6bbd199871c2e1ecff13edc66 Reviewed-on: https://go-review.googlesource.com/c/go/+/580937 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
2 daysnet/http: add Pattern field in Request to return matched pattern infoChen.Zhidong
Fixes #66405 Change-Id: Icd80944b6ca081aa7addd4fb85d2b3c29b6c9542 GitHub-Last-Rev: c6e32742c4b733230c82627571b423de45997c24 GitHub-Pull-Request: golang/go#66618 Reviewed-on: https://go-review.googlesource.com/c/go/+/574997 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2 dayscrypto/tls: don't call tlsrsakex.IncNonDefault with FIPSMike Beaumont
We haven't called tlsrsakex.Value() yet at this point if we're using FIPS, like if CipherSuites != nil. This adds needFIPS as a gate next to CipherSuites != nil. FIPS specifies suites that would be skipped if tlsarsakex were set. Fixes #65991 Change-Id: I8070d8f43f27c04067490af8cc7ec5e787f2b9bd Reviewed-on: https://go-review.googlesource.com/c/go/+/582315 Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Bypass: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 dayscrypto/x509: fix certificate request creation with RSA-PSSYoann Congal
In case of a RSA-PSS algorithm, the hashFunc of CreateCertificateRequest is embedded in a rsa.PSSOptions struct. Given to key.Sign(), this will generate a proper RSA-PSS signature. Pasted from the RSA-PSS handling code in CreateCertificate(). Fixes #45990 Fixes #65074 Change-Id: I8475afa79d8add107f092cc2871d38300e7b3903 GitHub-Last-Rev: 63fb0214c3b03a18e184562a9510145ea817bc20 GitHub-Pull-Request: golang/go#55153 Reviewed-on: https://go-review.googlesource.com/c/go/+/431916 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Bypass: Filippo Valsorda <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Alex Scheel <alex.scheel@hashicorp.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2 daysnet: fix typo in ctrlCtxFn parameter nameTobias Klauser
context.Context parameters are commonly named ctx, not cxt. Change-Id: Icaadbcd38b054694959e5e8a058552a3e54be6d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/586016 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
2 dayscrypto: use byteorder to simplify consumeUint32 and consumeUint64apocelipes
A follow-up for the recent CL 585017. Change-Id: I9faaff7fdf62fc931fc7f64dbe238de277280730 GitHub-Last-Rev: 468d60c3960751c1eec81c6ef1a57ab9e32f2eb8 GitHub-Pull-Request: golang/go#67425 Reviewed-on: https://go-review.googlesource.com/c/go/+/586035 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2 daysgo/ast: fix bug handling the result of yield in PreorderRob Findley
Once yield returns false, ast.Preorder must not call yield on any more nodes. Even after the function passed to ast.Inspect returns false, it may be invoked again with a non-nil node. Therefore, we must explicitly truncate the inspection. For #66339 Change-Id: I2b01e4e96a2d7aca785467c15ab59da13208c161 Reviewed-on: https://go-review.googlesource.com/c/go/+/585520 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2 dayslog/slog: handle times with undefined UnixNanosJonathan Amsterdam
slog tries to represent a time.Time without allocations, which involves storing its UnixNanos value. But UnixNanos is undefined for some valid times. Provide a fallback representation for those times by storing them in the `any` field of `Value`. Fixes #65902. Change-Id: I736c739a92f77d7b1122ea0831524acdd2c4703f Reviewed-on: https://go-review.googlesource.com/c/go/+/585519 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
2 daysnet/http: simplify HTTP/1 request cancelationDamien Neil
HTTP requests have three separate user cancelation signals: Transport.CancelRequest Request.Cancel Request.Context() In addition, a request can be canceled due to errors. The Transport keeps a map of all in-flight requests, with an associated func to run if CancelRequest is called. Confusingly, this func is *not* run if Request.Cancel is closed or the request context expires. The map of in-flight requests is also used to communicate between roundTrip and readLoop. In particular, if readLoop reads a response immediately followed by an EOF, it may send racing signals to roundTrip: The connection has closed, but also there is a response available. This race is resolved by readLoop communicating through the request map that this request has successfully completed. This CL refactors all of this. In-flight requests now have a context which is canceled when any of the above cancelation events occurs. The map of requests to cancel funcs remains, but is used strictly for implementing Transport.CancelRequest. It is not used to communicate information about the state of a request. Change-Id: Ie157edc0ce35f719866a0a2cb0e70514fd119ff8 Reviewed-on: https://go-review.googlesource.com/c/go/+/546676 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2 daysarchive/zip: treat truncated EOCDR comment as an errorDamien Neil
When scanning for an end of central directory record, treat an EOCDR signature with a record containing a truncated comment as an error. Previously, we would skip over the invalid record and look for another one. Other implementations do not do this (they either consider this a hard error, or just ignore the truncated comment). This parser misalignment allowed presenting entirely different archive contents to Go programs and other zip decoders. Fixes #66869 Change-Id: I94e5cb028534bb5704588b8af27f1e22ea49c7c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/585397 Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2 dayscmd/go/internal/envcmd: fix showing GODEBUG env valueMichael Matloob
It was accidently dropped in CL 563137 For #34208 Change-Id: I0aea93fda6260f07bc662dea92d1eabb26f82ca0 Reviewed-on: https://go-review.googlesource.com/c/go/+/586095 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
2 daysruntime/debug: eliminate temporary variadicity from SetCrashOutputAlan Donovan
Updates #67182 Change-Id: I33fc8c515f4a9d120262ba30f61aea80ede5e9f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/585420 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com>
2 dayscmd/go: add -changed to query for non-defaults in the envqiulaidongfeng
Fixes #34208 Change-Id: I8ec2d96262dcd7cbf870f6173690143c54190722 GitHub-Last-Rev: 6543df4784cff1ba5751dc9885ef502e69679118 GitHub-Pull-Request: golang/go#65655 Reviewed-on: https://go-review.googlesource.com/c/go/+/563137 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
2 dayscmd/vendor/golang.org/x/telemetry: update to 9ff3ad9Alan Donovan
Updates #67182 Change-Id: I76b312ccbd1ea98eb2f4e3beec9e8b42e633ea5b Reviewed-on: https://go-review.googlesource.com/c/go/+/585819 Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
3 dayscrypto/x509: add text and binary marshal methods to OIDMateusz Poliwczak
Fixes #66249 Change-Id: I5973a19a087a35ad951e8a220d3e6e4456c7577f GitHub-Last-Rev: 921ca8bd0c08687bb727dbfb0890c3355eebe95b GitHub-Pull-Request: golang/go#66599 Reviewed-on: https://go-review.googlesource.com/c/go/+/575295 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org>
3 daysmath/rand/v2: use max builtin in testsTobias Klauser
Change-Id: I6d0050319c66fb62c817206e646e1a9449dc444c Reviewed-on: https://go-review.googlesource.com/c/go/+/585715 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com>
3 daysruntime: always update stack bounds on cgocallbackMichael Pratt
callbackUpdateSystemStack contains a fast path to exit early without update if SP is already within the g0.stack bounds. This is not safe, as a subsequent call may have new stack bounds that only partially overlap the old stack bounds. In this case it is possible to see an SP that is in the old stack bounds, but very close to the bottom of the bounds due to the partial overlap. In that case we're very likely to "run out" of space on the system stack. We only need to do this on extra Ms, as normal Ms have precise bounds defined when we allocated the stack. TSAN annotations are added to x_cgo_getstackbounds because bounds is a pointer into the Go stack. The stack can be reused when an old thread exits and a new thread starts, but TSAN can't see the synchronization there. This isn't a new case, but we are now calling more often. Fixes #62440. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Change-Id: I5389050494987b7668d0b317fb92f85e61d798ac Reviewed-on: https://go-review.googlesource.com/c/go/+/584597 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
3 dayscmd/go/internal/script: Fix build tags of isETXTBSYHiroaki Nakamura
syscall.ETXTBSY is only meaningful on Unix platforms, not on Windows. Fixes #67356 Change-Id: I1b13292d821d61d820b396e08be9a4dd1683e843 Reviewed-on: https://go-review.googlesource.com/c/go/+/585695 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
3 daysnet/http, reflect: rename Test function namesJes Cok
To be consistent with other tests. Change-Id: Ibea1d3bf57a295f024e05173d17112ce46a4f0bc Reviewed-on: https://go-review.googlesource.com/c/go/+/585895 Reviewed-by: Ian Lance Taylor <iant@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> Auto-Submit: Ian Lance Taylor <iant@google.com>
3 dayscmd/go: don't start upload until after toolchain selectionMichael Matloob
Run telemetry.Start (without the upload) first thing so we can increment counters in toolchain selection. Then run telemetry.StartWithUpload after toolchain selection so we don't start the upload until after toolchain selection has happened so we don't start something heavyweight before selection. Change-Id: Ia8979175a163265c3e29f6cb11a4ada4714d1d95 Reviewed-on: https://go-review.googlesource.com/c/go/+/585419 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
3 daysgo/ast: add Preorder go1.23 iteratorAlan Donovan
This CL adds a new function Preorder that makes it easier to iterate over the nodes of a syntax tree. In particular, break, continue, and return retain their usual continuations. Fixes #66339 Change-Id: I438b3c23780c91ed589871ad3b8822d54e8fabc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/570680 Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
3 daysgo/types, types2: factor out type parameter access into genericTypeRobert Griesemer
Also, remove types2.Signature.SetTypeParams as it is not used and does not exist in go/types. Change-Id: I16c3ae988988d3735907e9c6c56e8626497ea405 Reviewed-on: https://go-review.googlesource.com/c/go/+/581817 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
3 daysgo/types, types2: add Alias.{TypeParams, SetTypeParams, TypeArgs, Origin}Robert Griesemer
Fixes #67143. Change-Id: I8bf9c2559f95d3d6a40874454208ae074b68875c Reviewed-on: https://go-review.googlesource.com/c/go/+/583757 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@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>
3 dayscmd/vendor/golang.org/x/telemetry: update to ac8fed8Alan Donovan
Updates #67182 Change-Id: I14f6a35491e3a58fff2f33285bd13ac706668df6 Reviewed-on: https://go-review.googlesource.com/c/go/+/585818 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com>
3 daysruntime/debug: add SetCrashOutput(...CrashOptions) parameterAlan Donovan
This is a placeholder for future options (e.g. JSON). The parameter is temporarily variadic to avoid breaking x/telemetry (see CL 585378), but I plan to remove the "..." later this week. Updates #67182 Change-Id: I3f6f39455d852f92902f8e3f007d3093cbe555db Reviewed-on: https://go-review.googlesource.com/c/go/+/585557 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com>
3 daysgo/types, types2: add additional documentation for UnderlyingRob Findley
The concept of an underlying type has become more complicated with the addition of TypeParam and Alias types. Update the documentation to clarify that it strips off Named, TypeParam, and Alias types, and to reference the spec. Fixes #65774 Change-Id: I40a8efe15b45591b95068acbf4ef9eae17a4cef1 Reviewed-on: https://go-review.googlesource.com/c/go/+/585456 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Findley <rfindley@google.com>
3 dayscmd/link: disallow pull-only linknamesCherry Mui
As mentioned in CL 584598, linkname is a mechanism that, when abused, can break API integrity and even safety of Go programs. CL 584598 is a first step to restrict the use of linknames, by implementing a blocklist. This CL takes a step further, tightening up the restriction by allowing linkname references ("pull") only when the definition side explicitly opts into it, by having a linkname on the definition (possibly to itself). This way, it is at least clear on the definition side that the symbol, despite being unexported, is accessed outside of the package. Unexported symbols without linkname can now be actually private. This is similar to the symbol visibility rule used by gccgo for years (which defines unexported non-linknamed symbols as C static symbols). As there can be pull-only linknames in the wild that may be broken by this change, we currently only enforce this rule for symbols defined in the standard library. Push linknames are added in the standard library to allow things build. Linkname references to external (non-Go) symbols are still allowed, as their visibility is controlled by the C symbol visibility rules and enforced by the C (static or dynamic) linker. Assembly symbols are treated similar to linknamed symbols. This is controlled by -checklinkname linker flag, currently not enabled by default. A follow-up CL will enable it by default. Change-Id: I07344f5c7a02124dbbef0fbc8fec3b666a4b2b0e Reviewed-on: https://go-review.googlesource.com/c/go/+/585358 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
3 dayscmd/compile: disallow linkname referring to instantiationsCherry Mui
Linknaming an instantiated generic symbol isn't particularly useful: it doesn't guarantee the instantiation exists, and the instantiated symbol name may be subject to change. Checked with a large code corpus, currently there is no occurrance of linkname to an instantiated generic symbol (or symbol with a bracket in its name). This also suggests that it is not very useful. Linkname is already an unsafe mechanism. We don't need to allow it to do more unsafe things without justification. Change-Id: Ifaa20c98166b28a9d7dc3290c013c2b5bb7682e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/585458 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>