- 18 Jul, 2018 1 commit
-
-
EduRam authored
Fixes #26385 Change-Id: I5594564f42898a71d30531e5132bddb3a6915247 GitHub-Last-Rev: fbd7b38b0419e21ecd22fe802ede5c0ee3f14a9a GitHub-Pull-Request: golang/go#26427 Reviewed-on: https://go-review.googlesource.com/124555Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 17 Jul, 2018 18 commits
-
-
Ian Lance Taylor authored
Fixes #25093 Change-Id: If283275e2b73621ade56d014e60c2d18199b366c Reviewed-on: https://go-review.googlesource.com/122555 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Rob Pike authored
Bring it up to date with recent terminology, mention new approaches such as in Rust, and link to the new blog post. Change-Id: I1d0b121e6f8347c3cf2c8ca0d8adc8285ce59ef1 Reviewed-on: https://go-review.googlesource.com/124475Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
Change-Id: I487bdf0c828d28b2122bd93934dc5a9a5dbc6a00 Reviewed-on: https://go-review.googlesource.com/124517Reviewed-by: Austin Clements <austin@google.com>
-
Austin Clements authored
Change-Id: I3c0cb9b56776d8cc78a96ef012385c31f9f0e146 Reviewed-on: https://go-review.googlesource.com/124516Reviewed-by: Austin Clements <austin@google.com>
-
Mostyn Bramley-Moore authored
Relates to #9679 Change-Id: I68951f664d2a03812dae309c580c181869d8af21 Reviewed-on: https://go-review.googlesource.com/122237 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Filippo Valsorda authored
CL 124135 follow-ups. Change-Id: Ib7e2066bd2d18851561e03386709a1b42b50fcef Reviewed-on: https://go-review.googlesource.com/124136Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Frank Schroeder authored
Git timestamp parsing is broken when fetching modules if the local git configuration has 'log.showsignature=true'. Fixes #26388 Change-Id: I47f92381784072335a2a465de56092106c616108 GitHub-Last-Rev: 96f988c0a2dd39a5747ec4a7bad05e7e8ee0d384 GitHub-Pull-Request: golang/go#26389 Reviewed-on: https://go-review.googlesource.com/123958Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Steeve Morin authored
In Android's NDK16, jobject is now declared as: #ifdef __cplusplus class _jobject {}; typedef _jobject* jobject; #else /* not __cplusplus */ typedef void* jobject; #endif This makes the jobject to uintptr check fail because it expects the following definition: struct _jobject; typedef struct _jobject *jobject; Update the type check to handle that new type definition in both C and C++ modes. Fixes #26213 Change-Id: Ic36d4a5176526998d2d5e4e404f8943961141f7a GitHub-Last-Rev: 42037c3c584579c2b3281c25372b830e864e7aec GitHub-Pull-Request: golang/go#26221 Reviewed-on: https://go-review.googlesource.com/122217 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Alberto Donizetti authored
Since Go1.10, go test runs vet on the tests before executing them. Moreover, the vet tool typechecks the package under analysis with go/types before running. In Go1.10, a typechecking failure just caused a warning to be printed. In Go1.11, a typechecking failure will cause vet to exit with a fatal error (see Issue #21287). This means that starting with Go1.11, tests that don't typecheck will fail immediately. This would not normally be an issue, since a test that doesn't typecheck shouldn't even compile, and it should already be broken. Unfortunately, there's a bug in gc that makes it accept programs with unused variables inside a closure (Issue #3059). This means that a test with an unused variable inside a closure, that compiled and passed in Go1.10, will fail in the typechecking step of vet starting with Go1.11. Explain this in the 1.11 release notes. Fixes #26109 Change-Id: I970c1033ab6bc985d8c64bd24f56e854af155f96 Reviewed-on: https://go-review.googlesource.com/121455Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
This reverts commit c9930022. The original CL skipped the lldb test if it couldn't read compressed DWARF, but lldb can never read compressed DWARF, so this effectively disabled this test unconditionally. The previous commit disabled DWARF compression for this test, so the test now works on its own merits again. This CL reverts the change to skip the test so we don't simply mask lldb failures. Updates #25925. Change-Id: I3e1c787b658257b542c3c70807065dde9cfe05ee Reviewed-on: https://go-review.googlesource.com/124386 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
lldb doesn't support compressed DWARF, so right now we're just always skipping the lldb test. This CL makes the test run again by disabling compressed DWARF just for this test. Updates #25925. Change-Id: Ib9ddc442305fe6d37060d48f36bc4458b6fd8c86 Reviewed-on: https://go-review.googlesource.com/124385 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Autos must be kept if their address reaches the control value of a block. We didn't see this before because it is rare for an auto's address to reach a control value without also reaching a phi or being written to memory. We can probably optimize away the comparisons that lead to this scenario since autos cannot alias with pointers from elsewhere, however for now we take the conservative approach and just ensure the auto is properly initialised if its address reaches a control value. Fixes #26407. Change-Id: I02265793f010a9e001c3e1a5397c290c6769d4de Reviewed-on: https://go-review.googlesource.com/124335Reviewed-by: David Chase <drchase@google.com>
-
Russ Cox authored
The original cmd/go tests were tiny shell scripts written against a library of shell functions. They were okay to write but difficult to run: you couldn't select individual tests (with -run) they didn't run on Windows, they were slow, and so on. CL 10464 introduced go_test.go's testgo framework and later CLs translated the test shell script over to individual go tests. This let us run tests selectively, run tests on Windows, run tests in parallel, isolate different tests, and so on. It was a big advance. The tests had always been awkward to write. Here was the first test in test.bash: TEST 'file:line in error messages' # Test that error messages have file:line information at beginning of # the line. Also test issue 4917: that the error is on stderr. d=$(TMPDIR=/var/tmp mktemp -d -t testgoXXX) fn=$d/err.go echo "package main" > $fn echo 'import "bar"' >> $fn ./testgo run $fn 2>$d/err.out || true if ! grep -q "^$fn:" $d/err.out; then echo "missing file:line in error message" cat $d/err.out ok=false fi rm -r $d The final Go version of this test was: func TestFileLineInErrorMessages(t *testing.T) { tg := testgo(t) defer tg.cleanup() tg.parallel() tg.tempFile("err.go", `package main; import "bar"`) path := tg.path("err.go") tg.runFail("run", path) shortPath := path if rel, err := filepath.Rel(tg.pwd(), path); err == nil && len(rel) < len(path) { shortPath = rel } tg.grepStderr("^"+regexp.QuoteMeta(shortPath)+":", "missing file:line in error message") } It's better but still quite difficult to skim. This CL introduces a new facility meant as a successor to the testgo approach that brings back the style of writing tests as little scripts, but they are now scripts in a built-for-purpose shell-like language, not bash itself. In this new form, the test above is a single file, testdata/script/fileline.txt: # look for short, relative file:line in error message ! go run ../../gopath/x/y/z/err.go stderr ^..[\\/]x[\\/]y[\\/]z[\\/]err.go: -- ../x/y/z/err.go -- package main; import "bar" The file is a txtar text archive (see CL 123359) in which the leading comment is the test script and the files are the initial state of the temporary file system where the script runs. Each script runs as a subtest, so that they can still be selected individually. The scripts are kept isolated from each other by default, so all script subtests are treated as parallel tests, for the testing package to run in parallel. Even for the 15 tests in this CL, that cuts the time for TestScript from 5.5s to 2.5s. The scripts do not have access to the cmd/go source directory, nor to cmd/go/testdata, so they are prevented from creating temporary files in those places or modifying existing ones. (Many existing tests scribble in testdata, unfortunately, especially testdata/pkg when they run builds with GOPATH=testdata.) This CL introduces the script facility and converts 15 tests. The txtar archive form will allow us to delete the large trees of trivial files in testdata; a few are deleted in this CL. See testdata/script/README for details and a larger conversion example. As part of converting testdata/script/test_badtest.txt, I discovered that 'go test' was incorrectly printing a FAIL line to stderr (not stdout) in one corner case. This CL fixes that to keep the test passing. Future CLs will convert more tests. Change-Id: I11aa9e18dd2d4c7dcd8e310dbdc6a1ea5f7e54c1 Reviewed-on: https://go-review.googlesource.com/123577 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
This is close to a complete rewrite, as the content was pretty old. The CL includes links to the Wiki for information about companies using Go, a new section about IDEs and editors¹, and a restatement of the foreign function interface story. It also modernizes and expands a little on the use of Go inside Google. ¹ Ed is the standard editor. Change-Id: I5e54aafa53d00d86297b2691960a376b40f6225b Reviewed-on: https://go-review.googlesource.com/123922Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Change-Id: I60cb7010448757ca4c7a2973bee2277b3d5fc439 Reviewed-on: https://go-review.googlesource.com/124175Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
The vet action assumes that a.Deps[0] is the compilation action for which vet information should be generated. However, when using -linkshared, the action graph is built with a ModeBuggyInstall action to install the shared library built from the compilation action. Adjust the set up of the vet action accordingly. Also don't clean up the working directory after completing the buggy install. Updates #26400 Change-Id: Ia51f9f6b8cde5614a6f2e41b6207478951547770 Reviewed-on: https://go-review.googlesource.com/124275 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Zev Goldstein authored
Docker sets $HOME to / when running with a UID that doesn't exist within the container. This not uncommon on CI servers. Fixes #26280 Change-Id: Ic7ff62b41403fe6e7c0cef12814667ef73f6c954 Reviewed-on: https://go-review.googlesource.com/122487 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Eric Daniels authored
Change-Id: I0f76b40dbfda2d382c88aec377db1851c4ac7441 Change-Id: I0f76b40dbfda2d382c88aec377db1851c4ac7441 GitHub-Last-Rev: ab42559278d8cba9e025b431a459d117500a73da GitHub-Pull-Request: golang/go#26410 Reviewed-on: https://go-review.googlesource.com/124255Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 16 Jul, 2018 15 commits
-
-
Russ Cox authored
Most programs seem to accept a relative temp dir, as weird as that might be. Also, the meaning of relative is a little more fluid on Windows: TMP=\temp is relative (to the current drive) but will work well enough. Also, Windows GetTempPath automatically converts a relative %TMP% into an absolute path, so we'd be imposing different behavior for GOTMPDIR vs TMP. It seems easier and more consistent to just impose the obvious meaning than to add an error we can only implement some of the time. Originally got here because "cmd/go:" should be"go:" in error message, but the error message is gone now. Fixes #23264. Change-Id: I3c3fb801cbd5e652364f1f62bb3881e9317e3581 Reviewed-on: https://go-review.googlesource.com/123876 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Updates #26400 Change-Id: I1747d1f1018521cdfa4b3ed13412a944829967cf Reviewed-on: https://go-review.googlesource.com/124235 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Joe Tsai authored
Several adjustments: 1) When encoding the FileHeader for a directory, explicitly set all of the sizes to zero regardless of their prior values. These values are currently populated by FileInfoHeader as it calls os.FileInfo.Size regardless of whether the file is a directory or not. We avoid fixing FileInfoHeader now as it is too late in the release cycle (see #24082). We silently adjust slightly wrong FileHeader fields as opposed to returning an error because the CreateHeader method already does such mutations (e.g., for UTF-8 detection, data descriptor, etc). 2) Have dirWriter.Write only return an error if some number of bytes are written. Some code still call Write for both normal files and directories, but just pass an empty []byte to Write for directories. Change-Id: I85492a31356107fcf76dc89ceb00a28853754289 Reviewed-on: https://go-review.googlesource.com/124155 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Filippo Valsorda authored
Change-Id: I8163d06e5099d7ac39b04ccadf7f6533967db2f5 Reviewed-on: https://go-review.googlesource.com/124135Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Filippo Valsorda authored
When x509ignoreCN=1 is present in GODEBUG, ignore the deprecated Common Name field. This will let people test a behavior we might make the default in the future, and lets a final class of certificates avoid the NameConstraintsWithoutSANs error. Updates #24151 Change-Id: I1c397aa1fa23777b9251c311d02558f9a5bdefc0 Reviewed-on: https://go-review.googlesource.com/123695Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Filippo Valsorda authored
The Common Name is used as a hostname when there are no Subject Alternative Names, but it is not restricted by name constraints. To protect against a name constraints bypass, we used to require SANs for constrained chains. See the NameConstraintsWithoutSANs error. This change ignores the CN when it does not look like a hostname, so we can avoid returning NameConstraintsWithoutSANs. This makes it possible to validate certificates with non-hostname CN against chains that use name constraints to disallow all names, like the Estonian IDs. Updates #24151 Change-Id: I798d797990720a01ad9b5a13336756cc472ebf44 Reviewed-on: https://go-review.googlesource.com/123355Reviewed-by: Adam Langley <agl@golang.org>
-
Keith Randall authored
TARGET_OS_OSX is the right macro, but it also was only introduced in 1.12. For 1.11 and earlier a reasonable substitution is TARGET_OS_IPHONE == 0. Update #24161 Update #26355 Change-Id: I5f43c463d14fada9ed1d83cc684c7ea05d94c5f3 Reviewed-on: https://go-review.googlesource.com/124075 Run-TryBot: Keith Randall <khr@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ice8f82a6288eeadfb8efd7628444166a447831da Reviewed-on: https://go-review.googlesource.com/124096Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I20a82f6b47cd3ab4ca22d222e6d8a2c59d57e2a4 Reviewed-on: https://go-review.googlesource.com/124095Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I0152d3c1d980e271fbcdb9d5def094d3c837a4f4 Reviewed-on: https://go-review.googlesource.com/124055Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ib2da2b0ceb33867a41b0b9b7e4dcecb11f964b73 Reviewed-on: https://go-review.googlesource.com/124035Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Describe the problem as a bug, since it is not implied by the rest of the pointer passing rules, and it may be possible to fix it. Updates #19928 Change-Id: I2d336e7336b2a215c0b8cf909a203201ef1b054e Reviewed-on: https://go-review.googlesource.com/123658Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
The test TestNewReleaseRebuildsStalePackagesInGOPATH is not run in short mode, so people tend to not notice when it fails. It was failing due to the build cache. Make it pass again by 1) changing it to modify the package in a way visible to the compiler, so that the change is not hidden by caching; 2) accepting "not installed but available in build cache" as always being a valid reason for a stale package, as go list does not try to figure out an underlying reason for why a package is stale when it finds it in the build cache but not installed. Updates #24436 Change-Id: Iaeaa298f153451ec913a653dd4e6da79a33055bb Reviewed-on: https://go-review.googlesource.com/123815Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Andrew Bonventre authored
Change-Id: I4055ecc39b1b250cce7b32241f13dbc05567361f Reviewed-on: https://go-review.googlesource.com/124015Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Hana (Hyang-Ah) Kim authored
Profile's Mapping field is currently populated by reading /proc/self/maps. On systems where /proc/self/maps is not available, the profile generated by Go's runtime will not have any Mapping entry. Pprof command then adds a fake entry and links all Location entries in the profile with the fake entry to be used during symbolization. https://github.com/google/pprof/blob/a8644067d5a3c9a6386e7c88fa4a3d9d37877ca3/internal/driver/fetch.go#L437 The fake entry is not enough to suppress the error or warning messages pprof command produces. We need to tell pprof that Location entries are symbolized already by Go runtime and pprof does not have to attempt to perform further symbolization. In #25743, we made Go runtime mark Mapping entries with HasFunctions=true when all Location entries from the Mapping entries are successfully symbolized. This change makes the Go runtime add a fake mapping entry, otherwise the pprof command tool would add, and set the HasFunctions=true following the same logic taken when the real mapping information is available. Updates #19790. Fixes #26255. Tested pprof doesn't report the error message any more for pure Go program. Change-Id: Ib12b62e15073f5d6c80967e44b3e8709277c11bd Reviewed-on: https://go-review.googlesource.com/123779 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 15 Jul, 2018 5 commits
-
-
Rob Pike authored
Update #26107. Change-Id: I8bfa5b01ce953c53f7fd7a866d0ece61ba04c618 Reviewed-on: https://go-review.googlesource.com/123919Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Significant surgery done to the Versioning section, bringing it closer to modern thinking. Also add a question about constants. Update #26107. Change-Id: Icf70b7228503c6baaeab0b95ee3e6bee921575aa Reviewed-on: https://go-review.googlesource.com/123918Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Changes are mostly about making more about now than about the past, changing some verb tenses, and mentioning gollvm (which should be pronounced "gollum" if you ask me). Update #26107 Change-Id: I6c14f42b9fc2684259d4ba8bc149d7ec9bb83d15 Reviewed-on: https://go-review.googlesource.com/123917Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
The old text was written when it was only 1 by default, which changed a long time ago. Also add a note that GOMAXPROCS does not limit the total number of threads. Change-Id: I104ccd7266d11335320a4d7f5671fb09ed641f88 Reviewed-on: https://go-review.googlesource.com/123916Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
The test in CL 123715 doesn't work on iOS, it needs to use a different version scheme to determine whether SecKeyAlgorithm and friends exist. Restrict the old version test to OSX only. The same problem occurs on iOS: the functions tested don't exist before iOS 10. But we don't have builders below iOS 10, so it isn't a big issue. If we ever get older builders, or someone wants to run all.bash on an old iOS, they'll need to figure out the right incantation. Update #24161 Update #26355 Change-Id: Ia3ace86b00486dc172ed00c0c6d668a95565bff7 Reviewed-on: https://go-review.googlesource.com/123959 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Jul, 2018 1 commit
-
-
Dan Kortschak authored
Fixes #26165 Change-Id: I1f3bd193af9b6f8461c736330952b6e50d3e00d9 Reviewed-on: https://go-review.googlesource.com/121876Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-