aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-25[release-branch.go1.10] go1.10rc1go1.10rc1Andrew Bonventre
Change-Id: I49ec1e476e02d403a4b46f55ea48a9c3cee54efa Reviewed-on: https://go-review.googlesource.com/89855 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
2018-01-25database/sql: fix TestConversions when count > 1Daniel Theophanes
Provide a fresh conversion table for TestConversions as it gets modified on each test. Change-Id: I6e2240d0c3455451271a6879e994b82222c3d44c Reviewed-on: https://go-review.googlesource.com/89595 Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-25os: use the syscall version of Getwd for Plan 9Richard Miller
In Plan 9, each OS thread has its own independent working directory, so the Go runtime for Plan 9 needs to coordinate Chdir and Getwd operations to keep the working directory consistent for all goroutines. The function os.Getwd in Plan 9 should always call syscall.Getwd to retrieve the common working directory. Failure to do this was the cause of (at least some of) the intermittent failures in the Plan 9 builders with a seemingly spurious "file does not exist" message, when a thread's working directory had been removed in another thread. Change-Id: Ifb834ad025ee39578234ad3b04d08bc98e939291 Reviewed-on: https://go-review.googlesource.com/89575 Reviewed-by: David du Colombier <0intro@gmail.com> Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-24cmd/go: fix -coverpkg=all with dot importsRuss Cox
If you use -coverpkg=all you get coverage for all packages in the build. Go 1.9 used a global counter for all the GoCover variables, so that they were distinct for the entire build. The global counter caused problems with caching, so we switched to a per-package counter. But now the GoCover_0 in one package may be dot-imported into another and conflict with the GoCover_0 in that other package. Reestablish (overwhelmingly likely) global uniqueness of GoCover variables by appending an _xxxxxxxxxxxx suffix, where the x's are the prefix of the SHA256 hash of the import path. The point is only to avoid accidents, not to defeat people determined to break the tools. Fixes #23432. Change-Id: I3088eceebbe35174f2eefe8d558b7c8b59d3eeac Reviewed-on: https://go-review.googlesource.com/89135 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-24go/types: fix spelling mistake in commentKevin Burke
Change-Id: If8609dd7c4bdc261056804759ec254f8af0156df Reviewed-on: https://go-review.googlesource.com/89417 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-24runtime/pprof: scale mutex profile with sampling rateHana Kim
pprof expects the samples are scaled and reflects unsampled numbers. The legacy profile parser uses the sampling period in the output and multiplies all values with the period. https://github.com/google/pprof/blob/0138a3cd6dad6f94495ba0b5c3a5c124f04ae011/profile/legacy_profile.go#L815 Apply the same scaling when we output the mutex profile in the pprof proto format. Block profile shares the same code, but how to infer unsampled values is unclear. Legacy profile parser doesn't do anything special so we do nothing for block profile here. Tested by checking the profiles reported with debug=0 (proto format) are similar to the profiles computed from legacy format profile when the profile rate is a non-trivial number (e.g. 2) manually. Change-Id: Iaa33f92051deed67d8be43ddffc7c1016db566ca Reviewed-on: https://go-review.googlesource.com/89295 Reviewed-by: Peter Weinberger <pjw@google.com>
2018-01-24os: homogenize error checks on Plan 9David du Colombier
Remove leading space at the beginning of error strings, so the strings are consistent between isExist, isNotExist and isPermission functions. Here is a list of error strings returned on the most common file servers on Plan 9: match cwfs fossil ramfs "exists" "create/wstat -- file exists" "file already exists" "file exists" "is a directory" "is a directory" "file is a directory" "does not exist" "file does not exist" "file does not exist" "not found" "directory entry not found" "has been removed" "file has been removed" "permission denied" "access permission denied" "permission denied" "permission denied" "no parent" is an error returned by lib9p when removing a file without parent. Change-Id: I2362ed4b6730b8bec7a707a1052bd1ad8921cd97 Reviewed-on: https://go-review.googlesource.com/89315 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2018-01-24lib/time: follow redirects in curlKyle Shannon
Starting on or about the 2018c archives, www.iana.org is redirected to data.iana.org. Tell curl to follow the redirect. Updates: #22487 Change-Id: I00acada1a3ba01ef701d6d4ffae6cc2cbb6a068f Reviewed-on: https://go-review.googlesource.com/89375 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-23cmd/compile: don't let spills clobber argumentsKeith Randall
The compiler allows code to have multiple differently-typed views of a single argument. For instance, if we have func f(x float64) { y := *(*int64)(unsafe.Pointer(&x)) ... } Then in SSA we get two OpArg ops, one with float64 type and one with int64 type. The compiler will try to reuse argument slots for spill slots. It checks that the argument slot is dead by consulting an interference graph. When building the interference graph, we normally ignore cross-type edges because the values on either end of that edge can't be allocated to the same slot. (This is just a space-saving optimization.) This rule breaks down when one of the values is an argument, because of the multiple views described above. If we're spilling a float64, it is not enough that the float64 version of x is dead; the int64 version of x has to be dead also. Remove the optimization of not recording interference edges if types don't match. That optimization is incorrect if one of the values connected by the edge is an argument. Fixes #23522 Change-Id: I361f85d80fe3bc7249014ca2c3ec887c3dc30271 Reviewed-on: https://go-review.googlesource.com/89335 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-23go/types: more robust behavior in the presence errors (due to import "C")Robert Griesemer
- Don't complain about invalid constant type if the type is invalid already (we do this in other places as well). This is useful to do in general, and even more so if we have invalid types due to import "C". - Type-check the lhs of an assignment even if we bail out early due to an error on the rhs. This was simply an oversight. We already have machinery in place to "use" expressions; in this case we just have to also make sure we don't overcount "uses" of variables on the lhs. - Fix overcount uses correction in assignments: Only do it if the variable in question is declared inside the same package to avoid possible race conditions when type-checking exported variables concurrently. Fixes #22090. Change-Id: I4c1b59f9ce38970e7129fedc5f6023908386e4f1 Reviewed-on: https://go-review.googlesource.com/88375 Reviewed-by: Alan Donovan <adonovan@google.com>
2018-01-23runtime: never allocate during an unrecoverable panicAustin Clements
Currently, startpanic_m (which prepares for an unrecoverable panic) goes out of its way to make it possible to allocate during panic handling by allocating an mcache if there isn't one. However, this is both potentially dangerous and unnecessary. Allocating an mcache is a generally complex thing to do in an already precarious situation. Specifically, it requires obtaining the heap lock, and there's evidence that this may be able to deadlock (#23360). However, it's also unnecessary because we never allocate from the unrecoverable panic path. This didn't use to be the case. The call to allocmcache was introduced long ago, in CL 7388043, where it was in preparation for separating Ms and Ps and potentially running an M without an mcache. At the time, after calling startpanic, the runtime could call String and Error methods on panicked values, which could do anything including allocating. That was generally unsafe even at the time, and CL 19792 fixed this be pre-printing panic messages before calling startpanic. As a result, we now no longer allocate after calling startpanic. This CL not only removes the allocmcache call, but goes a step further to explicitly disallow any allocation during unrecoverable panic handling, even in situations where it might be safe. This way, if panic handling ever does an allocation that would be unsafe in unusual circumstances, we'll know even if it happens during normal circumstances. This would help with debugging #23360, since the deadlock in allocmcache is currently masking the real failure. Beyond all.bash, I manually tested this change by adding panics at various points in early runtime init, signal handling, and the scheduler to check unusual panic situations. Change-Id: I85df21e2b4b20c6faf1f13fae266c9339eebc061 Reviewed-on: https://go-review.googlesource.com/88835 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-23runtime: don't grow the stack on sigpanic if throwsplitAustin Clements
Currently, if a _SigPanic signal arrives in a throwsplit context, nothing is stopping the runtime from injecting a call to sigpanic that may attempt to grow the stack. This will fail and, in turn, mask the real problem. Fix this by checking for throwsplit in the signal handler itself before injecting the sigpanic call. Updates #21431, where this problem is likely masking the real problem. Change-Id: I64b61ff08e8c4d6f6c0fb01315d7d5e66bf1d3e2 Reviewed-on: https://go-review.googlesource.com/87595 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-23spec: consistently use "defined type" and "type name" (cleanup)Robert Griesemer
When we introduced the notion of alias type declarations, we renamed "named type" to "defined type" to avoid confusion with types denoted by aliases and thus are also types with names, or "named types". Some of the old uses of "named types" remained; this change removes them. Now the spec consistently uses the terms: - "defined type" for a type declared via a type definition - "type name" for any name denoting an (alias or defined) type - "alias" for a type name declared in an alias declaration New prose is encouraged to avoid the term "named type" to counter- act further confusion. Fixes #23474. Change-Id: I5fb59f1208baf958da79cf51ed3eb1411cd18e03 Reviewed-on: https://go-review.googlesource.com/89115 Reviewed-by: Rob Pike <r@golang.org>
2018-01-23cmd/internal/obj/arm64: fix assemble VLD1/VST1 bugfanzha02
The current code misassembles VLD1/VST1 instruction with non-zero offset. The offset is dropped silently without any error message. The cause of the misassembling is the current code treats argument (Rn)(Rm) as ZOREG type. The fix changes the matching rules and considers (Rn)(Rm) as ROFF type. The fix will report error information when assembles VLD1/VST1 (R8)(R13), [V1.16B]. The fix enables the ARM64Errors test. Fixes #23448 Change-Id: I3dd518b91e9960131ffb8efcb685cb8df84b70eb Reviewed-on: https://go-review.googlesource.com/87956 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-23doc, cmd/go: final release notes editsRuss Cox
Except for removing the DRAFT marker, I think these are now ready to go. Change-Id: I20604f5b135616189a24990db463c7bb5e7d48f1 Reviewed-on: https://go-review.googlesource.com/88975 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-23os: handle ' is a directory' error as IsExist on Plan 9Fazlul Shahriar
This error is returned by os.Mkdir when the directory already exists. This change fixes some upspin tests. Change-Id: I9ad5aefebb32dff577726d537b4f3826d79868eb Reviewed-on: https://go-review.googlesource.com/88656 Reviewed-by: David du Colombier <0intro@gmail.com> Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-23cmd/dist: only run swig tests when a go directory is present in swiglibMartin Möhrmann
When there is no go directory inside the swiglib directory then swig was installed without Go support. Tests in misc/swig will fail when swig is installed without Go support. Add additional checks for the presence of a go directory in the directory reported by 'swig -go -swiglib' to determine if misc/swig tests should be run. This avoids all.bash failing when swig but not swig-go is installed using macports. Tested on darwin with swig and with and without swig-go installed using macports. Fixes #23469 Change-Id: I173201221554982ea0d9f2bea70a3cb85b297cec Reviewed-on: https://go-review.googlesource.com/88776 Reviewed-by: David Chase <drchase@google.com>
2018-01-23doc: document Go 1.8.6Andrew Bonventre
Update golang/go#23515 Change-Id: Id334d8663bf4cbb68f224d1bba4c9ad3855f8aae Reviewed-on: https://go-review.googlesource.com/89155 Reviewed-by: Andrew Gerrand <adg@golang.org>
2018-01-23cmd/go: apply "go vet" to test filesIan Lance Taylor
In earlier versions of Go the "go vet" command would run on regular source files and test files. That was lost in CL74750. Bring it back. This required moving a chunk of code from internal/test to internal/load. The diff looks big but the code is unchanged. Fixes #23395 Change-Id: Ie9ec183337e8db81c5fc421d118a22b351b5409e Reviewed-on: https://go-review.googlesource.com/87636 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-22runtime: print hexdump on traceback failureAustin Clements
Currently, if anything goes wrong when printing a traceback, we simply cut off the traceback without any further diagnostics. Unfortunately, right now, we have a few issues that are difficult to debug because the traceback simply cuts off (#21431, #23484). This is an attempt to improve the debuggability of traceback failure by printing a diagnostic message plus a hex dump around the failed traceback frame when something goes wrong. The failures look like: goroutine 5 [running]: runtime: unexpected return pc for main.badLR2 called from 0xbad stack: frame={sp:0xc42004dfa8, fp:0xc42004dfc8} stack=[0xc42004d800,0xc42004e000) 000000c42004dea8: 0000000000000001 0000000000000001 000000c42004deb8: 000000c42004ded8 000000c42004ded8 000000c42004dec8: 0000000000427eea <runtime.dopanic+74> 000000c42004ded8 000000c42004ded8: 000000000044df70 <runtime.dopanic.func1+0> 000000c420001080 000000c42004dee8: 0000000000427b21 <runtime.gopanic+961> 000000c42004df08 000000c42004def8: 000000c42004df98 0000000000427b21 <runtime.gopanic+961> 000000c42004df08: 0000000000000000 0000000000000000 000000c42004df18: 0000000000000000 0000000000000000 000000c42004df28: 0000000000000000 0000000000000000 000000c42004df38: 0000000000000000 000000c420001080 000000c42004df48: 0000000000000000 0000000000000000 000000c42004df58: 0000000000000000 0000000000000000 000000c42004df68: 000000c4200010a0 0000000000000000 000000c42004df78: 00000000004c6400 00000000005031d0 000000c42004df88: 0000000000000000 0000000000000000 000000c42004df98: 000000c42004dfb8 00000000004ae7d9 <main.badLR2+73> 000000c42004dfa8: <00000000004c6400 00000000005031d0 000000c42004dfb8: 000000c42004dfd0 !0000000000000bad 000000c42004dfc8: >0000000000000000 0000000000000000 000000c42004dfd8: 0000000000451821 <runtime.goexit+1> 0000000000000000 000000c42004dfe8: 0000000000000000 0000000000000000 000000c42004dff8: 0000000000000000 main.badLR2(0x0) /go/src/runtime/testdata/testprog/badtraceback.go:42 +0x49 For #21431, #23484. Change-Id: I8718fc76ced81adb0b4b0b4f2293f3219ca80786 Reviewed-on: https://go-review.googlesource.com/89016 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-01-22doc: update 1.9.3 release dateAndrew Bonventre
Change-Id: I689ccfb8452a170629425dc97da503b28766c6f9 Reviewed-on: https://go-review.googlesource.com/89035 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-22doc/go1.10: address final TODOsRuss Cox
Change-Id: Id71c1ccb584fb308f1615c0ed1255cc8b44bf675 Reviewed-on: https://go-review.googlesource.com/88256 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-22cmd/vendor/github.com/google/pprof/internal/driver: skip read only dir error ↵Elias Naur
on Android On an android/amd64 emulator, $HOME points to / which is not writable. Ignore the error in the pprof driver test. With this, androidtest.sh on android/amd64 and android/386 passes. Upstream pull request https://github.com/google/pprof/pull/295. Change-Id: If919d7f44530a977fd044631ad01bac87d32deaa Reviewed-on: https://go-review.googlesource.com/88817 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-22cmd/go: add go help cacheRuss Cox
Change-Id: I14eeda85f279d1082ea9f2ac590b848ac13b1daa Reviewed-on: https://go-review.googlesource.com/87023 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2018-01-21runtime: pass dummy argc/argv correctly in r0_386_android_libIan Lance Taylor
Fix breakage introduced in CL 70530. Change-Id: I87f3da6b20554d4f405a1143b0d894c5953b63aa Reviewed-on: https://go-review.googlesource.com/88516 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-20misc,src: add support for specifying adb flags to the android harnessElias Naur
Introduce GOANDROID_ADB_FLAGS for additional flags to adb invocations. With GOANDROID_ADG_FLAGS, the Android builders can distinguish between emulator and device builds. Change-Id: I11729926a523ee27f6a3795cb2cfb64a9454f0a5 Reviewed-on: https://go-review.googlesource.com/88795 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-20doc: change anchor URLs from golang.org/dl/ to /dl/Andrew Bonventre
When running locally, it will redirect properly to golang.org/dl/ (see https://github.com/golang/tools/blob/master/cmd/godoc/dl.go). This is to support domains in prod other than golang.org. Change-Id: I6d3051fcd7e06a86442324a64d781d8ad95c624f Reviewed-on: https://go-review.googlesource.com/88679 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-20doc/faq: clarify that concurrent maps reads are safeIan Lance Taylor
Fixes #23480 Change-Id: I33b4bdc60b9983ab62d87bfa0ae3ff33304269c0 Reviewed-on: https://go-review.googlesource.com/88515 Reviewed-by: Rob Pike <r@golang.org>
2018-01-19doc: document Go 1.9.3Andrew Bonventre
Change-Id: Ic7a5d3118754b34ab0652fcef889259a03baebc3 Reviewed-on: https://go-review.googlesource.com/88536 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-19cmd/fix: add intermediate cast for *C.CFTypeRef <-> *unsafe.PointerKeith Randall
When casting between *C.CFTypeRef and *unsafe.Pointer, we used to be able to do the cast directly. Now with C.CFTypeRef being a uintptr instead of an unsafe.Pointer, we need an intermediate cast. Add the insertion of the intermediate cast to the cftype fix module. Fixes #23091 Change-Id: I891be2f4a08cfd7de1cc4c6ab841b1e0d8c388a6 Reviewed-on: https://go-review.googlesource.com/88175 Reviewed-by: Robert Griesemer <gri@golang.org>
2018-01-18crypto/x509: better document Verify's behaviour.Adam Langley
This change expands the documentation for Verify to mention the name constraints and EKU behaviour. Change-Id: Ifc80faa6077c26fcc1d2a261ad1d14c00fd13b23 Reviewed-on: https://go-review.googlesource.com/87300 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-17cmd/compile: don't combine 64-bit loads/stores on amd64Caleb Spare
This causes a performance regression for some calls. Fixes #23424. Updates #6853. Change-Id: Id1db652d5aca0ce631a3417c0c056d6637fefa9e Reviewed-on: https://go-review.googlesource.com/88135 Run-TryBot: Caleb Spare <cespare@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2018-01-17cmd/fix: don't depend on *GetTypeID functions being presentKeith Randall
cgo uses the presence of these functions to determine whether a given type is in the CFTypeRef hierarchy and thus should be a uintptr instead of a pointer. But if the *GetTypeID functions aren't used by the user code, then they won't be present in the cgo output, and thus cmd/fix won't see them. Use the simpler rule that anything ending in *Ref should be rewritten. This could over-rewrite, but I don't see a simpler solution. Unlike cgo, it is easy to edit the output to fix any issues. And fix is a much rarer operation than cgo. This is a revert of portions of CL 87616. Update #23091 Change-Id: I74ecd9fb25490a3d279b372e107248452bb62185 Reviewed-on: https://go-review.googlesource.com/88075 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2018-01-17spec: mention that special case for integer division is due to overflowRobert Griesemer
Fixes #23443. Change-Id: If60c39b582ee5308e9fa902f93c1b6ae7890346c Reviewed-on: https://go-review.googlesource.com/87975 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2018-01-17cmd/fix: extend typechecker to use cgo typesKeith Randall
If a file uses cgo, incorporate the types generated by running cgo. Update #23091 Change-Id: I10958fa7fd6027c2c96a9fd8a9658de35439719f Reviewed-on: https://go-review.googlesource.com/87616 Reviewed-by: Robert Griesemer <gri@golang.org>
2018-01-17cmd/cgo: rewrite CFTypeRef and subytes on Darwin to uintptrKeith Randall
Cgo currently maps CFTypeRef and its subtypes to unsafe.Pointer or a pointer to a named empty struct. However, Darwin sometimes encodes some of CFTypeRef's subtypes as a few int fields packed in a pointer wrapper. This hackery confuses the Go runtime as the pointers can look like they point to things that shouldn't be pointed at. Switch CFTypeRef and its subtypes to map to uintptr. Detecting the affected set of types is tricky, there are over 200 of them, and the set isn't static across Darwin versions. Fortunately, downcasting from CFTypeRef to a subtype requires calling CFGetTypeID, getting a CFTypeID token, and comparing that with a known id from a *GetTypeID() call. So we can find all the type names by detecting all the *GetTypeID() prototypes and rewriting the corresponding *Ref types to uintptr. This strategy covers all the cases I've checked and is unlikely to have a false positive. Update #23091. Change-Id: I487eb4105c9b4785ba564de9c38d472c8c9a76ac Reviewed-on: https://go-review.googlesource.com/87615 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-16sync: consistently use article "a" for RWMutexBrad Fitzpatrick
We used a mix of both before. I've never heard anybody say "an arr-double you mutex" when speaking. Fixes #23457 Change-Id: I802b5eb2339f885ca9d24607eeda565763165298 Reviewed-on: https://go-review.googlesource.com/87896 Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-01-16runtime: fix time.Now on Sierra and olderGiovanni Bajo
CL 67332 created the fast no-syscall path for time.Now in High Sierra but managed to break Sierra and older by forcing them into the slow syscall path: the version check based on commpage version was wrong. This CL uses the Darwin version number instead. The assembly diff is noisy because many variables had to be renamed, but the only actual change is the version check. Fixes #23419. Change-Id: Ie31ef5fb88f66d1517a8693942a7fb6100c213b0 Reviewed-on: https://go-review.googlesource.com/87655 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2018-01-16runtime: update URL of the Linux vDSO parser toolTobias Klauser
The tool was moved to tools/Testing/selftests within the Linux kernel source tree. Adjust the URL in the comments of vdso_linux.go Change-Id: I86b9cae4b898c4a45bc7c54891ce6ead91a22670 Reviewed-on: https://go-review.googlesource.com/87815 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-16doc: specify which pprof version was vendored in go1.10Alberto Donizetti
Change-Id: I248cb10a2e24f089600c13e86da251970c773d95 Reviewed-on: https://go-review.googlesource.com/87662 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-15runtime: don't issue cgocheck error for timer bucket source pointerIan Lance Taylor
The cgo checker was issuing an error with cgocheck=2 when a timer bucket was stored in a pollDesc. The pollDesc values are allocated using persistentalloc, so they are not in the Go heap. The code is OK since timer bucket pointers point into a global array, and as such are never garbage collected or moved. Mark timersBucket notinheap to avoid the problem. timersBucket values only occur in the global timers array. Fixes #23435 Change-Id: I835f31caafd54cdacc692db5989de63bb49e7697 Reviewed-on: https://go-review.googlesource.com/87637 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-15cmd/go: clarify and simplify (a little) the description of go test's cachingRob Pike
I found the previous text choppy and hard to follow, and in putting this CL together, based entirely on the existing text, I found several details that seemed misleading to me. This is my attempt to make the text simultaneously easier to understand, more complete, and more precise. I may have failed in all three, but I wanted to try. Change-Id: I088cb457f6fcad8f2b40236949cc3ac43455e600 Reviewed-on: https://go-review.googlesource.com/87735 Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-15net/rpc: improve error report messagesKunpei Sakai
Updates #19957 Change-Id: I8e2e3837db9e5e69b7102f9bd5831fe78ac60cfc Reviewed-on: https://go-review.googlesource.com/87335 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2018-01-14cmd/go: use Windows %AppData% for build cache if %LocalAppData% is emptyBrad Fitzpatrick
Fixes #23190 Change-Id: I96805aaab44ddaae6098b4e3af30f9e52585eae0 Reviewed-on: https://go-review.googlesource.com/87675 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-12cmd/go: make gccgo -buildmode=shared and -linkshared work againIan Lance Taylor
After CL 69831, addTransitiveLinkDeps ensures that all dependencies of a link appear in Deps. We no longer need to traverse through all actions to find them. And the old scheme of looking through all the actions and assuming we would see shared library actions before libraries they depend on no longer works. Now that we have complete deps, change to a simpler scheme in which we find the shared libraries in the deps, and then use that to sort the deps into archives and shared libraries. Fixes #22224 Change-Id: I14fcc773ac59b6f5c2965cc04d4ed962442cc89e Reviewed-on: https://go-review.googlesource.com/87497 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-12cmd/compile: document reserved import pathsRobert Griesemer
Fixes #20708. Change-Id: I2db450947b64b8b5af3822c7fbcc3e99746ae9d7 Reviewed-on: https://go-review.googlesource.com/87496 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2018-01-11spec: remove example explaining that type B0 and B0 are identicalRobert Griesemer
Every few months we get a new error report claiming that there is a typo in the spec related to this specific example. Clearly, the fact that two types with the same identifier are identical seems exceedingly obvious to readers; thus the example seems not worth the trouble. Removing it. For #9226. For #22202. For #22495. For #23096. For #23409. There may be more. Change-Id: I003ba79dc460ffb028a4ecb5f29efd60f2551912 Reviewed-on: https://go-review.googlesource.com/87417 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2018-01-11misc/cgo/test: avoid endless loop when we can't parse notesIan Lance Taylor
Change-Id: I085870d978a3a560588711882c77060d136d867a Reviewed-on: https://go-review.googlesource.com/87415 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-11cmd/go: correct buildmode test (from "c-header" to "c-shared")Ian Lance Taylor
Change-Id: I8688a47ae83f6719f6134c64fb3d3f2aa275c641 Reviewed-on: https://go-review.googlesource.com/87158 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-11doc, api: add type Srcset string change to go1.10 notes and APIgo1.10beta2Andrew Bonventre
Change-Id: I13afaa894292bd566510b40a5e4bbbe4d72d4d08 Reviewed-on: https://go-review.googlesource.com/87395 Reviewed-by: Ian Lance Taylor <iant@golang.org>