- 27 Nov, 2018 8 commits
-
-
Elias Naur authored
After CL 151139 introduced a plugin test, the macOS linker for iOS outputs: ld: warning: -flat_namespace is deprecated on iOS Omit the -flat_namespace flag on iOS; plugins are not supported on iOS, and unlikely to ever be. Change-Id: I2d08f8b984efcfd442d572b4a0f3a2c95c551b9f Reviewed-on: https://go-review.googlesource.com/c/151300 Run-TryBot: Elias Naur <elias.naur@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
TestImportTableInUnknownSection uses kernel32.dll file, but the error message mentions atmfd.dll. Adjust error message to match the test. This change should have been part of CL 151137. Updates #27904 Change-Id: Ifc31a12134b328472191122f8426ab6ed234fbd4 Reviewed-on: https://go-review.googlesource.com/c/151477 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Alex Brainman authored
When building windows/386 executable that imports "plugin" package, cmd/link adds reference to DLL with blank name. Running objdump -x a.exe reports ... The Import Tables (interpreted .idata section contents) ... DLL Name: vma: Hint/Ord Member-Name Bound-To 25308a 0 _GLOBAL_OFFSET_TABLE_ ... So, obviously, executable cannot run, because Windows complains that it cannot find DLL when trying to run it. Stop using _GLOBAL_OFFSET_TABLE_ on windows/386. Fixes #28789 Change-Id: Idd489eafd998f6e329f40c5d90a2a8965ab1d873 Reviewed-on: https://go-review.googlesource.com/c/151139 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Bryan C. Mills authored
We were using the mode reported by ReadDir to decide whether each entry is a file, but in the case of symlinks that isn't sufficient: a symlink could point to either a file or a directory, and if it is a file we should treat it as such. Fixes #28107 Change-Id: Icf6e495dce427a7b1124c9cc9f085e40a215c169 Reviewed-on: https://go-review.googlesource.com/c/141097 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brian Kessler authored
Div panics when y<=hi because either the quotient overflows the size of the output or division by zero occurs when y==0. This provides a uniform behavior for all implementations. Fixes #28316 Change-Id: If23aeb10e0709ee1a60b7d614afc9103d674a980 Reviewed-on: https://go-review.googlesource.com/c/149517Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brian Kessler authored
Note that the intrinsic implementation panics separately for overflow and divide by zero, which matches the behavior of the pure go implementation. There is a modest performance improvement after intrinsic implementation. name old time/op new time/op delta Div-4 53.0ns ± 1% 47.0ns ± 0% -11.28% (p=0.008 n=5+5) Div32-4 18.4ns ± 0% 18.5ns ± 1% ~ (p=0.444 n=5+5) Div64-4 53.3ns ± 0% 47.5ns ± 4% -10.77% (p=0.008 n=5+5) Updates #28273 Change-Id: Ic1688ecc0964acace2e91bf44ef16f5fb6b6bc82 Reviewed-on: https://go-review.googlesource.com/c/144378 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Brian Kessler authored
Explicitly check for divide-by-zero/overflow and panic with the appropriate runtime error. The additional checks have basically no effect on performance since the branch is easily predicted. name old time/op new time/op delta Div-4 53.9ns ± 1% 53.0ns ± 1% -1.59% (p=0.016 n=4+5) Div32-4 17.9ns ± 0% 18.4ns ± 0% +2.56% (p=0.008 n=5+5) Div64-4 53.5ns ± 0% 53.3ns ± 0% ~ (p=0.095 n=5+5) Updates #28316 Change-Id: I36297ee9946cbbc57fefb44d1730283b049ecf57 Reviewed-on: https://go-review.googlesource.com/c/144377 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Don't convert values that aren't Go constants, like uintptr(unsafe.Pointer(nil)), to a literal constant. This avoids assuming they are constants for things like indexing, array sizes, case duplication, etc. Also, nil is an allowed duplicate in switches. CTNILs aren't Go constants. Fixes #28078 Fixes #28079 Change-Id: I9ab8af47098651ea09ef10481787eae2ae2fb445 Reviewed-on: https://go-review.googlesource.com/c/151320 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Nov, 2018 13 commits
-
-
Clément Chigot authored
XCOFF files can't have multiples text or data sections. The name of each type section must be .text, .data and .bss. This commit also updates cmd/internal/objfile/xcoff.go to retrieve Go sections using runtime symbols. Change-Id: Ib6315f19dad2d154a4531fc6508e7cbd8bc94743 Reviewed-on: https://go-review.googlesource.com/c/151037 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Fixes #28955 Change-Id: I738ad0c76f7bf8fc504a48cf55d3becd5ed7a9d6 Reviewed-on: https://go-review.googlesource.com/c/151337Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Clément Chigot authored
On XCOFF, it is forbidden relocation of a DATA pointer to a text section. It happens when a RODATA symbol needs a DATA symbol's address. This commit moves every RODATA symbols with a R_ADDR on a data symbol to .data sections to avoid these relocations. Change-Id: I7f34d8e0ebdc8352a74e6b40e4c893d8d9419f4d Reviewed-on: https://go-review.googlesource.com/c/146977Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
When a slice composite literal is sparse, initialize it dynamically instead of statically. s := []int{5:5, 20:20} To initialize the backing store for s, use 2 constant writes instead of copying from a static array with 21 entries. This CL also fixes pathologies in the compiler when the slice is *very* sparse. Fixes #23780 Change-Id: Iae95c6e6f6a0e2994675cbc750d7a4dd6436b13b Reviewed-on: https://go-review.googlesource.com/c/151319 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Abort evconst if its argument isn't a Go constant. The SSA backend will do the optimizations in question later. They tend to be weird cases, like uintptr(unsafe.Pointer(uintptr(1))). Fix OADDSTR and OCOMPLEX cases in isGoConst. OADDSTR has its arguments in n.List, not n.Left and n.Right. OCOMPLEX might have a 2-result function as its arg in List[0] (in which case it isn't a Go constant). Fixes #24760 Change-Id: Iab312d994240d99b3f69bfb33a443607e872b01d Reviewed-on: https://go-review.googlesource.com/c/151338 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
This experiment is less effective and less needed since the introduction of stack objects. We can't clobber stack objects because we don't know statically whether they are live or not. We don't really need this experiment that much any more, as it was primarily used to test the complicated ambiguously-live logic in the liveness analysis, which has been removed in favor of stack objects. It is also ~infeasible to maintain once we have safepoints everywhere. Fixes #27326 Change-Id: I3bdde480b93dd508d048703055d4586b496176af Reviewed-on: https://go-review.googlesource.com/c/151317 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Than McIntosh authored
This patch merges in support for reading indexed type export data, from the gofrontend CL https://golang.org/cl/143022 (which includes a change in the export data version number from V2 to V3). Also fixes the key tests to insure that they run both in gccgo builds and main Go repo builds if "gccgo" is present (prior to this the tests were not running in either scenario); this required fixing up some of the expected results. Fixes #28961. Change-Id: I644d171f2a46be9160f89dada06ab3c20468bab7 Reviewed-on: https://go-review.googlesource.com/c/149957 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
In assembly free packages (aka "complete" or "pure go"), allow bodyless functions if they are linkname'd to something else. Presumably the thing the function is linkname'd to has a definition. If not, the linker will complain. And linkname is unsafe, so we expect users to know what they are doing. Note this handles only one direction, where the linkname directive is in the local package. If the linkname directive is in the remote package, this CL won't help. (See os/signal/sig.s for an example.) Fixes #23311 Change-Id: I824361b4b582ee05976d94812e5b0e8b0f7a18a6 Reviewed-on: https://go-review.googlesource.com/c/151318 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Jordan Rhee authored
The exception handler modifies the stack and continuation context so it looks like the faulting code calls sigpanic() directly. The call was not set up correctly on ARM, because it did not handle the link register correctly. This change handles the link register correctly for ARM. Updates #28854 Change-Id: I7ccf838adfc05cd968a5edd7d19ebba6a2478360 Reviewed-on: https://go-review.googlesource.com/c/150957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Clément Chigot authored
This commit adapts compile tool to create correct nilchecks for AIX. AIX allows to load a nil pointer. Therefore, the default nilcheck which issues a load must be replaced by a CMP instruction followed by a store at 0x0 if the value is nil. The store will trigger a SIGSEGV as on others OS. The nilcheck algorithm must be adapted to do not remove nilcheck if it's only a read. Stores are detected with v.Type.IsMemory(). Tests related to nilptr must be adapted to the previous changements. nilptr.go cannot be used as it's because the AIX address space starts at 1<<32. Change-Id: I9f5aaf0b7e185d736a9b119c0ed2fe4e5bd1e7af Reviewed-on: https://go-review.googlesource.com/c/144538 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Clément Chigot authored
This commit allows the runtime to handle 64bits addresses returned by mmap syscall on AIX. Mmap syscall returns addresses on 59bits on AIX. But the Arena implementation only allows addresses with less than 48 bits. This commit increases the arena size up to 1<<60 for aix/ppc64. Update: #25893 Change-Id: Iea72e8a944d10d4f00be915785e33ae82dd6329e Reviewed-on: https://go-review.googlesource.com/c/138736Reviewed-by: Austin Clements <austin@google.com>
-
Rob Pike authored
Now that maps are printed in deterministic order, the map example can have multiple keys without breaking the build. Change-Id: Iccec0cd76a3d41c75d8d4eb768ec0ac09ad9f2ad Reviewed-on: https://go-review.googlesource.com/c/151218Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The String method is n-squared and overwrites its receiver. Fix both issues, with only a slight loss of clarity. Fixes #28773 Change-Id: I588f69d4cbd72931b28b984671512834473bd466 Reviewed-on: https://go-review.googlesource.com/c/151217Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Nov, 2018 1 commit
-
-
Alex Brainman authored
TestImportTableInUnknownSection was introduced in CL 110555 to test PE executable with import table located in section other than ".idata". We used atmfd.dll for that purpose, but it seems atmfd.dll is not present on some systems. Use kernel32.dll instead. kernel32.dll import table is located in ".rdata" section, so it should do the job. And every Windows system has kernel32.dll file. Also make TestImportTableInUnknownSection run on windows-arm, since windows-arm should also have kernel32.dll file. Updates #27904 Change-Id: Ie005ee10e46ae0c06e83929d581e89f86c051eea Reviewed-on: https://go-review.googlesource.com/c/151137 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Nov, 2018 4 commits
-
-
David Chase authored
This makes it easier to track names of function arguments for debugging purposes. Change-Id: Ic34856fe0b910005e1c7bc051d769d489a4b158e Reviewed-on: https://go-review.googlesource.com/c/150098 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Yury Smolsky authored
This CL adds a button that collapses values list of a block. Button is displayed for every block with non-empty values. Change-Id: I4b65af81e25349f38341df487d42698c9d006a00 Reviewed-on: https://go-review.googlesource.com/c/144557 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Austin Clements authored
On some platforms, assembly in internal/syscall/unix references unexported runtime symbols. Catch these references so the compiler can generate the necessary ABI wrappers. Fixes #28769. Updates #27539. Change-Id: I118eebfb8b3d907b4c3562198e6afb49854f5827 Reviewed-on: https://go-review.googlesource.com/c/149817 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Clément Chigot <clement.chigot@atos.net> Reviewed-by: Keith Randall <khr@golang.org>
-
Cherry Zhang authored
When using softfloat, floating point ops are rewritten to integer ops. The types of store ops were not rewritten. This may lower to floating point stores, which are problematic. This CL fixes this by rewriting the store types as well. This fixes test/fixedbugs/issue28688.go on Wasm. Softfloat mode is not used by default on Wasm, and it is not needed as Wasm spec supports floating points. But it is nice to have the correct types. Change-Id: Ib5e19e19fa9491b15c2f60320f8724cace5cefb5 Reviewed-on: https://go-review.googlesource.com/c/149965 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 22 Nov, 2018 2 commits
-
-
David Heuschmann authored
UserHomeDir used to return an empty string if the corresponding environment variable was not set. Changed it to return an error if the variable is not set, to have the same signature and behaviour as UserCacheDir. Fixes #28562 Change-Id: I42c497e8011ecfbbadebe7de1751575273be221c Reviewed-on: https://go-review.googlesource.com/c/150418 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Hana Kim authored
The performance improvement is not as big as we hoped. Until the API is feature complete, we postpone the release and avoid added complexity. This change was prepared by reverting all the changes affected src/cmd/trace and src/internal/traceparser packages after golang.org/cl/137635, and then bringing back MMU computation APIs (originally in src/internal/traceparser) to the src/internal/trace package. Revert "cmd/trace: use new traceparser to parse the raw trace files" This reverts https://golang.org/cl/145457 (commit 08816cb8). Revert "internal/traceparser: provide parser that uses less space and parses segments of runtime trace files" This reverts https://golang.org/cl/137635 (commit daaf361f). Change-Id: Ic2a068a7dbaf4053cd9674ca7bde9c58e74385b4 Reviewed-on: https://go-review.googlesource.com/c/150517 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
- 21 Nov, 2018 8 commits
-
-
David du Colombier authored
CL 150497 enabled TestRemoveAllDot on "noat" systems. However, this test is failing on Plan 9 because the rmdir system call allows to remove "." on Plan 9. This change prevents the "noat" implementation of RemoveAll to remove ".", so it remains consistent with the "at" implementation. Fixes #28903. Change-Id: Ifc8fe36bdd8053a4e416f0590663c844c97ce72a Reviewed-on: https://go-review.googlesource.com/c/150621 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Chase authored
This case was missed entirely and caused such params to be unprintable. This change gives them stack addresses for the entire function (which is correct). Change-Id: Ia4f706450219e48bce65b6395d3d9792df142fb5 Reviewed-on: https://go-review.googlesource.com/c/150657 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
-
Yury Smolsky authored
CL 142517 has used some formats incorrectly. This change fixes it by using %v for errors and invoking Block.Kind.String(). Format map stays intact. Updates #28177 Change-Id: If53b6cc54ba3c1ffc17b005225787e3b546de404 Reviewed-on: https://go-review.googlesource.com/c/150798 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Austin Clements authored
This adds a debug check to throw immediately if any pointers are added to the gcWork buffer after the mark completion barrier. The intent is to catch the source of the cached GC work that occasionally produces "P has cached GC work at end of mark termination" failures. The result should be that we get "throwOnGCWork" throws instead of "P has cached GC work at end of mark termination" throws, but with useful stack traces. This should be reverted before the release. I've been unable to reproduce this issue locally, but this issue appears fairly regularly on the builders, so the intent is to catch it on the builders. This probably slows down the GC slightly. For #27993. Change-Id: I5035e14058ad313bfbd3d68c41ec05179147a85c Reviewed-on: https://go-review.googlesource.com/c/149969 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
For #27993. Change-Id: I20127e8a9844c2c488f38e1ab1f8f5a27a5df03e Reviewed-on: https://go-review.googlesource.com/c/149968 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
haormj authored
Fixes #28904 Change-Id: I8d416c47479a266735a39c926fd2f0f2bb25d57b GitHub-Last-Rev: 3a7865a5be27937833cf4f65c242c639e51665c4 GitHub-Pull-Request: golang/go#28907 Reviewed-on: https://go-review.googlesource.com/c/150737Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Yury Smolsky authored
This CL adds CFGs to ssa.html. It execs dot to generate SVG, which then gets inlined into the html. Some standard naming and javascript hacks enable integration with the rest of ssa.html. Clicking on blocks highlights the relevant part of the CFG, and vice versa. Sample output and screenshots can be seen in #28177. CFGs can be turned on with the suffix mask: :* - dump CFG for every phase :lower - just the lower phase :lower-layout - lower through layout :w,x-y - phases w and x through y Calling dot after every pass is noticeably slow, instead use the range of phases. Dead blocks are not displayed on CFG. User can zoom and pan individual CFG when the automatic adjustment has failed. Dot-related errors are reported without bringing down the process. Fixes #28177 Change-Id: Id52c42d86c4559ca737288aa10561b67a119c63d Reviewed-on: https://go-review.googlesource.com/c/142517 Run-TryBot: Yury Smolsky <yury@smolsky.by> Reviewed-by: David Chase <drchase@google.com>
-
Cherry Zhang authored
In race mode, these functions are defined and declared in different packages, which therefore don't have implicit arg maps. When they are defer'd, and the stack needs to move, the runtime fails with missing stack maps. This CL adds arg maps (FUNCDATA) to them. Updates #28848 Change-Id: I0271563b7e78e7797ce2990c303dced957efaa86 Reviewed-on: https://go-review.googlesource.com/c/150457 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 20 Nov, 2018 4 commits
-
-
Richard Musiol authored
Using fmt.Scanln in a browser environment caused a panic, since there was no stub for fs.read. This commit adds a stub that returns ENOSYS. Fixes #27773. Change-Id: I79b019039e4bc90da51d71a4edddf3bd7809ff45 Reviewed-on: https://go-review.googlesource.com/c/150617 Run-TryBot: Richard Musiol <neelance@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
The playground is not using GOOS=js, so it is not able to use the package syscall/js. Examples that depend on syscall/js should not show a "Run" button. Fixes #28526. Change-Id: I8b2fcdd0c0ee517a5c3864bf459f813129542389 Reviewed-on: https://go-review.googlesource.com/c/148918Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Return a PathError instead of an unwrapped syscall.EINVAL if the path ends with dots. As suggested by Roger Peppe in CL 150158. Change-Id: I4d82a6ff64a979b67a843a1cc4fea58ed9326aed Reviewed-on: https://go-review.googlesource.com/c/150160 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Prohibiting RemoveAll with paths that end in ".." was added with CL 137442 in this release cycle, but it worked before and it should continue to work. Also run TestRemoveAllDot on all systems; the test is not specific to the use of unlinkat and friends. Change-Id: I277784c8915cd748fec318d2936062440d5d1fde Reviewed-on: https://go-review.googlesource.com/c/150497Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-