- 20 Dec, 2019 5 commits
-
-
Ian Lance Taylor authored
The test for issue 8945 was marked to only run on gccgo, but there was no reason for that. It broke for gccgo using GCC 10, because GCC 10 defaults to -fno-common. Make the test run on gc, and split it into test.go and testx.go to make it work with GCC 10. The test for issue 9026 used two identical structs which GCC 10 turns into the same type. The point of the test is not that the structs are identical, but that they are handled in a particular order. So make them different. Updates #8945 Updates #9026 Change-Id: I000fb02f88f346cfbbe5dbefedd944a2c64e8d8e Reviewed-on: https://go-review.googlesource.com/c/go/+/211217 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
-
Dan Scales authored
nanotime1 and walltime1 do not preserve BP on linux amd64. Previously, this did not cause a problem, because nanotime/walltime do preserve the BP. But now with mid-stack inlining, nanotime/walltime are usually inlined, so BP is not preserved. So, the BP is now wrong in any function after a call to nanotime()/walltime() on amd64. That means the frame pointer on the stack can be wrong for any further function call made after the nanotime() call (notably runtime.main and various GC functions). [386 doesn't use framepointer.] Fix is to set a frame size of 8 for nanotime1 and walltime1, which means the standard prolog/epilog that saves/restore BP in the stack frame is added. I noticed this while investigating issue 16638 (use frame pointers for runtime.Callers). This change would needed for progress on that issue (which doesn't have a high priority). Verified that this fix works/is useful for issue 16638. Change-Id: I19e19ef2c1a517d737a34928baae034f2eb0b2c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/212079 Run-TryBot: Dan Scales <danscales@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Bryan C. Mills authored
The documentation for RecentTag indicates that it returns an actual tag, not a canonicalized prefix+version blob equivalent to a tag, so the canonicalization due to semver.Max seems like a bug here. Fortunately, RecentTag is not currently ever actually used as a tag, so the removal of metadata does not result in a user-facing bug. Nonetheless, it may be a subtle source of confusion for maintainers in the future. Updates #32700 Change-Id: I525423c1c0c7ec7c36c09e53b180034474f74e5a Reviewed-on: https://go-review.googlesource.com/c/go/+/212202 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Bryan C. Mills authored
I noticed the missing diagnostic when writing a regression test for #33795. Change-Id: Ic3249436a6109d71f9ff720b7096f9b872f6a94b Reviewed-on: https://go-review.googlesource.com/c/go/+/212201 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Bryan C. Mills authored
Updates #32700 Fixes #33795 Change-Id: I16897a0a2f3aa2f0b0bf8cf8252f3f39eef2e7ba Reviewed-on: https://go-review.googlesource.com/c/go/+/212200 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 19 Dec, 2019 5 commits
-
-
Bryan C. Mills authored
The 'go' command normally requires the 'go.mod' files for replacement modules to have a major version compatible with the module they are replacing. However, prior to CL 206761, the 'go' command erroneously allowed unversioned paths (which imply major version 0 or 1) to replace 'gopkg.in' paths with any major-version suffix. An analysis of proxy.golang.org suggests that these replacements, while uncommon, are not unheard-of. Rather than breaking the modules that rely on them, we will continue to allow the erroneous replacement paths for this particular pairing. Updates #34254 Change-Id: Icb4e745981803edaa96060f17a8720a058219ab1 Reviewed-on: https://go-review.googlesource.com/c/go/+/212105 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Jay Conrod authored
When the -modfile flag is in use (either explicitly or from GOFLAGS), 'go list -m' will now print the effective go.mod file for the main module in the GoMod field in -f or -json output. Fixes #36220 Updates #34506 Change-Id: I89c2ee40f20e07854bb37c6e4e13eeea0cce7b0d Reviewed-on: https://go-review.googlesource.com/c/go/+/212100 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Bryan C. Mills authored
Fixes #29100 Change-Id: I195191aad825266ab55d38addef9d662cfc72dff Reviewed-on: https://go-review.googlesource.com/c/go/+/212099 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Daniel Martí authored
The recently added slice function used indirectInterface, but then forgot to actually call reflect.Value.Slice on its result. Calling the Slice method on the original Value without indirectInterface would result in a panic, if our slice was indeed behind an interface. Fix that, and add test cases for all three built-in functions that work with slices. Fixes #36199. Change-Id: I9a18f4f604a3b29967eefeb573f8960000936b88 Reviewed-on: https://go-review.googlesource.com/c/go/+/211877 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
Fixes #36190 Fixes #36191 Change-Id: I1213ef37b6595af63dbe202a8ade65741caf1356 Reviewed-on: https://go-review.googlesource.com/c/go/+/212001Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 18 Dec, 2019 3 commits
-
-
Cherry Zhang authored
We don't asynchronously preempt if we are in the runtime. We do this by checking the function name. However, it failed to take inlining into account. If a runtime function gets inlined into a non-runtime function, it can be preempted, and bad things can happen. One instance of this is dounlockOSThread inlined into UnlockOSThread which is in turn inlined into a non-runtime function. Fix this by using the innermost frame's function name. Change-Id: Ifa036ce1320700aaaefd829b4bee0d04d05c395d Reviewed-on: https://go-review.googlesource.com/c/go/+/211978 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Austin Clements authored
Change-Id: I9519659983de23f43ff0e05cffd336d8bc351400 Reviewed-on: https://go-review.googlesource.com/c/go/+/211758Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Alexander Rakoczy <alex@golang.org>
-
Gert Cuykens authored
Inconsistency between cmd/doc/main.go and cmd/go/internal/doc/doc.go Fixes #34976 Change-Id: I429200f9305d473edb4505216bb4840ba92af818 Reviewed-on: https://go-review.googlesource.com/c/go/+/201857 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
- 17 Dec, 2019 5 commits
-
-
Bryan C. Mills authored
Fixes #36169 Change-Id: Ib9a53fdb0112635b53be38d6818834dd1775e70c Reviewed-on: https://go-review.googlesource.com/c/go/+/211698 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Michael Matloob authored
This makes the check the same as the one in the tests vet check. It's safer to check the number of arguments rather than for a nil slice. Change-Id: I8e04e9c612573f334770c1c4245238649656c6e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/211598 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Bryan C. Mills authored
Fixes #36168 Change-Id: If2b7368671e83657a3a74dd030e66e7c68bf2361 Reviewed-on: https://go-review.googlesource.com/c/go/+/211657Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Oliver Powell authored
The comment "If the name is the name of this template, overwrite this template." is incorrect and should be "is not" instead. This comment is no longer required once the docs are updated to mention this behaviour instead. Fixes #34695 Change-Id: I773495b2194d7bb7619b13c1a28cbc76e8f69aac Reviewed-on: https://go-review.googlesource.com/c/go/+/199139Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
Fixes #35627 Change-Id: I0c5fed46a69a9663e46a9414468ec610063ea05a Reviewed-on: https://go-review.googlesource.com/c/go/+/207849Reviewed-by: Rob Pike <r@golang.org>
-
- 16 Dec, 2019 4 commits
-
-
Dmitri Shuralyov authored
This page has moved to the x/website repo in CL 211300 (commit golang/website@3c8b7f99cadaa000e642595d0fabcd9ac496f335). Remove the old copy in this repo since it's no longer used. Updates #29206 Change-Id: I8b3396d9e42d1e7262a8cde9577962d33b215836 Reviewed-on: https://go-review.googlesource.com/c/go/+/211301Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Alexander Rakoczy authored
Change-Id: I14b1a21a8639b3241326e74ab6152673d5d71243 Reviewed-on: https://go-review.googlesource.com/c/go/+/211517 Run-TryBot: Alexander Rakoczy <alex@golang.org> Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
Jason A. Donenfeld authored
Systems where PowerRegisterSuspendResumeNotification returns ERROR_ FILE_NOT_FOUND are also systems where nanotime() is on "program time" rather than "real time". The chain for this is: powrprof.dll!PowerRegisterSuspendResumeNotification -> umpdc.dll!PdcPortOpen -> ntdll.dll!ZwAlpcConnectPort("\\PdcPort") -> syscall -> ntoskrnl.exe!AlpcpConnectPort Opening \\.\PdcPort fails with STATUS_OBJECT_NAME_NOT_FOUND when pdc.sys hasn't been initialized. Pdc.sys also provides the various hooks for sleep resumption events, which means if it's not loaded, then our "real time" timer is actually on "program time". Finally STATUS_OBJECT_NAME_ NOT_FOUND is passed through RtlNtStatusToDosError, which returns ERROR_ FILE_NOT_FOUND. Therefore, in the case where the function returns ERROR_ FILE_NOT_FOUND, we don't mind, since the timer we're using will correspond fine with the lack of sleep resumption notifications. This applies, for example, to Docker users. Fixes #35447 Fixes #35482 Change-Id: I9e1ce5bbc54b9da55ff7a3918b5da28112647eee Reviewed-on: https://go-review.googlesource.com/c/go/+/208317Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Matloob authored
An Example function with arguments is not a valid example to be run with go test. Don't return those functions from Examples. This means that some functions that were previously showing up in Examples will no longer show up. But those functions were not being tested properly so the fact that they were showing up is misleading. This fixes an issue where a confusing compiler error was showing up when running go test on a file with an invalid example. While that issue could have been fixed by returning an error, this is more consistent with the behavior of go/doc.Examples, and the tests checker in vet will catch this issue. Fixes #35284 Change-Id: I2101a7d19f38522ef9c2e50967f9cfb30d28c730 Reviewed-on: https://go-review.googlesource.com/c/go/+/211357 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
- 15 Dec, 2019 1 commit
-
-
Fazlul Shahriar authored
Fixes #35753 Change-Id: I38674c59c601785eb25b778dc25efdb92231dd9b Reviewed-on: https://go-review.googlesource.com/c/go/+/208223 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 13 Dec, 2019 4 commits
-
-
Alberto Donizetti authored
Since the word "regular" has a precise meaning in the context of formal languages, the Introduction sentence claiming that Go's grammar is "compact and regular" may mislead readers. Reword it using Rob's suggestion. Fixes #36037 Change-Id: I00c1a5714bdab8878d9a77b36d67dae67d63da0f Reviewed-on: https://go-review.googlesource.com/c/go/+/211277Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Jay Conrod authored
Updates #33637 Change-Id: If262d1501cf73b404361f832a2e3e17aaa0db78b Reviewed-on: https://go-review.googlesource.com/c/go/+/211299Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
Cherry Zhang authored
When growing the address ranges, the new length is the old length + 1. Fixes #36113. Change-Id: I1b425f78e473cfa3cbdfe6113e166663f41fc9f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/211157 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
-
Filippo Valsorda authored
The key had expired earlier this year. Simply resigned it with no expiration, so it maintains the same fingerprint. Removed the encouragement to use PGP above the fold. We trust the security of our mail system, so it's really only there for people that want it. Also removed the individual keys, as they were never used, and both Adam and I have access to the security@golang.org key anyway. Change-Id: Icc5ad6dfb4f0b52128a59a080b7f270b20d3c520 Reviewed-on: https://go-review.googlesource.com/c/go/+/211177Reviewed-by: Katie Hockman <katie@golang.org>
-
- 12 Dec, 2019 3 commits
-
-
Dan Scales authored
If the defer function pointer is nil, force the seg fault to happen in deferreturn rather than in jmpdefer. jmpdefer is used fairly infrequently now because most functions have open-coded defers. The open-coded defer implementation calls gentraceback() with a callback when looking for the first open-coded defer frame. gentraceback() throws an error if it is called with a callback on an LR architecture and jmpdefer is on the stack, because the stack trace can be incorrect in that case - see issue #8153. So, we want to make sure that we don't have a seg fault in jmpdefer. Fixes #36050 Change-Id: Ie25e6f015d8eb170b40248dedeb26a37b7f9b38d Reviewed-on: https://go-review.googlesource.com/c/go/+/210978Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ib37db42c7f1fd6aa55f70fd2d65d56bb2ae6d26a Reviewed-on: https://go-review.googlesource.com/c/go/+/211098Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Bryan C. Mills authored
This fixes a regression introduced in CL 209498, found while investigating #32471. Also fix $WORK replacement in cmd/go/internal/work.(*Builder).Showcmd when b.WorkDir includes a backslash and appears in a quoted string. That fix is needed in order to write a precise test that passes under Windows, since Windows directories nearly always include backslashes. Updates #35837 Change-Id: I5fddc5435d5d283a3e598989209d873b59b0a39c Reviewed-on: https://go-review.googlesource.com/c/go/+/210937 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
- 11 Dec, 2019 8 commits
-
-
Bryan C. Mills authored
This is a minimal fix for Go 1.14, but this parsing logic is much too complex and seems like it will cause more trouble going forward. I intend to mail a followup change to refactor this logic for 1.15. Updates #32471 Change-Id: I00ed07dcf3a23c9cd4ffa8cf764921fb5c18bcd6 Reviewed-on: https://go-review.googlesource.com/c/go/+/210940 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Michael Anthony Knyszek authored
Prior to this change, if the heap was very discontiguous (such as in TestArenaCollision) it's possible we could map a large amount of memory as R/W and commit it. We would use only the start and end to track what should be mapped, and we would extend that mapping as needed to accomodate a potentially fragmented address space. After this change, we only map exactly the part of the summary arrays that we need by using the inUse ranges from the previous change. This reduces the GCSys footprint of TestArenaCollision from 300 MiB to 18 MiB. Because summaries are no longer mapped contiguously, this means the scavenger can no longer iterate directly. This change also updates the scavenger to borrow ranges out of inUse and iterate over only the parts of the heap which are actually currently in use. This is both an optimization and necessary for correctness. Fixes #35514. Change-Id: I96bf0c73ed0d2d89a00202ece7b9d089a53bac90 Reviewed-on: https://go-review.googlesource.com/c/go/+/207758 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Cherry Zhang authored
The gccgo compiler did not generate type descriptor for a pointer to a type alias defined in another package, causing linking error. The fix is CL 210787. This CL adds a test. Updates #36085. Change-Id: I3237c7fedb4d92fb2dc610ee2b88087f96dc2a1a Reviewed-on: https://go-review.googlesource.com/c/go/+/210858 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Anthony Knyszek authored
This change adds a new inUse field to the allocator which tracks ranges of addresses that are owned by the heap. It is updated on each heap growth. These ranges are tracked in an array which is kept sorted. In practice this array shouldn't exceed its initial allocation except in rare cases and thus should be small (ideally exactly 1 element in size). In a hypothetical worst-case scenario wherein we have a 1 TiB heap and 4 MiB arenas (note that the address ranges will never be at a smaller granularity than an arena, since arenas are always allocated contiguously), inUse would use at most 4 MiB of memory if the heap mappings were completely discontiguous (highly unlikely) with an additional 2 MiB leaked from previous allocations. Furthermore, the copies that are done to keep the inUse array sorted will copy at most 4 MiB of memory in such a scenario, which, assuming a conservative copying rate of 5 GiB/s, amounts to about 800µs. However, note that in practice: 1) Most 64-bit platforms have 64 MiB arenas. 2) The copies should incur little-to-no page faults, meaning a copy rate closer to 25-50 GiB/s is expected. 3) Go heaps are almost always mostly contiguous. Updates #35514. Change-Id: I3ad07f1c2b5b9340acf59ecc3b9ae09e884814fe Reviewed-on: https://go-review.googlesource.com/c/go/+/207757 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Austin Clements <austin@google.com>
-
Bryan C. Mills authored
The use of a timeout in this test caused it to be flaky: if the timeout occurred before the connection was attempted, then the Accept call on the Listener could hang indefinitely, and its goroutine would not exit until that Listener was closed. That caused the test to fail. A longer timeout would make the test less flaky, but it would become even slower and would still be sensitive to timing. Instead, replace the timeout with an explicit Context cancellation after the CONNECT request has been read. That not only ensures that the cancellation occurs at the appropriate point, but also makes the test much faster: a test run with -count=1000 now executes in less than 2s on my machine, whereas before it took upwards of 50s. Fixes #36082 Updates #28012 Change-Id: I00c20d87365fd3d257774422f39d2acc8791febd Reviewed-on: https://go-review.googlesource.com/c/go/+/210857 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Andrew Stormont authored
The syscall_forkx function returns the value of errno even on success. This can be a problem when using cgo where an atfork handler might be registered; if the atfork handler does something which causes errno to be set the caller of syscall_forkx can be misled into thinking the fork has failed. This causes the various exec functions in the runtime package to hang. Change-Id: Ia1842179226078a0cbbea33d541aa1187dc47f68 GitHub-Last-Rev: 4dc4db75c82a826da9a50c323b7e3ddfe46ed6c0 GitHub-Pull-Request: golang/go#36076 Reviewed-on: https://go-review.googlesource.com/c/go/+/210742Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitri Shuralyov authored
These pages were moved to the x/website repo in CL 210797 (commit golang/website@9aef1eefbbe663d448b04b7cc1b2b995f4cf4c0b). Remove the old copies in this repo since they're no longer used. Updates #36075 Updates #29206 Change-Id: I6e3ffaebd92fa753cb5f3b21e4238edfb7f5f0e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/210798Reviewed-by: Alexander Rakoczy <alex@golang.org>
-
Lorenz Bauer authored
LsfSocket, SetLsfPromisc and NetlinkRIB currently don't force the CLOEXEC flag on the sockets they create. While the former two functions are deprecated, NetlinkRIB is called by various functions related to net.Interface. Add a helper to create CLOEXEC sockets, and use it from SetLsfPromisc and NetlinkRIB. LsfSocket is unchanged since we don't want to break callers. Fixes #36053 Change-Id: I72fe2b167996797698d8a44b0d28165045c42d3c Reviewed-on: https://go-review.googlesource.com/c/go/+/210517 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 10 Dec, 2019 2 commits
-
-
Tobias Klauser authored
Change-Id: Ie9d29645e7702104202ee1f338babdd9e33e1e58 Reviewed-on: https://go-review.googlesource.com/c/go/+/210679 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
vovapi authored
Change-Id: I2dd5ddc22bfff143b81d5945992d8c5fccf387f4 GitHub-Last-Rev: aa637756e772f5ee9094b802df3be9945c8466c4 GitHub-Pull-Request: golang/go#36054 Reviewed-on: https://go-review.googlesource.com/c/go/+/210497Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-