- 15 Nov, 2018 1 commit
-
-
Alan Donovan authored
Change-Id: I3b3035784ce89ba2ac5ab8f6448c45a3d38fa97d Reviewed-on: https://go-review.googlesource.com/c/149778 Run-TryBot: Alan Donovan <adonovan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 14 Nov, 2018 14 commits
-
-
Keith Randall authored
Starting with 1.12, we must use syscall versions of sysctl instead of the raw syscall. An identical CL went into the source copy at golang.org/x/net/route. This is just a cherry pick of that CL. (CL: https://go-review.googlesource.com/c/net/+/148597) Change-Id: I6286ab3e49f82512491afb5bcf349e89ab5645ab Reviewed-on: https://go-review.googlesource.com/c/149637Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
When CL 147160 introduced function ABIs encoded as symbol versions in the linker, it became slightly more complicated to look up derived DWARF symbols. It fixed this by introducing a dwarfFuncSym function to hide this logic, but missed one derived lookup that was done in the object reader itself. As a result, we lost the isStmt tables from the compiler, so every PC was marked as a statement in the DWARF info. Fix this by moving this derived lookup out of the object reader and into the DWARF code and calling dwarfFuncSym to get the correctly versioned symbol. Should fix the linux-amd64-longtest builder. Updates #27539. Change-Id: If40d5ba28bab1918ac4ad18fbb5103666b6d978b Reviewed-on: https://go-review.googlesource.com/c/149605 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Martin Möhrmann authored
Change internal/cpu feature configuration to use GODEBUG=cpu.feature1=value,cpu.feature2=value... instead of GODEBUGCPU=feature1=value,feature2=value... . This is not a backwards compatibility breaking change since GODEBUGCPU was introduced in go1.11 as an undocumented compiler experiment. Fixes #28757 Change-Id: Ib21b3fed2334baeeb061a722ab1eb513d1137e87 Reviewed-on: https://go-review.googlesource.com/c/149578 Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Alan Donovan authored
Also, add a script for future updates. Change-Id: I2565d1f26532b9dd7cf9d8ce198ba08fb3d53407 Reviewed-on: https://go-review.googlesource.com/c/149604 Run-TryBot: Alan Donovan <adonovan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Michael Matloob <matloob@golang.org>
-
Brad Fitzpatrick authored
Fixes #19943 Change-Id: I5e0fefe44791d7b3556095d726c2a753ec551ef2 Reviewed-on: https://go-review.googlesource.com/c/147457 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dmitri Shuralyov <dmitshur@golang.org>
-
Keith Randall authored
I've never seen a case where unsafe arithmetic is used to generate a nil. (Something like var x uintptr; unsafe.Pointer(x - x).) We can assume that if someone is doing arithmetic with pointers, the result will be non-nil. Our unsafe rules already forbid this, although we should be more explicit. RELNOTE=It is invalid to convert a nil unsafe.Pointer to uintptr and back, with arithmetic. (This was already invalid, but this statement has been added for clarification.) Fixes #27180 Change-Id: I1880b7725a9fd99e4613799930fdad9aaa99e8f0 Reviewed-on: https://go-review.googlesource.com/c/146058Reviewed-by:
Austin Clements <austin@google.com>
-
Ali Rizvi-Santiago authored
This allows one to customize which ar to use by fetching its path from the environment. This way one can swap it out for a different implementation. Change-Id: I40d8cbd8a69e97b5254e66081d9bf0b726c10366 GitHub-Last-Rev: 4aa1d631eaca58be6c3a4be40f7404fa75a0db25 GitHub-Pull-Request: golang/go#28746 Reviewed-on: https://go-review.googlesource.com/c/149117 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Martin Möhrmann authored
fmtBytes is in the top 10 callers of runtime.slicebytetostring according to Google wide profiling data. Avoid the string conversion of the input byte slice in fmtBytes by calling a newly added specialized fmtS function for byte slices. Expand tests for verb s with widths to test strings and byte slice arguments. SprintfTruncateString 157ns ± 4% 156ns ± 3% ~ (p=0.122 n=20+20) SprintfTruncateBytes 188ns ± 2% 155ns ± 3% -18.00% (p=0.000 n=20+19) name old alloc/op new alloc/op delta SprintfTruncateString 16.0B ± 0% 16.0B ± 0% ~ (all equal) SprintfTruncateBytes 64.0B ± 0% 16.0B ± 0% -75.00% (p=0.000 n=20+20) name old allocs/op new allocs/op delta SprintfTruncateString 1.00 ± 0% 1.00 ± 0% ~ (all equal) SprintfTruncateBytes 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=20+20) Change-Id: I461bf514d4232b39bd9c812f7faa4e5ef693a03b Reviewed-on: https://go-review.googlesource.com/c/145284 Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Martin Möhrmann authored
The current support_XXX variables are specific for the amd64 and 386 platforms. Prefix processor capability variables by architecture to have a consistent naming scheme and avoid reuse of the existing variables for new platforms. This also aligns naming of runtime variables closer with internal/cpu processor capability variable names. Change-Id: I3eabb29a03874678851376185d3a62e73c1aff1d Reviewed-on: https://go-review.googlesource.com/c/91435 Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Mark Rushakoff authored
Given a nonexistent directory above a wildcard: go run ./nonexistent/... Print this error instead of panicking: go run: no packages loaded from ./nonexistent/... Fixes #28696. Change-Id: Iaa3bc5c78b14ef858d931778e1bc55ca626c5571 GitHub-Last-Rev: bb1a80483ad26c8cf646cf0900d08cfe49aba535 GitHub-Pull-Request: golang/go#28703 Reviewed-on: https://go-review.googlesource.com/c/148821 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Bryan C. Mills <bcmills@google.com> Reviewed-by:
Emmanuel Odeke <emm.odeke@gmail.com>
-
Milan Knezevic authored
When using soft-float, OMUL might be rewritten to function call so we should ensure it was evaluated first. Fixes #28688 Change-Id: I30b87501782fff62d35151f394a1c22b0d490c6c Reviewed-on: https://go-review.googlesource.com/c/148837 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Cherry Zhang <cherryyz@google.com>
-
Clément Chigot authored
Add GOOS=linux to vet_asm script to avoid errors on OS not working on amd64 architecture. Change-Id: Ic3db43618008ae8e8bc08738c95c200dd4e916d7 Reviewed-on: https://go-review.googlesource.com/c/149577Reviewed-by:
Alan Donovan <adonovan@google.com> Run-TryBot: Alan Donovan <adonovan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel T Odeke authored
Move the empty header file created by "builddir", "buildrundir" directives to t.tempDir. The file was accidentally placed in the same directory as the source code and this was a vestige of CL 146999. Fixes #28781 Change-Id: I3d2ada5f9e8bf4ce4f015b9bd379b311592fe3ce Reviewed-on: https://go-review.googlesource.com/c/149458 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
The bootstrap stage 1 compiler was defaulting to the language version used by the bootstrap compiler itself, typically 1.4. Normally this doesn't matter since the bootstrap code has to build with 1.4 anyhow, but it broke the boringcrypto branch which uses cgo during the bootstrap, as cgo now generates code that uses type aliases. Change-Id: I8a8312bb9ca4befaf65c00a8d71a78566075c2f7 Reviewed-on: https://go-review.googlesource.com/c/149459 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Filippo Valsorda <filippo@golang.org>
-
- 13 Nov, 2018 18 commits
-
-
Austin Clements authored
Because run.go doesn't pass the package being compiled to the compiler via the -p flag, it can't match up the main·f symbol from the assembler with the "func f" stub in Go, so it doesn't produce the correct assembly stub. Fix this by removing the package prefix from the assembly definition. Alternatively, we could make run.go pass -p to the compiler, but it's nicer to remove these package prefixes anyway. Should fix the linux-arm builder, which was broken by the introduction of function ABIs in CL 147160. Updates #27539. Change-Id: Id62b7701e1108a21a5ad48ffdb5dad4356c273a6 Reviewed-on: https://go-review.googlesource.com/c/149483 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
When we set an explicit argmap, we may want only a prefix of that argmap. Argmap is set when the function is reflect.makeFuncStub or reflect.methodValueCall. In this case, arglen specifies how much of the args section is actually live. (It could be either all the args + results, or just the args.) Fixes #28750 Change-Id: Idf060607f15a298ac591016994e58e22f7f92d83 Reviewed-on: https://go-review.googlesource.com/c/149217 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
Keith Randall authored
When we delete an element, and it was the last element in the bucket, update the slots between the new last element and the old last element with the marker that says "no more elements beyond here". Change-Id: I8efeeddf4c9b9fc491c678f84220a5a5094c9c76 Reviewed-on: https://go-review.googlesource.com/c/142438Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Daniel Martí authored
Now that vet can rely on go/types, there's no reason to do extra work to avoid using it. The rewrite lets us get rid of the field list flattening code, as well as the slight verbosity that comes with go/printer. While at it, make the testdata/method.go expected errors be more specific, to make sure that we're not breaking the warnings that are printed. Finally, update whitelist/all.txt, since the reported errors now include qualified types. Change-Id: I760a1b3b1f60e4a478c9dc43bd7f584a8459593e Reviewed-on: https://go-review.googlesource.com/c/148919 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Samuel Kelemen authored
ln5: "instrutions" => "instructions"; ln159: "immedate" => "immediate"; Change-Id: Ifb94a9c145d1911ed92f12883213245beee2bd67 GitHub-Last-Rev: 78627835e76c6d837a72badd5fc28ba27f0a6ff7 GitHub-Pull-Request: golang/go#28776 Reviewed-on: https://go-review.googlesource.com/c/149378Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Hana Kim authored
When module is enabled, the go tool embeds build information related to the module in the binary including the dependencies and the replace information (See src/cmd/go/internal/modload.PackageBuildInfo). The newly introduced ReadBuildInfo reads the information and makes it accessible programmatically. Update #26404 Change-Id: Ide37022d609b4a8fb6b5ce02afabb73f04fbb532 Reviewed-on: https://go-review.googlesource.com/c/144220 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Fangming.Fang authored
Changes include: 1. enable compiler option -race for arm64 2. add runtime/race_arm64.s to manage the calls from Go to the compiler-rt runtime 3. change racewalk.go to call racefuncenterfp instead of racefuncenter on arm64 to allow the caller pc to be obtained in the asm code before calling the tsan version 4. race_linux_arm64.syso comes from compiler-rt which just supports 48bit VA, compiler-rt is fetched from master branch which latest commit is 3aa2b775d08f903f804246af10b Fixes #25682 Change-Id: I04364c580b8157fd117deecae74a4656ba16e005 Reviewed-on: https://go-review.googlesource.com/c/138675 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Cherry Zhang <cherryyz@google.com>
-
Alan Donovan authored
The "gofiles" cache entry has been renamed "srcfiles", and it includes non-Go files (.s, .c, .cxx) that belong to the package. It does not include raw cgo files. Added regression test. Fixes #27665 Change-Id: I4884fe9b4f823f50705f8c2d357a04a8e567734f Reviewed-on: https://go-review.googlesource.com/c/148904Reviewed-by:
Bryan C. Mills <bcmills@google.com>
-
Russ Cox authored
I see no reason Plan 9 should be special cased. A directory named go.mod is not useful on any system. Followup to CL 129804. Change-Id: I9cc91b5934b17650bfdb07370aa73aeae445968c Reviewed-on: https://go-review.googlesource.com/c/149337 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Bryan C. Mills <bcmills@google.com>
-
Than McIntosh authored
The code to implement new-style gccgo name mangling had a recipe that didn't quite match that of the compiler (incorrect handling for '.'). This showed up as a failure in the gotools cgo test if the directory containing the test run included a "." character. [This is a copy of https://golang.org/cl/147917]. Change-Id: Ia94728ecead879c8d223eb6cee6c102a8af1c86e Reviewed-on: https://go-review.googlesource.com/c/147937Reviewed-by:
Cherry Zhang <cherryyz@google.com>
-
Russ Cox authored
This reverts CL 144137. Reason for revert: The justification for the original commit was that golint said so, but golint is wrong. The code reads more clearly the original way. Change-Id: I960f286ed66fec67aabd953e7b69993f60b00bca Reviewed-on: https://go-review.googlesource.com/c/149339Reviewed-by:
Russ Cox <rsc@golang.org>
-
Martin Garton authored
Since Reader.Peek potentially reads from the underlying io.Reader, discarding previous buffers, UnreadRune and UnreadByte cannot necessarily work. Change Peek to invalidate the unread buffers in all cases (as allowed according to the documentation) and thus prevent hiding bugs in the caller. (This change was previoiusly merged and then reverted due concern about being too close to a release) Fixes #18556 Change-Id: I9027d75aa834d4b27703f37711ba25de04d89f3c GitHub-Last-Rev: 917ef1e51131d734f92efc946a0ab5ca4ff69be6 GitHub-Pull-Request: golang/go#28768 Reviewed-on: https://go-review.googlesource.com/c/149297 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Followup to CL 129779 but also some other minor tweaks. Change-Id: Id71455d8a14f5e33f82c942c9e892da56c49d17c Reviewed-on: https://go-review.googlesource.com/c/149257 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
The form of runtime.Version is not guaranteed to be helpful. Do not suggest it. (The suggestion was added in CL 136215.) Change-Id: I3227d2e66b6ce860b7e62d7ba531c18fb173823c Reviewed-on: https://go-review.googlesource.com/c/149258 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
CL 145577 added the part about io.ReadFull to read len(p) but it should be next to the existing sentence about not reading len(p) bytes. Change-Id: Idfa037c59a3085d44d5da6129188473db0e96d23 Reviewed-on: https://go-review.googlesource.com/c/148903 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Brad Fitzpatrick authored
Fixes #26937 Change-Id: I6cdc1bad4cf476cd2ea1462b53444eccd8841e14 Reviewed-on: https://go-review.googlesource.com/c/146437 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dmitri Shuralyov <dmitshur@golang.org>
-
Robert Griesemer authored
Adjusted spec to explicitly define the string length as the number of bytes of the string; the prose now matches the prose for arrays. Made analogous change for slices. Fixes #28736. Change-Id: I47cab321c87de0a4c482f5466b819b2cc8993fd1 Reviewed-on: https://go-review.googlesource.com/c/149077Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Ian Lance Taylor authored
Change-Id: Iad10d0a2dbc8e12e9f776c6cfb34070f584fd439 Reviewed-on: https://go-review.googlesource.com/c/149057 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Emmanuel Odeke <emm.odeke@gmail.com>
-
- 12 Nov, 2018 7 commits
-
-
Emmanuel T Odeke authored
To avoid any cancelation of the parent context from affecting lookupGroup operations, Resolver.LookupIPAddr previously used an entirely new context created from context.Background(). However, this meant that all the values in the parent context with which LookupIPAddr was invoked were dropped. This change provides a custom context implementation that only preserves values of the parent context by composing context.Background() and the parent context. It only falls back to the parent context to perform value lookups if the parent context has not yet expired. This context is never canceled, and has no deadlines. Fixes #28600 Change-Id: If2f570caa26c65bad638b7102c35c79d5e429fea Reviewed-on: https://go-review.googlesource.com/c/148698 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Filippo Valsorda authored
The Config does not own the memory pointed to by the Certificate slice. Instead, opportunistically use Certificate.Leaf and let the application set it if it desires the performance gain. This is a partial rollback of CL 107627. See the linked issue for the full explanation. Fixes #28744 Change-Id: I33ce9e6712e3f87939d9d0932a06d24e48ba4567 Reviewed-on: https://go-review.googlesource.com/c/149098Reviewed-by:
Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ali Rizvi-Santiago authored
This adds the includes for errno.h to the windows stubs for runtime/cgo so that "errno" is properly declared. Due to "errno" not being properly declared, the compiler is forced to assume it's an external which leaves it up to the linker. This is an issue in some implementations as errno might be a macro which results in an unresolved symbol error during linking. runtime/cgo/gcc_libinit_windows.c: added include runtime/cgo/gcc_windows_386.c: added include runtime/cgo/gcc_windows_amd64.c: added include Change-Id: I77167d02f7409462979135efc55cf50bbc6bd363 GitHub-Last-Rev: 90da06ee3cbec3f51c6d31185868bb70341ce9d3 GitHub-Pull-Request: golang/go#28747 Reviewed-on: https://go-review.googlesource.com/c/149118 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
SSA lowering can create PFUNC ONAME nodes when compiling method calls. Since we generally initialize the node's Sym to a func when we set its class to PFUNC, we did this here, too. Unfortunately, since SSA compilation is concurrent, this can cause a race if two function compilations try to initialize the same symbol. Luckily, we don't need to do this at all, since we're actually just wrapping an ONAME node around an existing Sym that's already marked as a function symbol. Fixes the linux-amd64-racecompile builder, which was broken by CL 147158. Updates #27539. Change-Id: I8ddfce6e66a08ce53998c5bfa6f5a423c1ffc1eb Reviewed-on: https://go-review.googlesource.com/c/149158 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Austin Clements authored
We create the "init" symbol and mark it as a function before compiling to SSA because SSA can initialize this symbol, but it turns out we do it slightly too late. peekitabs, at least, can also create the "init" LSym. Move this initialization to just after type-checking. Fixes the linux-amd64-ssacheck and the android-arm64-wiko-fever builders. Updates #27539. Change-Id: If145952c79d39f75c93b24e35e67fe026dd08329 Reviewed-on: https://go-review.googlesource.com/c/149137 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
Austin Clements authored
This fixes the linux-amd64-longtest builder, which was broken by CL 147160. Updates #27539. Change-Id: If6e69581ef503bba2449ec9bacaa31f34f59beb1 Reviewed-on: https://go-review.googlesource.com/c/149157Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
This implements compiler and linker support for separating the function calling ABI into two ABIs: a stable and an internal ABI. At the moment, the two ABIs are identical, but we'll be able to evolve the internal ABI without breaking existing assembly code that depends on the stable ABI for calling to and from Go. The Go compiler generates internal ABI symbols for all Go functions. It uses the symabis information produced by the assembler to create ABI wrappers whenever it encounters a body-less Go function that's defined in assembly or a Go function that's referenced from assembly. Since the two ABIs are currently identical, for the moment this is implemented using "ABI alias" symbols, which are just forwarding references to the native ABI symbol for a function. This way there's no actual code involved in the ABI wrapper, which is good because we're not deriving any benefit from it right now. Once the ABIs diverge, we can eliminate ABI aliases. The linker represents these different ABIs internally as different versions of the same symbol. This way, the linker keeps us honest, since every symbol definition and reference also specifies its version. The linker is responsible for resolving ABI aliases. Fixes #27539. Change-Id: I197c52ec9f8fc435db8f7a4259029b20f6d65e95 Reviewed-on: https://go-review.googlesource.com/c/147160 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-