summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* syscall: use correct cmsg alignment for openbsd/armJoel Sing2018-12-131-6/+19
| | | | | | | | | | | The OpenBSD armv7 port requires 64-bit alignment for cmsgs. Rework the cmsg alignment code to facilitate this. Change-Id: I52cf55a8a4cda46c6ef35b0f694862b842028b42 Reviewed-on: https://go-review.googlesource.com/c/153837 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* strings: add ReplaceAll exampledupoxy2018-12-131-0/+6
| | | | | | | | | | Change-Id: I6b0d470bdedb92844943c8e5823e214d6a7471cf GitHub-Last-Rev: 4a135000ba9c23a588b960e5b2989710cc71e3e2 GitHub-Pull-Request: golang/go#29199 Reviewed-on: https://go-review.googlesource.com/c/153840 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* strings: revert accidental example change from CL 153840Brad Fitzpatrick2018-12-131-1/+1
| | | | | | | | Change-Id: I2ff29aa9909be3062fcd5f65af261f5d8c46fbc1 Reviewed-on: https://go-review.googlesource.com/c/153843 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* go/build: document when Context.BuildTags is used.Muhammad Falak R Wani2018-12-121-0/+1
| | | | | | | | | | | Context.BuildTags is not set when you read go/build.Default.BuildTags. It's only used by (*BuildTags).Import, etc. Fixes: #27320 Change-Id: I97e5f1923c410b48f70be8c15938a7e04a178e3f Reviewed-on: https://go-review.googlesource.com/c/131975 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* runtime: pass LR to sigprof on windows/armJordan Rhee2018-12-121-1/+1
| | | | | | | | | | | | | | TestCPUProfileLabel was failing on windows/arm because the link register was not being passed to sigprof(). The link register is required to generate a correct traceback. With this change, all tests in runtime.pprof are now passing. Updates #26148 Change-Id: Ia693b34278dc08a98023751ff1a922d9eee8fdd6 Reviewed-on: https://go-review.googlesource.com/c/153839 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/go: reject GOCACHE=off when the default cache is initializedBryan C. Mills2018-12-1210-163/+103
| | | | | | | | | | | | | | Allow GOCACHE=off only for operations that never actually write anything to the cache (in which case the GOCACHE setting should not matter at all). Fixes #29127 Change-Id: I733d02cd2fbcf3671f5adcfb73522865d131e360 Reviewed-on: https://go-review.googlesource.com/c/153462 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* go/internal/gccgoimporter: permit fixups for V2 export dataThan McIntosh2018-12-124-6/+127
| | | | | | | | | | | | | | | | | The changes added in https://golang.org/cl/151997 to fix problems when reading older export data introduced the ability to add "fixups" to handle references to a type whose definition has not yet been finalized. It turns out we need to allow for fixups even for more recent export data (V2 and V3); this patch removes a version guard for the fixup generation logic. Fixes #29198. Change-Id: I82136ac45b53e4a59c05ff0879ac6bb545d0ff31 Reviewed-on: https://go-review.googlesource.com/c/153821 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/go/internal/web2: log http requests with -vHana Kim2018-12-121-3/+5
| | | | | | | | | | | | | | It's similar to what cmd/go/internal/web package does when cfg.BuildV is set. The web2 package is what cmd/go/internal/modfetch uses, so this change allows us to trace web requests go get command in module mode sends for modfetch. Change-Id: If387efd8a8698c816bf267d1e6c6766fd357c298 Reviewed-on: https://go-review.googlesource.com/c/153640 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* syscall: update doc comment to match behavior for Proc.CallAndrew Bonventre2018-12-121-1/+1
| | | | | | | | | | golang.org/cl/147117 increased the number of arguments permitted by Proc.Call on Windows, but the doc comment was never updated. Change-Id: Iea5eb9e0aafbc1025d5fcb8665d028b2254c183a Reviewed-on: https://go-review.googlesource.com/c/153825 Reviewed-by: Channing Kimble-Brown <ckimblebrown@google.com> Reviewed-by: Andrew Bonventre <andybons@golang.org>
* cmd/go/internal/modfetch: skip symlinks in (*coderepo).ZipBryan C. Mills2018-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested manually. Before: $ go mod init golang.org/issue/scratch go: creating new go.mod: module golang.org/issue/scratch $ go1.11.2 mod download github.com/rogpeppe/test2@latest go: finding github.com/rogpeppe/test2 v0.0.11 $ find $GOPATH -name goodbye /tmp/tmp.Y8a8UzX3zD/_gopath/pkg/mod/github.com/rogpeppe/test2@v0.0.11/tests/goodbye $ cat $(find $GOPATH -name goodbye) hello After: $ go mod init golang.org/issue/scratch go: creating new go.mod: module golang.org/issue/scratch $ go mod download github.com/rogpeppe/test2@latest go: finding github.com/rogpeppe/test2 v0.0.11 $ find $GOPATH -name goodbye $ find $GOPATH -name hello /tmp/tmp.Zo0jhfLaRs/_gopath/pkg/mod/github.com/rogpeppe/test2@v0.0.11/tests/hello A proper regression test would require one of: • a new entry in the vcs-test server (feasible but tedious, and not easily updated by open-source contributors), or • a way to set up an HTTPS proxy in a script_test, or • a way to explicitly populate the module cache from the contents of a local repository (#28835). Fixes #27093 Updates #28835 Change-Id: I72702a7e791f8815965f0f87c82a30df4d6f0151 Reviewed-on: https://go-review.googlesource.com/c/153819 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go: reproduce #28680Bryan C. Mills2018-12-121-2/+38
| | | | | | | | | | | | | This change encodes the current behavior in mod_clean_cache.txt. A fix for that behavior will probably have to wait for 1.13. Updates #28680 Change-Id: I216b5a783971309cc75187502bddccc58c3a9c35 Reviewed-on: https://go-review.googlesource.com/c/153818 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go: retain sums for replacement modules in 'go mod tidy'Bryan C. Mills2018-12-122-1/+39
| | | | | | | | | | Fixes #27868 Change-Id: I6c2d221c4325a2f44625e797a82735d812ee0ec1 Reviewed-on: https://go-review.googlesource.com/c/153817 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/compile: don't combine load+op if the op has SymAddr argumentsKeith Randall2018-12-123-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | By combining the load+op, we may force the op to happen earlier in the store chain. That might force the SymAddr operation earlier, and in particular earlier than its corresponding VarDef. That leads to an invalid schedule, so avoid that. This is kind of a hack to work around the issue presented. I think the underlying problem, that LEAQ is not directly ordered with respect to its vardef, is the real problem. The benefit of this CL is that it fixes the immediate issue, is small, and obviously won't break anything. A real fix for this issue is much more invasive. The go binary is unchanged in size. This situation just doesn't occur very often. Fixes #28445 Change-Id: I13a765e13f075d5b6808a355ef3c43cdd7cd47b6 Reviewed-on: https://go-review.googlesource.com/c/153641 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
* doc/go1.12: release notes for testingJulie Qiu2018-12-121-5/+1
| | | | | | Change-Id: I81ffe7ee88354efeabb24f091db66c7c4892876c Reviewed-on: https://go-review.googlesource.com/c/152919 Reviewed-by: Andrew Bonventre <andybons@golang.org>
* cmd/go: link to the FAQ for errors that indicate private VCS repos.Julie Qiu2018-12-123-3/+22
| | | | | | | | | | | Updates #25982 Change-Id: I5a284e3844e944f9bfae31fa65b242060d4139c7 Reviewed-on: https://go-review.googlesource.com/c/150777 Run-TryBot: Julie Qiu <julie@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
* encoding/xml, encoding/json: docs and examples using custom marshalersLeigh McCulloch2018-12-125-0/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the encoding/xml and encoding/json packages support custom marshalers for JSON and XML, as well as the basic encoding.TextMarshaler and encoding.TextUnmarshaler interfaces, but the docs and examples for these are missing. There are docs for how to use encoding.TextMarshaler and encoding.TextUnmarshaler in encoding/json, but not encoding/xml. There are no examples for how to use them with either json or xml. This commit includes docs for encoding/xml and examples for both encoding/json and encoding/xml. There is an example using custom marshalers MarshalJSON and UnmarshalJSON in encoding/json, but not MarshalXML and UnmarshalXML in encoding/json. These docs are more so necessary for encoding/xml because the complexities of XML documents is significantly greater than JSON documents which more often leads to the need for custom marshaling. The encoding/json package includes an example of how to write a custom marshaler, and this commit includes the same example for the xml package. All examples are mirrored off the existing custom marshaler example in encoding/json. Fixes #6859 Change-Id: Ic93abc27c0b4d5e48dea6ede4e20b1bedca4ab39 Reviewed-on: https://go-review.googlesource.com/c/76350 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/compile: Avoid and filter out zero-length location-lists.David Chase2018-12-121-5/+12
| | | | | | | | | | | | | | | | This change avoids creating zero length location lists by repairing an overly aggressive change in CL146718 and by explicitly checking for and filtering out any zero-length lists that are detected (building compiler+runtime creates a single one). Updates #28486. Change-Id: I01c571fee2376474c7f3038e801bd58fd9e0b820 Reviewed-on: https://go-review.googlesource.com/c/150097 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
* go/format: add simple benchmark framework and basic benchmarkRobert Griesemer2018-12-121-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | For now, this CL adds as a first benchmark the formatting of a 10,000 element array literal. It is easy to add additional test cases as we see fit. name time/op Format/array1-10000-4 26.7ms ± 7% name speed Format/array1-10000-4 2.43MB/s ± 6% name alloc/op Format/array1-10000-4 5.52MB ± 0% name allocs/op Format/array1-10000-4 119k ± 0% Updates #26528. Change-Id: Ic8ec8f70160d122b877740412d4d4406f5f4b345 Reviewed-on: https://go-review.googlesource.com/c/153642 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* runtime/pprof: ignore cpu profile test failures on openbsd/armJoel Sing2018-12-121-0/+4
| | | | | | | | | | This test is currently too flakey on openbsd/arm - ignore failures for the time being. Change-Id: Ia334d188f505167e691177ebe2c7a2df54bf556a Reviewed-on: https://go-review.googlesource.com/c/153579 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
* syscall: regenerate ztypes for openbsd/armJoel Sing2018-12-122-25/+33
| | | | | | | | | | | | | | Regenerate ztypes for openbsd/arm - most of the changes relate to the OpenBSD armv7 port switching to EABI in September 2016. Also use signed char when generating openbsd/arm ztypes, to avoid inconsistencies between architectures impacting MI code. Change-Id: I9d2e19c1ac045922e270896861c830f94fc59c10 Reviewed-on: https://go-review.googlesource.com/c/153578 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* os: in RemoveAll, try Remove firstIan Lance Taylor2018-12-122-0/+34
| | | | | | | | | | | | Otherwise we can fail to remove a unreadable empty directory. Fixes #29178 Change-Id: I43d5c89fce57a86626abe2a1c2bbf145716e087b Reviewed-on: https://go-review.googlesource.com/c/153720 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* runtime/pprof: fix TestCPUProfileWithFork on Windows/ARMJordan Rhee2018-12-121-0/+4
| | | | | | | | | | | | | | Use smaller heap on Windows/ARM, which generally does not have page file enabled and therefore has limited virtual address space. Updates #26148 Signed-off-by: Jordan Rhee <jordanrh@microsoft.com> Change-Id: I4030be24a10fab7b9b659e3736b7e83f10710bfa Reviewed-on: https://go-review.googlesource.com/c/153719 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* runtime: fix profiling on windows/ARMJordan Rhee2018-12-123-55/+101
| | | | | | | | | | | | | | | | | Fix profiling handler to get the correct g for the m being profiled. Store a pointer to the TLS slot holding g in the thread's m. This enables the profiling handler to get the current g for the thread, even if the thread is executing external code or system code. Updates #26148 Signed-off-by: Jordan Rhee <jordanrh@microsoft.com> Change-Id: Ie061284c12341c76c7d96cc0c2d5bac969230829 Reviewed-on: https://go-review.googlesource.com/c/153718 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: set correct column for user-written codeIan Lance Taylor2018-12-123-7/+48
| | | | | | | | | | | | Take advantage of the new /*line*/ comments. Fixes #26745 Change-Id: I8098642e0f11f7418fe81b9a08dbe07671f930fe Reviewed-on: https://go-review.googlesource.com/c/151598 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
* cmd/go: fix 'go test' and 'go fmt' with files outside a moduleBryan C. Mills2018-12-117-32/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the actual loader result in findModule instead of making assumptions about nesting in the build list. As a side-effect, this produces much clearer error messages for packages that (for one reason or another) failed to load. Adjust the package and module path outside a module to "command-line-arguments". That string already appears in the output of a number of (module-mode and GOPATH-mode) commands for file arguments, and as far as I can tell operation outside a module is currently the only case in which the module path of a package is not actually a prefix of the import path. Fixes #28011 Fixes #27099 Fixes #28943 Updates #27102 Updates #28459 Updates #27063 Change-Id: I61d5556df7b1b7d1efdaffa892f0e3e95b612d87 Reviewed-on: https://go-review.googlesource.com/c/153459 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/go/internal/modfetch/codehost: return VCSError for unimplemented ↵Bryan C. Mills2018-12-112-14/+46
| | | | | | | | | | | | functions and malformed responses Updates #28943 Updates #26092 Change-Id: I07af2731ef5af046b9f7c7280ccb3976cdf41ca4 Reviewed-on: https://go-review.googlesource.com/c/153458 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
* cmd/compile: use innermost line number for -SKeith Randall2018-12-118-21/+40
| | | | | | | | | | | | | | | | | | | When functions are inlined, for instructions in the inlined body, does -S print the location of the call, or the location of the body? Right now, we do the former. I'd like to do the latter by default, it makes much more sense when reading disassembly. With mid-stack inlining enabled in more cases, this quandry will come up more often. The original behavior is still available with -S=2. Some tests use this mode (so they can find assembly generated by a particular source line). This helped me with understanding what the compiler was doing while fixing #29007. Change-Id: Id14a3a41e1b18901e7c5e460aa4caf6d940ed064 Reviewed-on: https://go-review.googlesource.com/c/153241 Reviewed-by: David Chase <drchase@google.com>
* cmd/go: add a [root] condition to script_testBryan C. Mills2018-12-112-0/+3
| | | | | | | | | | | | [root] reports whether the current effective user ID is 0. Updates #29127 Change-Id: I9ef42f1271ea669689011e7ceff4d918c0cecb6b Reviewed-on: https://go-review.googlesource.com/c/153637 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* go/internal/gccgoimporter: add XCOFF supportClément Chigot2018-12-113-12/+49
| | | | | | | | | | | | | This commit adds support to read XCOFF files and AIX big archives in go/internal/gccgoimporter. Fixes: #29113 Change-Id: Id84d40358ff98fae5a576d1ebdd65980896365b9 Reviewed-on: https://go-review.googlesource.com/c/152720 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
* cmd/go: add a chmod command to script_testBryan C. Mills2018-12-112-0/+23
| | | | | | | | Change-Id: I5d4f65553f6c368d101be59aae9440f5ec9573b7 Reviewed-on: https://go-review.googlesource.com/c/153461 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* internal/xcoff: add big archive supportClément Chigot2018-12-116-0/+319
| | | | | | | | | | | This commit adds support to read AIX big archive inside internal/xcoff package. Change-Id: I4317b40824b24312a69c918dfc6438dc3aff7be7 Reviewed-on: https://go-review.googlesource.com/c/153398 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* runtime: revise openbsd/arm runtime defsJoel Sing2018-12-111-10/+14
| | | | | | | | | The OpenBSD arm port switched to EABI in September 2016 - this revises the layout of the runtime definitions to match what the kernel currently uses. Change-Id: I1bca7de56979f576862a7c280631e835f7ae4278 Reviewed-on: https://go-review.googlesource.com/c/153577 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/cgo: don't cache bad pointer typedefsIan Lance Taylor2018-12-111-4/+14
| | | | | | | | | | | | | The set of bad pointer typedefs changes as we see more typedefs, so avoid looking in the cache when we find one. Fixes #29175 Change-Id: Idd82289bdd8628d11a983fa5ec96517e3a5bcbf1 Reviewed-on: https://go-review.googlesource.com/c/153597 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/cover: simplify and correct isValidIdentifierIan Lance Taylor2018-12-111-6/+11
| | | | | | | | | | | | | Per comment on CL 120316. Updates #25280 Change-Id: I7d078de4030bd10934468e04ff696a34749bd454 Reviewed-on: https://go-review.googlesource.com/c/153500 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
* cmd/nm: run tests in parallel, don't use Scanner on []byteIan Lance Taylor2018-12-111-16/+8
| | | | | | | | | | | Saves about 35% on total test time on my laptop. Fixes #26471 Change-Id: I15b28b1bc00f889934d577dc7996864bbab10105 Reviewed-on: https://go-review.googlesource.com/c/153499 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/link: only create .init_array section if not emptyIan Lance Taylor2018-12-111-1/+1
| | | | | | | | | | | | | | | This avoids a warning from old versions of the GNU linker or glibc. No test because these old versions are not readily available. I tested this by hand on CentOS 6. Fixes #28722 Change-Id: I16640c9b83a79f759ec68fac64874803e74fbbfb Reviewed-on: https://go-review.googlesource.com/c/153257 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/cgo: preserve type information across loadDWARF loopIan Lance Taylor2018-12-114-16/+75
| | | | | | | | | | | | | | | | | | | CL 122575 and its successors introduced a loop calling loadDWARF, whereas before we only called it once. Pass a single typeConv to each call, rather than creating a new one in loadDWARF itself. Change the maps from dwarf.Type to use string keys rather than dwarf.Type keys, since when the DWARF is reloaded the dwarf.Type pointers will be different. These changes permit typeConv.Type to return a consistent value for a given DWARF type, avoiding spurious type conversion errors due to typedefs loaded after the first loop iteration. Fixes #27340 Change-Id: Ic33467bbfca4c54e95909621b35ba2a58216d96e Reviewed-on: https://go-review.googlesource.com/c/152762 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
* cmd/compile: emit a symbol for a method expression when using -dynlinkIan Lance Taylor2018-12-113-0/+32
| | | | | | | | Fixes #25065 Change-Id: Ia3db518cfd9c006caf951b51342a491ac8372e9c Reviewed-on: https://go-review.googlesource.com/c/153297 Reviewed-by: Robert Griesemer <gri@golang.org>
* doc: use https scheme in oss-distros linkDmitri Shuralyov2018-12-111-1/+1
| | | | | | | | | | | | | | The https scheme is supported, and should be used per best practices. The previous http link redirected to https: $ curl -i 'http://oss-security.openwall.org/wiki/mailing-lists/distros' HTTP/1.1 302 Moved Temporarily Location: https://oss-security.openwall.org/wiki/mailing-lists/distros Change-Id: I857b93eeec45996d6dc05dbf7532d1759bf4d447 Reviewed-on: https://go-review.googlesource.com/c/153457 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/compile: set correct line number for method wrappersKeith Randall2018-12-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | When converting a method to a function, like this: type T ... func (t T) foo() { } var t T f := t.foo We need to build a wrapper function for the partially evaluated method. Currently that wrapper function gets the line number of the first place where t.foo appears. Instead it should have the line number of where foo is declared. Fixes #26839 Change-Id: I7dbe2094e53d5d336f329273f10f8430e0af544e Reviewed-on: https://go-review.googlesource.com/c/153498 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
* runtime: fix CGO traceback frame countMark Pulford2018-12-104-12/+65
| | | | | | | | | | | | | Without this, each additional C frame found via SetCgoTraceback will cause a frame to be dropped from the bottom of the traceback stack. Fixes #29034 Change-Id: I90aa6b2a1dced90c69b64c5dd565fe64a25724a3 Reviewed-on: https://go-review.googlesource.com/c/151917 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/cover: check that the argument of -var is validAndrea Nodari2018-12-102-0/+22
| | | | | | | | | | | | | At the moment, the cover tool does not check that the argument of -var is a valid identifier. Hence, it could generate a file that fails to compile afterwards. Updates #25280 Change-Id: I6eb1872736377680900a18a4a28ba002ab5ea8ca Reviewed-on: https://go-review.googlesource.com/c/120316 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* hash/fnv: use bits.Mul64 for 128-bit hashBrian Kessler2018-12-101-22/+11
| | | | | | | | | | | | | | | | | | | | | | Replace the 128-bit multiplication in 4 parts with bits.Mul64 and two single-width multiplications. This simplifies the code and increases throughput by ~50% on amd64. name old time/op new time/op delta Fnv128KB-4 9.64µs ± 0% 6.09µs ± 0% -36.89% (p=0.016 n=4+5) Fnv128aKB-4 9.11µs ± 0% 6.17µs ± 5% -32.32% (p=0.008 n=5+5) name old speed new speed delta Fnv128KB-4 106MB/s ± 0% 168MB/s ± 0% +58.44% (p=0.016 n=4+5) Fnv128aKB-4 112MB/s ± 0% 166MB/s ± 5% +47.85% (p=0.008 n=5+5) Change-Id: Id752f2a20ea3de23a41e08db89eecf2bb60b7e6d Reviewed-on: https://go-review.googlesource.com/c/133936 Run-TryBot: Matt Layher <mdlayher@gmail.com> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org>
* cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 v2.2.2Bryan C. Mills2018-12-101-4/+4
| | | | | | | | | | | | | | I think we ought to make these tests hermetic, but in the meantime we should at least make them pass. Fixes #27692 Updates #28856 Change-Id: Ia78fa60e998dea3c871f640ffa2ece67b054f866 Reviewed-on: https://go-review.googlesource.com/c/153460 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
* cmd/cgo: don't pass CGO_CFLAGS -g options to debug info generationIan Lance Taylor2018-12-102-2/+11
| | | | | | | | | | | Fixes #26144 Change-Id: Ie69dab1bd819eaf158be11769903b2636bbcf516 Reviewed-on: https://go-review.googlesource.com/c/152165 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Nikhil Benesch <nikhil.benesch@gmail.com>
* cmd/go: fix errors for commands run outside of modulesJay Conrod2018-12-103-2/+33
| | | | | | | | | | | | | | | | | Since CL 148517, several commands (including list and get) work when GO111MODULE=on even when no go.mod file is present. This broke an assumption made by "fix" and "generate" which caused panics when run with a list of .go files (whether or not the command was run inside a module). This change fixes those assumptions and adds test cases for other commands run outside modules. Fixes #29097 Change-Id: I7927559769c5d4617d73eb63f3b17e2f26d8c219 Reviewed-on: https://go-review.googlesource.com/c/153158 Reviewed-by: Bryan C. Mills <bcmills@google.com>
* go/build: improve comment on Context.CgoEnabledGn Shivakumar2018-12-101-1/+1
| | | | | | | | Fixes #25953 Change-Id: I4f3a64b42fce76cc5ea6cfe2888d103c7423457d Reviewed-on: https://go-review.googlesource.com/c/126736 Reviewed-by: Bryan C. Mills <bcmills@google.com>
* all: move cmd/internal/xcoff to internal/xcoffClément Chigot2018-12-1016-11/+12
| | | | | | | | | | This commit moves cmd/internal/xcoff package to internal/xcoff because it will be needed to add XCOFF support in go/internal/gccgoimporter. Change-Id: Id12df0c438fb7db4a6a458fc1478480851bf7771 Reviewed-on: https://go-review.googlesource.com/c/152719 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* crypto/ecdsa: fix NSA reference to Suite B implementer's guide to FIPS 186-3Gerasimos (Makis) Maropoulos2018-12-101-1/+1
| | | | | | Change-Id: I34877ac1d6d7fe9ffa7eabe46b4032af84d33794 Reviewed-on: https://go-review.googlesource.com/c/153337 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* math/bits: remove named return in TrailingZeros16Alberto Donizetti2018-12-091-1/+1
| | | | | | | | | | | | | | | | | | TrailingZeros16 is the only one of the TrailingZeros functions with a named return value in the signature. This creates a sligthly unpleasant effect in the godoc listing: func TrailingZeros(x uint) int func TrailingZeros16(x uint16) (n int) func TrailingZeros32(x uint32) int func TrailingZeros64(x uint64) int func TrailingZeros8(x uint8) int Since the named return value is not even used, remove it. Change-Id: I15c5aedb6157003911b6e0685c357ce56e466c0e Reviewed-on: https://go-review.googlesource.com/c/153340 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>