This ensures the trace buffers are as up-to-date as possible right
before crashing. It increases the chance of finding the culprit for the
crash when looking at core dumps, e.g. if slowness is the cause for the
crash (monitor kills process).
Fixes#65319.
Change-Id: Iaf5551911b3b3b01ba65cb8749cf62a411e02d9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/562616
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
UDP messages may be truncated:
https://www.rfc-editor.org/rfc/rfc1035#section-4.2.1
> Messages carried by UDP are restricted to 512 bytes (not counting
> the IP or UDP headers). Longer messages are truncated and the TC
> bit is set in the header.
However, TCP also have a size limitation of 65535 bytes
https://www.rfc-editor.org/rfc/rfc1035#section-4.2.2
> The message is prefixed with a two byte length field which gives
the message length, excluding the two byte length field.
These limitations makes that the maximum possible number of A records
per RRSet is ~ 4090.
There are environments like Kubernetes that may have larger number of
records (5000+) that does not fit in a single message. In this cases,
the DNS server sets the Truncated bit on the message to indicate that
it could not send the full answer despite is using TCP.
We should only retry when the TC bit is set and the connection is UDP,
otherwise, we'll never being able to get an answer and the client will
receive an errNoAnswerFromDNSServer, that is a different behavior than
the existing in the glibc resolver, that returns all the existing
addresses in the TCP truncated response.
Fixes#64896
Signed-off-by: Antonio Ojea <aojea@google.com>
Change-Id: I1bc2c85f67668765fa60b5c0378c9e1e1756dff2
Reviewed-on: https://go-review.googlesource.com/c/go/+/552418
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Gudger <ian@iangudger.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Make C_S32CON, C_U32CON, and C_32CON distinct classifiers to allow
more specific matching of 32 bit constants. C_U31CON is added to
support C_S32CON.
Likewise, add C_16CON which is the union of C_S16CON and C_U16CON
classification. This wil allow simplifying MOVD/MOVW optab entries
in a future patch.
Change-Id: I193acc0ded8f3edd91d306e39c3e7e55a9811e04
Reviewed-on: https://go-review.googlesource.com/c/go/+/562346
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This would have caught #65607.
On my machine:
internal/trace/v2: ~13s
internal/trace/v2: -short: ~4s
internal/trace/v2: -race -short: ~20s
internal/trace/v2: -race: ~46s
For #65607.
Change-Id: I03a555ebaf8c761c98a82b6d35fa16d7a99aa9e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/562998
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Multiple goroutines all writing to the same sink triggers the race detector,
rightfully so.
Change-Id: Ia64836d0d88c0f587a6cb96ed747f656a3c1804a
Reviewed-on: https://go-review.googlesource.com/c/go/+/562997
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
traceReadCPU calls profBuf.read, which does a raceacquire. g0 does not
have a race context, so this crashes when running on the system stack.
We could borrow a race context, but it is simpler to just move
traceReadCPU off of the system stack.
Fixes#65607.
Change-Id: I335155b96d683aebb92b2f4e1eea063dd139f2d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/562996
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
PGO uses noder.LookupFunc to look for devirtualization targets in
export data. LookupFunc does not support type-parameterized
functions, and will currently fail the build when attempting to lookup
a type-parameterized function because objIdx is passed the wrong
number of type arguments.
This doesn't usually come up, as a PGO profile will report a generic
function with a symbol name like Func[.go.shape.foo]. In export data,
this is just Func, so when we do LookupFunc("Func[.go.shape.foo]")
lookup simply fails because the name doesn't exist.
However, if Func is not generic when the profile is collected, but the
source has since changed to make Func generic, then LookupFunc("Func")
will find the object successfully, only to fail the build because we
failed to provide type arguments.
Handle this with a objIdxMayFail, which allows graceful failure if the
object requires type arguments.
Bumping the language version to 1.21 in pgo_devirtualize_test.go is
required for type inference of the uses of mult.MultFn in
cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go.
Fixes#65615.
Change-Id: I84d9344840b851182f5321b8f7a29a591221b29f
Reviewed-on: https://go-review.googlesource.com/c/go/+/562737
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pending a resolution to #65606, this CL marks clang's ASAN runtime as
unable to symbolize stack traces to unblock the LUCI clang builder.
For #65606.
Fixes#65469.
Change-Id: I649773085aff30e5703e7f7ac2c72a0430a015c2
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-clang15
Reviewed-on: https://go-review.googlesource.com/c/go/+/562675
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This CL separates the pass that computes inlinability from the pass
that performs inlinability. In particular, the latter can now happen
in any flat order, rather than bottom-up order. This also allows
inlining of calls exposed by devirtualization.
Change-Id: I389c0665fdc8288a6e25129a6744bfb1ace1eff7
Reviewed-on: https://go-review.googlesource.com/c/go/+/562319
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
To determine the identity of a goroutine for displaying in the trace UI,
we should use the root frame from a call stack. This will be the
starting function for the goroutine and is the same for each call stack
from a given goroutine. The new tracer no longer includes starting PCs
for goroutines which existed at the start of tracing, so we can't use a
PC for grouping together goroutines any more. Instead, we just use the
name of the entry function for grouping.
Fixes#65574
Change-Id: I5324653316f1acf0ab90c30680f181060ea45dd7
Reviewed-on: https://go-review.googlesource.com/c/go/+/562455
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Check for stringer on the key itself.
This is useful for locally defined context key types,
where there may be multiple instances of that type.
For example, see http.contextKey,
which can now be called after this change.
For the value itself, print the type at least
instead of just resorting to "<not stringer>".
Change-Id: I588ef1df34e90fb9ebd83cb180fea495e1fedaa8
Reviewed-on: https://go-review.googlesource.com/c/go/+/555697
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Change-Id: I13ed84b99459d5844abb6e932cc4b8e0bd3ae9f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/561215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
This allows to drop the use of deprecated rand.Seed in benchmarks.
Fixes#61142
Change-Id: I628848c0d4a500dc9a361930c393e47c3361a95c
Reviewed-on: https://go-review.googlesource.com/c/go/+/551155
Reviewed-by: Eli Bendersky <eliben@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Crash monitoring tools may parse the PC values and feed them
to CallersFrames, which does not run the inline unwinder, since
Callers already did so. So, the GOTRACEBACK=system output
must also include PC values even for inlined frames.
(The actual values are just marker NOP instructions,
but that isn't important.)
This CL also includes a test that the PC values can be
parsed out of the crash report and fed to CallersFrames
to yield a sensible result. (The logic is a distillation
of the x/telemetry crashmonitor.)
The previously printed PCs were in fact slightly wrong
for frames containing inlined calls: instead of the
virtual CALL instruction (a NOP) to the first
inlined call, it would display the PC of the
CALL in the innermost inlined function.
Change-Id: I64a06771fc191ba16c1383b8139b714f4f299703
Reviewed-on: https://go-review.googlesource.com/c/go/+/561635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
For #58894,#65586
This is a revert of CL 560655 which was a revert of CL 559519.
CL 559519 was reverted because it was broken on windows/386. But now
CL 562715 pulls in x/telemetry CL 560462 which disables telemetry on
windows/386, fixing that issue.
Change-Id: I094e90c28bca02f2303807d3b008f2ef9d59433c
Reviewed-on: https://go-review.googlesource.com/c/go/+/562735
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This change was produced with
go get golang.org/x/telemetry@latest
go mod tidy
go mod vendor
For golang/go#65586,golang/go#58894
Change-Id: I631a424ebb726fb0999d4b5d1e6e7a288b475344
Cq-Include-Trybots: luci.golang.try:gotip-windows-386,gotip-windows-amd64-longtest,gotip-solaris-amd64,gotip-openbsd-amd64,gotip-wasip1-wasm_wazero,gotip-js-wasm
Reviewed-on: https://go-review.googlesource.com/c/go/+/562715
TryBot-Bypass: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>
Commit-Queue: Michael Matloob <matloob@golang.org>
Commands run (in both src and src/cmd):
go get golang.org/x/sys@latest
go mod tidy
go mod vendor
Change-Id: Ia041258c71ffb93428257b547411d359c62d9b70
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/562736
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This CL tries to make function procInst more exact,
also adds test cases, however, including tricky ones.
Change-Id: If421299fc84d136e56a25dba7a4919c4424702c8
GitHub-Last-Rev: b9a3192718
GitHub-Pull-Request: golang/go#64336
Reviewed-on: https://go-review.googlesource.com/c/go/+/544475
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@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This further reduces the differences between go/types and types2.
Change-Id: Ie651c13dd12ecf043b8be92655d48d1ce32d4c5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/562777
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This further reduces the differences between go/types and types2.
Change-Id: I5ed0f621e1d64cd65b6a3e8eaca9926a1ccb5794
Reviewed-on: https://go-review.googlesource.com/c/go/+/562776
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Be more strict in IsStandardPackage: before this change we'd just
check for the existence of the directory, but now we check to see that
there's at least one .go file in the directory.
Also update some comments in the modindex package to reflect the fact
that an IndexPackage might represent a directory that does not contain
any source files.
Fixes#65406
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I82f0c0e7bfcd5bb4df0195c4c8c7fc7c67fae53e
Reviewed-on: https://go-review.googlesource.com/c/go/+/561338
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
As CL 514596 and CL 514775 adds hardware implement of float
max/min, we should add codegen test for these two CL.
Change-Id: I347331032fe9f67a2e6fdb5d3cfe20203296b81c
Reviewed-on: https://go-review.googlesource.com/c/go/+/561295
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: M Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Fixes#65446
Change-Id: I08dc512fb1f0101eb8aac8767cdf582360699559
Reviewed-on: https://go-review.googlesource.com/c/go/+/562345
Reviewed-by: Eli Bendersky <eliben@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
We ignore the value anyhow.
Change-Id: I1b1db7831c42bf852652236212812fd5cf258530
Reviewed-on: https://go-review.googlesource.com/c/go/+/457439
Reviewed-by: Damien Neil <dneil@google.com>
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>
Most stacks share some frames, especially prefixes, and deduplicating
them can save significant amounts of memory.
This will be especially true when we convert traces from the old to the
new format. Here, all stacks exist in a single generation and will be
live together.
For busy traces, such as one of running Staticcheck on std, with CPU
profiling enabled, this change saves ~400 MiB of memory.
Change-Id: Ie676f628dd2715e1c6077747dd4e08acf3331e5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/557355
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The assembler treats C_SBRA and C_LBRA optab classes identically,
combine them into one class to reduce the number of optab classes.
Likewise, C_LBRAPIC is renamed to C_BRAPIC for consistency with
the above change.
Change-Id: I47000e7273cb8f89a4d0621d71433ccbfb7afb70
Reviewed-on: https://go-review.googlesource.com/c/go/+/557916
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: David Chase <drchase@google.com>
The runtime currently enables long path support process-wide by updating
the process environment block (PEB). It then tries to create a file
using a long path to check if the PEB update made any difference.
There hasn't been any report that the PEB update was not effective,
and the check itself is quite tricky, so it's time to remove it.
While here, linkname `runtime.canUseLongPaths` to a variable in
internal/syscall/windows instead of the os package so it is easier to
consume from other packages.
Change-Id: I549380b7f2c242dc4db20d5be603840282de69b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/536495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
\\.\con and CON need to be opened with GENERIC_READ access, else
CreateFile will fail with ERROR_INVALID_PARAMETER.
Special-case ERROR_INVALID_PARAMETER in os.[L]Stat so it retries with
GENERIC_READ access.
Fixes#34900.
Change-Id: I5010e736d0189c8ada4fc0eca98d71a438c41426
Reviewed-on: https://go-review.googlesource.com/c/go/+/560755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
This reverts commit 29746b4814.
Reason for revert: Windows builders are flaky since this CL. Needs investigation. See https://build.golang.org/log/70d5d039b57b505870c9cc4e61de320df06a6f3a.
Change-Id: I8a5874bb057785497d03b9450819578de7faeb47
Reviewed-on: https://go-review.googlesource.com/c/go/+/561276
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Now that the development of the Go 1.22 release is almost done, its
release notes are moved to their eventual long-term home in x/website
in CL 562195. Delete the initial development copy here.
Change-Id: Ic8e44ee5d95ff121f96a53f6093fd8764abea004
Reviewed-on: https://go-review.googlesource.com/c/go/+/562155
Auto-Submit: David Chase <drchase@google.com>
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>
While at it, set the date to the Go 1.22 release date.
Change-Id: I03872626e500433eb63786d24c67810c8c6289f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/562337
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Because methods associated with named types are in the
same package as the type, when looking up a method we
don't need to check the package repeatedly.
Rename the global lookupMethod function to methodIndex,
to match the corresponding fieldIndex function (cleanup).
Implement Named.methodIndex, optimized for method lookup
on named types (optimization).
Adjust call sites.
Change-Id: Ifa05306126773262b1af3ce73365b5742b470eb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/562297
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
This CL improves the error messages reported when a field or method
name is used that doesn't exist. It brings the error messges on par
(or better) with the respective errors reported before Go 1.18 (i.e.
before switching to the new type checker):
Make case distinctions based on whether a field/method is exported
and how it is spelled. Factor out that logic into a new function
(lookupError) in a new file (errsupport.go), which is generated for
go/types. Use lookupError when reporting selector lookup errors
and missing struct field keys.
Add a comprehensive set of tests (lookup2.go) and spot tests for
the two cases brought up by the issue at hand.
Adjusted existing tests as needed.
Fixes#49736.
Change-Id: I2f439948dcd12f9bd1a258367862d8ff96e32305
Reviewed-on: https://go-review.googlesource.com/c/go/+/560055
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Runinng 'go build' writes the binary in a separate process, so avoids
the race described in #22315. However, the script engine's 'cp'
command currently executes in-process, so it does not avoid that bug
and may retain stale file descriptors when running tests in parallel.
Avoid the race in this particular test by giving the final binary
location in the '-o' argument instead of copying it there after the
fact.
Fixes#64019.
Change-Id: I96d276f33c09e39f465e9877356f1d8f2ae55062
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/560415
Auto-Submit: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Clarify the section in the "go" command notes that deals with the
changes to "go test -cover" for packages without tests, adding a note
that if a package has not tests and no executable code, you still get
a "package has no test files" diagnostic.
Fixes#65262.
Change-Id: Ie960871f9d5c1a1965090738644eace28fc3e156
Reviewed-on: https://go-review.googlesource.com/c/go/+/561337
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>
Reviewed-by: Chris Hines <chris.cs.guy@gmail.com>
Make a copy of the argument File's FileHeader, and pass a pointer
to the copy to CreateRaw.
Passing the pointer directly causes the entire `File` to be referenced
by the receiver. The `File` includes a reference to the `ReaderAt`
underlying the `Reader`, so all its memory, which may be the entire
contents of the archive, is prevented from being garbage-collected.
Also, explain the issue in the doc comment for CreateRaw. We
cannot change its behavior because someone may depend on the
preserving the identity of its argument pointer.
For #65499.
Change-Id: Ieb4963a0ea30539d597547d3511accbd8c6b5c5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/560238
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Change-Id: I3003968d9d7e543c25d4b0ab1d1cd924a1efd3ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/561456
Auto-Submit: Jonathan Amsterdam <jba@google.com>
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>
If we do know whether we need a type or not, make use of the
information when we know that we don't have a type and bail out.
Fixes the issue at hand and also improves some other error messages
which now report that we don't have a type instead of reporting a cycle.
For #65344.
Change-Id: I11182efd452c485d89e6c09ead8a647ea05d7318
Reviewed-on: https://go-review.googlesource.com/c/go/+/559335
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>