Commit graph

39483 commits

Author SHA1 Message Date
Keith Randall 83a33d3855 cmd/compile: reverse order of slice bounds checks
Turns out this makes the fix for 28797 unnecessary, because this order
ensures that the RHS of IsSliceInBounds ops are always nonnegative.

The real reason for this change is that it also makes dealing with
<0 values easier for reporting values in bounds check panics (issue #30116).

Makes cmd/go negligibly smaller.

Update #28797

Change-Id: I1f25ba6d2b3b3d4a72df3105828aa0a4b629ce85
Reviewed-on: https://go-review.googlesource.com/c/go/+/166377
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-09 00:52:45 +00:00
Clément Chigot 3cf89e509b cmd/link: enable DWARF with external linker on aix/ppc64
In order to allow DWARF with ld, the symbol table is adapted.
In internal linkmode, each package is considered as a .FILE. However,
current version of ld is crashing on a few programs because of
relocations between DWARF symbols. Considering all packages as part of
one .FILE seems to bypass this bug.
As it might be fixed in a future release, the size of each package
in DWARF sections is still retrieved and can be used when it's fixed.
Moreover, it's improving internal linkmode which should have done it
anyway.

Change-Id: If3d023fe118b24b9f0f46d201a4849eee8d5e333
Reviewed-on: https://go-review.googlesource.com/c/go/+/164006
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-09 00:25:11 +00:00
LE Manh Cuong b37b35edd7 debug/gosym: simplify parsing symbol name rule
Symbol name with linker prefix like "type." and "go." is not parsed
correctly and returns the prefix as parts of package name.

So just returns empty string for symbol name start with linker prefix.

Fixes #29551

Change-Id: Idb4ce872345e5781a5a5da2b2146faeeebd9e63b
Reviewed-on: https://go-review.googlesource.com/c/go/+/156397
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-09 00:24:42 +00:00
Jay Conrod 91c9ed0840 cmd/go: improve wording of 'go mod init' error
When 'go mod init' is run without a module path, it tries to infer a
module path, based on the current directory (if in GOPATH), import
comments, and vendor configuration files.

It's common for this command to fail the first time a user tries to
create a module in a new project outside GOPATH. This change improves
the wording of the error message to hint that the user should specify
a module path.

Fixes #30678

Change-Id: Iec0352e919dbc8b426ab71eed236fad3929ec671
Reviewed-on: https://go-review.googlesource.com/c/go/+/166319
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-08 23:42:22 +00:00
Bryan C. Mills 0271d41ed6 internal/testenv: remove SetModVendor
It turns out not to be necessary. Russ expressed a preference for
avoiding module fetches over making 'go mod tidy' work within std and
cmd right away, so for now we will make the loader use the vendor
directory for the standard library even if '-mod=vendor' is not set
explicitly.

Updates #30228

Change-Id: Idf7208e63da8cb7bfe281b93ec21b61d40334947
Reviewed-on: https://go-review.googlesource.com/c/go/+/166357
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-03-08 23:40:24 +00:00
Elias Naur 632162ccbc misc/android: enable many more tests on GOOS=android
Android tests are built on the host and run on the device. To do
that, the exec wrapper copies the test binary and testdata to the device.
To enable many more tests, make the copied environment more like the host:

- Copy all of pkg from GOROOT, not just the android pkg directory.
- Copy any parent testdata directories as well as the package's own.
- Copy *.go files from the package directory. This enables misc/cgo/stdio
and misc/cgo/life tests that were invisible before so disable them explicitly.
- Always copy the GOROOT, even for tests outside GOROOT. This is expensive
 but only done once per make.bash.
- Build the go tool for the device and put it in PATH. Set GOCACHE
to a writable directory and disable cgo.

While here, use a single directory for all the exec wrapper files and
delete that once per make.bash as well.

In total, this CL enables many tests in the subrepos that would need skips
without it, in particular the x/tools tests.

Fixes #11452
Updates #23824
Updates #11811

Change-Id: I2e50d8b57db9bc4637f25272a5360c8b2cf4e627
Reviewed-on: https://go-review.googlesource.com/c/go/+/165797
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-08 23:32:03 +00:00
karthik nayak d3dd2588eb gosym/pclntab: mark LineTable.LineToPC and LineTable.PCToLine as deprecated
Currently they aren't marked as deprecated as Godoc, but the comments
mention that they are deprecated. Mark them as officially deprecated.

Fixes #29576

Change-Id: I795c698ac715476023d80579d60932fba4c5edde
Reviewed-on: https://go-review.googlesource.com/c/go/+/156331
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-08 22:40:10 +00:00
Iskander Sharipov 8782fd0431 crypto/cipher: fix duplicated arguments to bytes.Equal in test
Args were duplicated by a mistake. Found using static analysis tools.

Change-Id: I2f61e09844bc409b1f687d654767332d93dd39a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/164937
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-03-08 22:18:36 +00:00
Clément Chigot 359fb4a9af cmd/link: on AIX generate export file for host linker
Change-Id: I6638cb0f9ed751c76a29cae62a93a923f18f14f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/164005
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 21:37:03 +00:00
Andrei Vagin 5930c7de93 syscall: add all ambient capabilities into permitted and inheritable sets
According to the prctl man page, each capability from the ambient set
must already be present in both  the  permitted  and  the  inheritable
sets  of the process.

exec_linux_test suggests configuring the capabilities in the parent
process. This doesn't look nice, because:
* Capabilities are a per-thread attribute, so we need to use
LockOSThread.
* Need to restore capabilities after creating a process.
* Doesn't work with user namespaces, because a process gets capabilities
when a namespace is created.

Fixes #23152

Change-Id: Iba23e530fc7b9f5182d602fe855f82218f354219
Reviewed-on: https://go-review.googlesource.com/c/go/+/156577
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 20:53:16 +00:00
Jay Conrod f1d5ce0185 cmd/go: make go list error behavior consistent in tests
"go list -test" constructs a package graph, then creates test packages
for the target. If it encounters an error (for example, a syntax error
in a test file or a test function with the wrong signature), it
reports the error and exits without printing the test packages or
their dependencies, even if the -e flag is given. This is a problem
for tools that operate on test files while users are editing them. For
example, autocomplete may not work while the user is typing.

With this change, a new function, load.TestPackagesAndErrors replaces
TestPackagesFor. The new function attaches errors to the returned test
packages instead of returning immediately. "go list -test" calls this
when the -e flag is set. TestPackagesFor now returns the same error as
before, but it returns non-nil packages so that "go list -test"
without -e can print partial results.

Fixes #28491

Change-Id: I141765c4574eae424d872eb9bf7dd63fdfb85efb
Reviewed-on: https://go-review.googlesource.com/c/go/+/164357
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-08 20:22:16 +00:00
Bryan C. Mills 1ab9f6837d cmd/go/internal/modfetch: handle codeRoot == path for paths with major-version suffixes
Fixes #30647

Change-Id: Icbcfdb3907bc003ac17a8c7df17ecb41daf82eb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/166117
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-03-08 18:09:53 +00:00
Bryan C. Mills 514c5593f0 go/build: change the search order for "vendor/" paths based on srcDir
If srcDir is within GOROOT, prefer GOROOT.
Otherwise, prefer GOPATH.

The attached tests may seem a bit strange; they will make more sense
in a followup CL.

Updates #16333
Updates #30241
Updates #30228

Change-Id: Ic5f1334cce5e242d7f49080aba083bcf2080dee3
Reviewed-on: https://go-review.googlesource.com/c/go/+/164619
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-03-08 18:03:06 +00:00
Jay Conrod 10156b6783 cmd/go: avoid link errors when -coverpkg covers main packages
The -coverpkg lets users specify a list of packages that should have
coverage instrumentation. This may include packages not transitively
imported by tests. For each tested package, the synthetic main package
imports all covered packages so they can be registered with
testing.RegisterCover. This makes it possible for a main package to
import another main package.

When we compile a package with p.Internal.BuildInfo set (set on main
packages by Package.load in module mode), we set
runtime/debug.modinfo. Multiple main packages may be passed to the
linker because of the above scenario, so this causes duplicate symbol
errors.

This change copies p.Internal.BuildInfo to the synthetic main package
instead of the internal test package. Additionally, it forces main
packages imported by the synthetic test main package to be recompiled
for testing. Recompiled packages won't have p.Internal.BuildInfo set.

Fixes #30374

Change-Id: I06f028d55905039907940ec89d2835f5a1040203
Reviewed-on: https://go-review.googlesource.com/c/go/+/164877
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-08 15:34:40 +00:00
Bryan C. Mills 361a01983f cmd/api: use 'go list' to locate transitive dependencies of std
With standard-library modules and vendoring, the mapping from import
path to directory within the standard library is no longer entirely
trivial. Fortunately, 'go list' makes that mapping straightforward to
compute.

Updates #30241
Updates #30228

Change-Id: Iddd77c21a527b7acdb30c17bec8b4bbd43e23756
Reviewed-on: https://go-review.googlesource.com/c/go/+/165497
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-03-08 15:14:27 +00:00
Daniel Martí 49662bc6b0 all: simplify multiple for loops
If a for loop has a simple condition and begins with a simple
"if x { break; }"; we can simply add "!x" to the loop's condition.

While at it, simplify a few assignments to use the common pattern
"x := staticDefault; if cond { x = otherValue(); }".

Finally, simplify a couple of var declarations.

Change-Id: I413982c6abd32905adc85a9a666cb3819139c19f
Reviewed-on: https://go-review.googlesource.com/c/go/+/165342
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 14:29:19 +00:00
Tobias Klauser ce7534ff06 bytes: use Rabin-Karp algorithm for LastIndex
Implement LastIndex using the Rabin-Karp algorithm akin to
strings.LastIndex

name              old time/op  new time/op  delta
LastIndexHard1-8  3.16ms ± 1%  1.44ms ± 0%  -54.35%  (p=0.008 n=5+5)
LastIndexHard2-8  3.17ms ± 1%  1.45ms ± 0%  -54.27%  (p=0.008 n=5+5)
LastIndexHard3-8  3.05ms ± 1%  1.44ms ± 1%  -52.58%  (p=0.008 n=5+5)

Change-Id: Ie8ddd179cd84dfa00e3e4e2327ef932975c88670
Reviewed-on: https://go-review.googlesource.com/c/go/+/166258
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 13:46:43 +00:00
Tobias Klauser b4baa8dd1d bytes: add benchmark for LastIndex
Add BenchmarkLastIndexHard[1-3] in preparation for implementing
LastIndex using Rabin-Karp akin to strings.LastIndex

BenchmarkLastIndexHard1-8   	     500	   3162694 ns/op
BenchmarkLastIndexHard2-8   	     500	   3170475 ns/op
BenchmarkLastIndexHard3-8   	     500	   3051127 ns/op

Change-Id: Id99f85f9640e248958f2b4be4dfd8c974e3b50e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/166257
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 13:46:34 +00:00
Marat Khabibullin 3f3d604a7a go/cmd, crypto/x509, net/textproto, html/template: fix minor issues with nil values
Remove redundant checks for nil value, add missing nil checks to prevent tests from failing with 'nil pointer dereference'.

Fixes #30208.

Change-Id: I59091ba4014afcb5300567fd7e73fea43c6bb2ee
GitHub-Last-Rev: 20501470bb
GitHub-Pull-Request: golang/go#30226
Reviewed-on: https://go-review.googlesource.com/c/go/+/162657
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 13:24:07 +00:00
Bryan C. Mills d5e0b898a5 cmd/go: convert TestACL to a script test
Change-Id: Id25db146a317f2c5f5425cfabf4c3ca84066d5c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/165752
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2019-03-08 12:51:22 +00:00
Tobias Klauser 9153a3ef05 cmd/cgo: adjust comment about ignored pragma warnings
The warnings are not strictly tied to FreeBSD but to the clang version.
People could still be building with an old version of clang even if not
on FreeBSD. The -Wpragmas and -Waddress-of-packed-member warnings were
introduced in clang 4.0, so also adjust the comment accordingly.

This was discussed as part of CL 160777 which introduced these comments.

Updates #27619

Change-Id: I4988ffd08797dcc72cdc264d4abd20a114f70473
Reviewed-on: https://go-review.googlesource.com/c/go/+/165800
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-08 07:58:16 +00:00
Agniva De Sarker 055f16a9e9 cmd/doc: add a line gap after a method with no comment
Fixes #30492

Change-Id: Iec658bdf8bfac21e1bcc3eed900722cc535ec00a
Reviewed-on: https://go-review.googlesource.com/c/go/+/166178
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2019-03-08 07:12:55 +00:00
Rob Pike 6c6a0a1f2a encoding/gob: update documentation in doc.go for wireType
It was just out of date.

Fixes #30656

Change-Id: I1fab7dd93091865a8240769eca5dd19cdbc78b81
Reviewed-on: https://go-review.googlesource.com/c/go/+/166177
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-08 03:57:49 +00:00
Cezar Sa Espinola e341bae08d net: use network and host as singleflight key during lookupIP
In CL 120215 the cgo resolver was changed to have different logic based
on the network being queried. However, the singleflight cache key wasn't
updated to also include the network. This way it was possible for
concurrent queries to return the result for the wrong network.

This CL changes the key to include both network and host, fixing the
problem.

Fixes #30521

Change-Id: I8b41b0ce1d9a02d18876c43e347654312eba22fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/166037
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-08 01:21:52 +00:00
Russ Cox 6a9da69147 time: add support for day-of-year in Format and Parse
Day of year is 002 or __2, in contrast to day-in-month 2 or 02 or _2.
This means there is no way to print a variable-width day-of-year,
but that's probably OK.

Fixes #25689.

Change-Id: I1425d412cb7d2d360e9b3bf74e89566714e2477a
Reviewed-on: https://go-review.googlesource.com/c/go/+/122876
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2019-03-08 01:21:33 +00:00
Philipp Stephani 9586c093a2 cmd/cgo: add missing parameter list for function _cgo_wait_runtime_init_done
Fixes #29879

Change-Id: Id2061a5eab67bb90a8116dc4f16073be1c9a09a9
GitHub-Last-Rev: 186863ab6a
GitHub-Pull-Request: golang/go#29900
Reviewed-on: https://go-review.googlesource.com/c/go/+/159178
Reviewed-by: Philipp Stephani <phst@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-08 01:10:57 +00:00
Cherry Zhang 3a62f4ee40 cmd/link: fix suspicious code in emitPcln
In cmd/link/internal/ld/pcln.go:emitPcln, the code and the
comment don't match. I think the comment is right. Fix the code.

As a consequence, on Linux/AMD64, internal linking with PIE
buildmode with cgo (at least the cgo packages in the standard
library) now works. Add a test.

Change-Id: I091cf81ba89571052bc0ec1fa0a6a688dec07b04
Reviewed-on: https://go-review.googlesource.com/c/go/+/166017
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2019-03-07 23:09:46 +00:00
Peter Waller 7afd58d458 cmd/compile/internal/ssa: set OFOR bBody.Pos to AST Pos
Assign SSA OFOR's bBody.Pos to AST (*Node).Pos as it is created.

An empty for loop has no other information which may be used to give
correct position information in the resulting executable. Such a for
loop may compile to a single `JMP *self` and it is important that the
location of this is in the right place.

Fixes #30167.

Change-Id: Iec44f0281c462c33fac6b7b8ccfc2ef37434c247
Reviewed-on: https://go-review.googlesource.com/c/go/+/163019
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2019-03-07 22:27:52 +00:00
fanzha02 27cce773d3 cmd/compile: optimize arm64 comparison of x and 0.0 with "FCMP $(0.0), Fn"
Code:
func comp(x float64) bool {return x < 0}

Previous version:
  FMOVD	"".x(FP), F0
  FMOVD	ZR, F1
  FCMPD	F1, F0
  CSET	MI, R0
  MOVB	R0, "".~r1+8(FP)
  RET	(R30)

Optimized version:
  FMOVD	"".x(FP), F0
  FCMPD	$(0.0), F0
  CSET	MI, R0
  MOVB	R0, "".~r1+8(FP)
  RET	(R30)

Math package benchmark results:
name                   old time/op          new time/op          delta
Acos-8                   77.500000ns +- 0%    77.400000ns +- 0%   -0.13%  (p=0.000 n=9+10)
Acosh-8                  98.600000ns +- 0%    98.100000ns +- 0%   -0.51%  (p=0.000 n=10+9)
Asin-8                   67.600000ns +- 0%    66.600000ns +- 0%   -1.48%  (p=0.000 n=9+10)
Asinh-8                 108.000000ns +- 0%   109.000000ns +- 0%   +0.93%  (p=0.000 n=10+10)
Atan-8                   36.788889ns +- 0%    36.000000ns +- 0%   -2.14%  (p=0.000 n=9+10)
Atanh-8                 104.000000ns +- 0%   105.000000ns +- 0%   +0.96%  (p=0.000 n=10+10)
Atan2-8                  67.100000ns +- 0%    66.600000ns +- 0%   -0.75%  (p=0.000 n=10+10)
Cbrt-8                   89.100000ns +- 0%    82.000000ns +- 0%   -7.97%  (p=0.000 n=10+10)
Erf-8                    43.500000ns +- 0%    43.000000ns +- 0%   -1.15%  (p=0.000 n=10+10)
Erfc-8                   49.000000ns +- 0%    48.220000ns +- 0%   -1.59%  (p=0.000 n=9+10)
Erfinv-8                 59.100000ns +- 0%    58.600000ns +- 0%   -0.85%  (p=0.000 n=10+10)
Erfcinv-8                59.100000ns +- 0%    58.600000ns +- 0%   -0.85%  (p=0.000 n=10+10)
Expm1-8                  56.600000ns +- 0%    56.040000ns +- 0%   -0.99%  (p=0.000 n=8+10)
Exp2Go-8                 97.600000ns +- 0%    99.400000ns +- 0%   +1.84%  (p=0.000 n=10+10)
Dim-8                     2.500000ns +- 0%     2.250000ns +- 0%  -10.00%  (p=0.000 n=10+10)
Mod-8                   108.000000ns +- 0%   106.000000ns +- 0%   -1.85%  (p=0.000 n=8+8)
Frexp-8                  12.000000ns +- 0%    12.500000ns +- 0%   +4.17%  (p=0.000 n=10+10)
Gamma-8                  67.100000ns +- 0%    67.600000ns +- 0%   +0.75%  (p=0.000 n=10+10)
Hypot-8                  17.100000ns +- 0%    17.000000ns +- 0%   -0.58%  (p=0.002 n=8+10)
Ilogb-8                   9.010000ns +- 0%     8.510000ns +- 0%   -5.55%  (p=0.000 n=10+9)
J1-8                    288.000000ns +- 0%   287.000000ns +- 0%   -0.35%  (p=0.000 n=10+10)
Jn-8                    605.000000ns +- 0%   604.000000ns +- 0%   -0.17%  (p=0.001 n=8+9)
Logb-8                   10.600000ns +- 0%    10.500000ns +- 0%   -0.94%  (p=0.000 n=9+10)
Log2-8                   16.500000ns +- 0%    17.000000ns +- 0%   +3.03%  (p=0.000 n=10+10)
PowFrac-8               232.000000ns +- 0%   233.000000ns +- 0%   +0.43%  (p=0.000 n=10+10)
Remainder-8              70.600000ns +- 0%    69.600000ns +- 0%   -1.42%  (p=0.000 n=10+10)
SqrtGoLatency-8          77.600000ns +- 0%    76.600000ns +- 0%   -1.29%  (p=0.000 n=10+10)
Tanh-8                   97.600000ns +- 0%    94.100000ns +- 0%   -3.59%  (p=0.000 n=10+10)
Y1-8                    289.000000ns +- 0%   288.000000ns +- 0%   -0.35%  (p=0.000 n=10+10)
Yn-8                    603.000000ns +- 0%   589.000000ns +- 0%   -2.32%  (p=0.000 n=10+10)

Change-Id: I6920734f8662b329aa58f5b8e4eeae73b409984d
Reviewed-on: https://go-review.googlesource.com/c/go/+/164719
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 22:04:09 +00:00
fanzha02 6efd51c6b7 cmd/compile: change the condition flags of floating-point comparisons in arm64 backend
Current compiler reverses operands to work around NaN in
"less than" and "less equal than" comparisons. But if we
want to use "FCMPD/FCMPS $(0.0), Fn" to do some optimization,
the workaround way does not work. Because assembler does
not support instruction "FCMPD/FCMPS Fn, $(0.0)".

This CL sets condition flags for floating-point comparisons
to resolve this problem.

Change-Id: Ia48076a1da95da64596d6e68304018cb301ebe33
Reviewed-on: https://go-review.googlesource.com/c/go/+/164718
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2019-03-07 21:23:52 +00:00
Robert Griesemer a77f85a618 cmd/compile: remove work-arounds for 0o/0O octals
With math/big supporting the new octal prefixes directly,
the compiler doesn't have to manually convert such numbers
into old-style 0-prefix octals anymore.

Updates #12711.

Change-Id: I300bdd095836595426a1478d68da179f39e5531a
Reviewed-on: https://go-review.googlesource.com/c/go/+/165861
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2019-03-07 21:14:05 +00:00
Robert Griesemer 129c6e4496 math/big: support new octal prefixes 0o and 0O
This CL extends the various SetString and Parse methods for
Ints, Rats, and Floats to accept the new octal prefixes.

The main change is in natconv.go, all other changes are
documentation and test updates.

Finally, this CL also fixes TestRatSetString which silently
dropped certain failures.

Updates #12711.

Change-Id: I5ee5879e25013ba1e6eda93ff280915f25ab5d55
Reviewed-on: https://go-review.googlesource.com/c/go/+/165898
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-03-07 21:13:57 +00:00
Raul Silvera 2dd066d4a7 test: improve test coverage for heap sampling
Update the test in test/heapsampling.go to more thoroughly validate heap sampling.
Lower the sampling rate on the test to ensure allocations both smaller and
larger than the sampling rate are tested.

Tighten up the validation check to a 10% difference between the unsampled and correct value.
Because of the nature of random sampling, it is possible that the unsampled value fluctuates
over that range. To avoid flakes, run the experiment three times and only report an issue if the
same location consistently falls out of range on all experiments.

This tests the sampling fix in cl/158337.

Change-Id: I54a709e5c75827b8b1c2d87cdfb425ab09759677
GitHub-Last-Rev: 7c04f12603
GitHub-Pull-Request: golang/go#26944
Reviewed-on: https://go-review.googlesource.com/c/go/+/129117
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2019-03-07 21:05:15 +00:00
Chris Marchesi 6ebfbbaadf net/http: let Transport request body writes use sendfile
net.TCPConn has the ability to send data out using system calls such as
sendfile when the source data comes from an *os.File. However, the way
that I/O has been laid out in the transport means that the File is
actually wrapped behind two outer io.Readers, and as such the TCP stack
cannot properly type-assert the reader, ensuring that it falls back to
genericReadFrom.

This commit does the following:

* Removes transferBodyReader and moves its functionality to a new
doBodyCopy helper. This is not an io.Reader implementation, but no
functionality is lost this way, and it allows us to unwrap one layer
from the body.

* The second layer of the body is unwrapped if the original reader
was wrapped with ioutil.NopCloser, which is what NewRequest wraps the
body in if it's not a ReadCloser on its own. The unwrap operation
passes through the existing body if there's no nopCloser.

Note that this depends on change https://golang.org/cl/163737 to
properly function, as the lack of ReaderFrom implementation otherwise
means that this functionality is essentially walled off.

Benchmarks between this commit and https://golang.org/cl/163862,
incorporating https://golang.org/cl/163737:

linux/amd64:
name                        old time/op    new time/op    delta
FileAndServer_1KB/NoTLS-4     53.2µs ± 0%    53.3µs ± 0%      ~     (p=0.075 n=10+9)
FileAndServer_1KB/TLS-4       61.2µs ± 0%    60.7µs ± 0%    -0.77%  (p=0.000 n=10+9)
FileAndServer_16MB/NoTLS-4    25.3ms ± 5%     3.8ms ± 6%   -84.95%  (p=0.000 n=10+10)
FileAndServer_16MB/TLS-4      33.2ms ± 2%    13.4ms ± 2%   -59.57%  (p=0.000 n=10+10)
FileAndServer_64MB/NoTLS-4     106ms ± 4%      16ms ± 2%   -84.45%  (p=0.000 n=10+10)
FileAndServer_64MB/TLS-4       129ms ± 1%      54ms ± 3%   -58.32%  (p=0.000 n=8+10)

name                        old speed      new speed      delta
FileAndServer_1KB/NoTLS-4   19.2MB/s ± 0%  19.2MB/s ± 0%      ~     (p=0.095 n=10+9)
FileAndServer_1KB/TLS-4     16.7MB/s ± 0%  16.9MB/s ± 0%    +0.78%  (p=0.000 n=10+9)
FileAndServer_16MB/NoTLS-4   664MB/s ± 5%  4415MB/s ± 6%  +565.27%  (p=0.000 n=10+10)
FileAndServer_16MB/TLS-4     505MB/s ± 2%  1250MB/s ± 2%  +147.32%  (p=0.000 n=10+10)
FileAndServer_64MB/NoTLS-4   636MB/s ± 4%  4090MB/s ± 2%  +542.81%  (p=0.000 n=10+10)
FileAndServer_64MB/TLS-4     522MB/s ± 1%  1251MB/s ± 3%  +139.95%  (p=0.000 n=8+10)

darwin/amd64:
name                        old time/op    new time/op     delta
FileAndServer_1KB/NoTLS-8     93.0µs ± 5%     96.6µs ±11%      ~     (p=0.190 n=10+10)
FileAndServer_1KB/TLS-8        105µs ± 7%      100µs ± 5%    -5.14%  (p=0.002 n=10+9)
FileAndServer_16MB/NoTLS-8    87.5ms ±19%     10.0ms ± 6%   -88.57%  (p=0.000 n=10+10)
FileAndServer_16MB/TLS-8      52.7ms ±11%     17.4ms ± 5%   -66.92%  (p=0.000 n=10+10)
FileAndServer_64MB/NoTLS-8     363ms ±54%       39ms ± 7%   -89.24%  (p=0.000 n=10+10)
FileAndServer_64MB/TLS-8       209ms ±13%       73ms ± 5%   -65.37%  (p=0.000 n=9+10)

name                        old speed      new speed       delta
FileAndServer_1KB/NoTLS-8   11.0MB/s ± 5%   10.6MB/s ±10%      ~     (p=0.184 n=10+10)
FileAndServer_1KB/TLS-8     9.75MB/s ± 7%  10.27MB/s ± 5%    +5.26%  (p=0.003 n=10+9)
FileAndServer_16MB/NoTLS-8   194MB/s ±16%   1680MB/s ± 6%  +767.83%  (p=0.000 n=10+10)
FileAndServer_16MB/TLS-8     319MB/s ±10%    963MB/s ± 4%  +201.36%  (p=0.000 n=10+10)
FileAndServer_64MB/NoTLS-8   180MB/s ±31%   1719MB/s ± 7%  +853.61%  (p=0.000 n=9+10)
FileAndServer_64MB/TLS-8     321MB/s ±12%    926MB/s ± 5%  +188.24%  (p=0.000 n=9+10)

Updates #30377.

Change-Id: I631a73cea75371dfbb418c9cd487c4aa35e73fcd
GitHub-Last-Rev: 4a77dd1b80
GitHub-Pull-Request: golang/go#30378
Reviewed-on: https://go-review.googlesource.com/c/go/+/163599
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-03-07 20:11:21 +00:00
Komu Wairagu 9a71015860 runtime/pprof: document labels bug
Currently only CPU profile utilizes tag information.
This change documents that fact

Updates #23458

Change-Id: Ic893e85f63af0da9100d8cba7d3328c294e8c810
GitHub-Last-Rev: be99a12629
GitHub-Pull-Request: golang/go#27198
Reviewed-on: https://go-review.googlesource.com/c/go/+/131275
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-03-07 17:53:44 +00:00
royeo 91170d7201 log: make the name of error clearer
Change-Id: Id0398b51336cc74f2172d9b8e18cb1dcb520b9a0
GitHub-Last-Rev: b5cf80bf9d
GitHub-Pull-Request: golang/go#29931
Reviewed-on: https://go-review.googlesource.com/c/go/+/159537
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 15:36:29 +00:00
erifan01 4e2b0dda8c cmd/compile: eliminate unnecessary type conversions in TrailingZeros(16|8) for arm64
This CL eliminates unnecessary type conversion operations: OpZeroExt16to64 and OpZeroExt8to64.
If the input argrument is a nonzero value, then ORconst operation can also be eliminated.

Benchmarks:

name               old time/op  new time/op  delta
TrailingZeros-8    2.75ns ± 0%  2.75ns ± 0%     ~     (all equal)
TrailingZeros8-8   3.49ns ± 1%  2.93ns ± 0%  -16.00%  (p=0.000 n=10+10)
TrailingZeros16-8  3.49ns ± 1%  2.93ns ± 0%  -16.05%  (p=0.000 n=9+10)
TrailingZeros32-8  2.67ns ± 1%  2.68ns ± 1%     ~     (p=0.468 n=10+10)
TrailingZeros64-8  2.67ns ± 1%  2.65ns ± 0%   -0.62%  (p=0.022 n=10+9)

code:

func f16(x uint) { z = bits.TrailingZeros16(uint16(x)) }

Before:

"".f16 STEXT size=48 args=0x8 locals=0x0 leaf
        0x0000 00000 (test.go:7)        TEXT    "".f16(SB), LEAF|NOFRAME|ABIInternal, $0-8
        0x0000 00000 (test.go:7)        FUNCDATA        ZR, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        FUNCDATA        $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        FUNCDATA        $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        PCDATA  $2, ZR
        0x0000 00000 (test.go:7)        PCDATA  ZR, ZR
        0x0000 00000 (test.go:7)        MOVD    "".x(FP), R0
        0x0004 00004 (test.go:7)        MOVHU   R0, R0
        0x0008 00008 (test.go:7)        ORR     $65536, R0, R0
        0x000c 00012 (test.go:7)        RBIT    R0, R0
        0x0010 00016 (test.go:7)        CLZ     R0, R0
        0x0014 00020 (test.go:7)        MOVD    R0, "".z(SB)
        0x0020 00032 (test.go:7)        RET     (R30)

This line of code is unnecessary:
        0x0004 00004 (test.go:7)        MOVHU   R0, R0

After:

"".f16 STEXT size=32 args=0x8 locals=0x0 leaf
        0x0000 00000 (test.go:7)        TEXT    "".f16(SB), LEAF|NOFRAME|ABIInternal, $0-8
        0x0000 00000 (test.go:7)        FUNCDATA        ZR, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        FUNCDATA        $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        FUNCDATA        $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
        0x0000 00000 (test.go:7)        PCDATA  $2, ZR
        0x0000 00000 (test.go:7)        PCDATA  ZR, ZR
        0x0000 00000 (test.go:7)        MOVD    "".x(FP), R0
        0x0004 00004 (test.go:7)        ORR     $65536, R0, R0
        0x0008 00008 (test.go:7)        RBITW   R0, R0
        0x000c 00012 (test.go:7)        CLZW    R0, R0
        0x0010 00016 (test.go:7)        MOVD    R0, "".z(SB)
        0x001c 00028 (test.go:7)        RET     (R30)

The situation of TrailingZeros8 is similar to TrailingZeros16.

Change-Id: I473bdca06be8460a0be87abbae6fe640017e4c9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/156999
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 14:24:56 +00:00
erifan01 fee84cc905 cmd/compile: add an optimization rule for math/bits.ReverseBytes16 on arm
This CL adds two rules to turn patterns like ((x<<8) | (x>>8)) (the type of
x is uint16, "|" can also be "+" or "^") to a REV16 instruction on arm v6+.
This optimization rule can be used for math/bits.ReverseBytes16.

Benchmarks on arm v6:
name               old time/op  new time/op  delta
ReverseBytes-32    2.86ns ± 0%  2.86ns ± 0%   ~     (all equal)
ReverseBytes16-32  2.86ns ± 0%  2.86ns ± 0%   ~     (all equal)
ReverseBytes32-32  1.29ns ± 0%  1.29ns ± 0%   ~     (all equal)
ReverseBytes64-32  1.43ns ± 0%  1.43ns ± 0%   ~     (all equal)

Change-Id: I819e633c9a9d308f8e476fb0c82d73fb73dd019f
Reviewed-on: https://go-review.googlesource.com/c/go/+/159019
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 13:37:54 +00:00
Chris Marchesi a2ace8ec18 net/http: unfurl persistConnWriter's underlying writer
Make persistConnWriter implement io.ReaderFrom, via an io.Copy on the
underlying net.Conn. This in turn enables it to use OS level
optimizations such as sendfile.

This has been observed giving performance gains even in the absence
of ReaderFrom, more than likely due to the difference in io's default
buffer (32 KB) versus bufio's (4 KB).

Speedups on linux/amd64:
benchmark                               old MB/s     new MB/s     speedup
BenchmarkFileAndServer_16MB/NoTLS-4     662.96       2703.74      4.08x
BenchmarkFileAndServer_16MB/TLS-4       552.76       1420.72      2.57x

Speedups on darwin/amd64:
benchmark                               old MB/s     new MB/s     speedup
BenchmarkFileAndServer_16MB/NoTLS-8     357.58       1972.86      5.52x
BenchmarkFileAndServer_16MB/TLS-8       346.20       1067.41      3.08x

Updates #30377.

Change-Id: Ic88d4ac254f665223536fcba4d551fc32ae105b6
GitHub-Last-Rev: a6f67cda2e
GitHub-Pull-Request: golang/go#30390
Reviewed-on: https://go-review.googlesource.com/c/go/+/163737
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-03-07 07:48:16 +00:00
alkesh26 c7f69a2897 misc: fix typos in various docs
Change-Id: Ib03d7e5686e510152042e403b00fb2d65572f393
GitHub-Last-Rev: 57aeedf077
GitHub-Pull-Request: golang/go#30156
Reviewed-on: https://go-review.googlesource.com/c/go/+/161723
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-03-07 07:30:06 +00:00
Martin Möhrmann 3b6216ed06 runtime: remove CPU capability workarounds for unsupported FreeBSD versions
This CL removes runtime code working around missing ARM processor capability
information in the auxiliary vector in older FreeBSD versions.

As announced in the Go 1.12 release notes Go 1.13 will require FreeBSD 11.2+
or FreeBSD 12.0+. These FreeBSD versions support CPU capability detection
through AT_HWCAP and AT_HWCAP2 values stored in the auxiliary vector.

Updates #27619

Change-Id: I2a457b578d35101a7a5fd56ae9b81b300ad17da4
Reviewed-on: https://go-review.googlesource.com/c/go/+/165799
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 07:23:45 +00:00
Andrei Matei 9e72e604a6 database/sql: fix comment grammar
Change-Id: I92d8c93967c5ec57f07151affd0041f00e405057
GitHub-Last-Rev: 2dea977d93
GitHub-Pull-Request: golang/go#30551
Reviewed-on: https://go-review.googlesource.com/c/go/+/164970
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-07 05:19:01 +00:00
Rob Pike fd19bc64de doc: add missing paragraph break in Effective Go
A recent edit broke the flow; add a paragraph break when the subject
switches from maps to structs.

No changes in wording.

Change-Id: I5df88ec36b9d81931cfdbc684424440d01ac06d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/165917
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-07 04:46:03 +00:00
Russ Cox fe954ea1e2 cmd/go: add notary simulation and GONOVERIFY support
As an experiment to better understand the impact of
having an authoritative source of truth for module hashes
before the real notary is available, this CL adds the basic
notary authorization checks using a partial whitelist of
known go.sum values for popular modules.

In addition to the temporary whitelist, this CL adds code
implementing $GONOVERIFY, a new 'go help modules-auth',
and clearer error messages for verification mismatches.

See #25530 for notary proposal.
Filed #30601 to remove whitelist when notary lands.

Change-Id: Ibcb6ac39c5e60455edf003d8c20af6932aeb7e88
Reviewed-on: https://go-review.googlesource.com/c/go/+/165380
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-07 01:45:06 +00:00
Ian Lance Taylor a6436a5655 cmd/cgo: use explicit type for arg with bad pointer typedef
Fixes #30646

Change-Id: I5b7e986b0588e87b9781cce01445e3c55c06b6fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/165897
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-07 01:42:23 +00:00
Keith Randall 9dc3b8b722 reflect: fix more issues with StructOf GC programs
First the insidious bug:

  var n uintptr
  for n := elemPtrs; n > 120; n -= 120 {
    prog = append(prog, 120)
    prog = append(prog, mask[:15]...)
    mask = mask[15:]
  }
  prog = append(prog, byte(n))
  prog = append(prog, mask[:(n+7)/8]...)

The := breaks this code, because the n after the loop is always 0!

We also do need to handle field padding correctly. In particular
the old padding code doesn't correctly handle fields that are not
a multiple of a pointer in size.

Fixes #30606.

Change-Id: Ifcab9494dc25c20116753c5d7e0145d6c2053ed8
Reviewed-on: https://go-review.googlesource.com/c/go/+/165860
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-07 00:06:12 +00:00
Rebecca Stambler e269f4ce01 go/constant: add Val accessor and Make constructor to handle varied types
This change adds a Val accessor that returns the underlying type for a
given constant.Value. This change also adds a Make constructor that builds a
constant.Value given a value of a specific type.

Fixes #29820

Change-Id: I4fc3f5221408e24af42ffecd21ce4099ee75b47a
Reviewed-on: https://go-review.googlesource.com/c/go/+/164538
Reviewed-by: Robert Griesemer <gri@golang.org>
2019-03-06 23:36:59 +00:00
Alessandro Arzilli 4d8a37a6d9 cmd/link: fix contents of debug_pubnames/debug_pubtypes
The contents of debug_pubnames and debug_pubtypes have been wrong since
Go 1.12.
CL golang.org/cl/137235 moved global variables DIE to their respective
compilation unit, unfortunately writepub can't emit correct sections
for anything but the first compilation unit.

This commit moves the code generating debug_pubnames and debug_pubtypes
inside writeinfo and fixes it.
Gets rid of a number of unnecessary relocations as well as a hack that
writeinfo used to communicate to writepub the size of each compilation
unit.

Fixes #30573

Change-Id: Ibdaa80c02746ae81661c2cfe1d218092c5ae9236
Reviewed-on: https://go-review.googlesource.com/c/go/+/165337
Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-03-06 23:18:15 +00:00
Dmitri Shuralyov 1a6c0c6baf cmd/go: document GoVersion field in Module struct
The 'go version' statement was added during Go 1.11 development in
CL 125940. That CL added the GoVersion field to modinfo.ModulePublic
struct, but did not document it in cmd/go documentation. This was
consistent with the CL description, which stated "We aren't planning
to use this or advertise it much yet".

CL 147281, applied during Go 1.12 development, was a change to start
adding the 'go version' statement when initializing go.mod. The 'go
version' statement is now being used, and it has been documented in
the Go 1.12 release notes at https://golang.org/doc/go1.12#modules.
It's now due time to documement the GoVersion field in cmd/go as well.

Keep the Error field bottom-most, both because it makes sense not to
place it in the middle of other fields, and for consistency with the
field order in struct Package, where the Error information is located
at the very bottom.

Regenerate alldocs.go by running mkalldocs.sh.

Updates #28221
Updates #23969

Change-Id: Iaf43a0da4f6a2489d861092a1d4e002a532952cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/164878
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-06 21:35:04 +00:00
Ian Lance Taylor c5babcc485 runtime: align first persistentalloc chunk as requested
Change-Id: Ib391e019b1a7513d234fb1c8ff802efe8fa7c950
Reviewed-on: https://go-review.googlesource.com/c/go/+/163859
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2019-03-06 21:33:41 +00:00