- 11 Dec, 2017 9 commits
-
-
Stanislav Afanasev authored
Change-Id: I6d94a14a781a2fbeb90db35ae3490ce2ac5f8ed1 Reviewed-on: https://go-review.googlesource.com/83315Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Bonventre authored
Change-Id: Ie7f2890eab9ad82da93babc92380b13c611af3d0 Reviewed-on: https://go-review.googlesource.com/83375Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Andrew Bonventre authored
Use “substantial”, which is believed to be the correct word. Additionally, this change strips trailing whitespace from the file. Change-Id: I5b6b718fc09e4b8b911b95e8be0733abd58e165d Reviewed-on: https://go-review.googlesource.com/83356Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
The Builder's ReadFrom method allows the underlying unsafe slice to escape, and for callers to subsequently modify memory that had been unsafely converted into an immutable string. In the original proposal for Builder (#18990), I'd noted there should be no Read methods: > There would be no Reset or Bytes or Truncate or Read methods. > Nothing that could mutate the []byte once it was unsafely converted > to a string. And in my prototype (https://golang.org/cl/37767), I handled ReadFrom properly, but when https://golang.org/cl/74931 arrived, I missed that it had a ReadFrom method and approved it. Because we're so close to the Go 1.10 release, just remove the ReadFrom method rather than think about possible fixes. It has marginal utility in a Builder anyway. Also, fix a separate bug that also allowed mutation of a slice's backing array after it had been converted into a slice by disallowing copies of the Builder by value. Updates #18990 Fixes #23083 Fixes #23084 Change-Id: Id1f860f8a4f5f88b32213cf85108ebc609acb95f Reviewed-on: https://go-review.googlesource.com/83255Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
When we write a cached test result, we now also write a log of the environment variables and files inspected by the test run, along with a hash of their content. Before reusing a cached test result, we recompute the hash of the content specified by the log, and only use the result if that content has not changed. This makes test caching behave correctly for tests that consult environment variables or stat or read files or directories. Fixes #22593. Change-Id: I8608798e73c90e0c1911a38bf7e03e1232d784dc Reviewed-on: https://go-review.googlesource.com/81895 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Wèi Cōngruì authored
Change-Id: I0c387b6286bc18fd00c6ac4e42bdf175cf89ccb1 Reviewed-on: https://go-review.googlesource.com/83155Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
Currently, wbBufFlush does nothing if the goroutine is dying on the assumption that the system is crashing anyway and running the write barrier may crash it even more. However, it fails to reset the buffer's "next" pointer. As a result, if there are later write barriers on the same P, the write barrier will overflow the write barrier buffer and start corrupting other fields in the P or other heap objects. Often, this corrupts fields in the next allocated P since they tend to be together in the heap. Fix this by always resetting the buffer's "next" pointer, even if we're not doing anything with the pointers in the buffer. Updates #22987 and #22988. (May fix; it's hard to say.) Change-Id: I82c11ea2d399e1658531c3e8065445a66b7282b2 Reviewed-on: https://go-review.googlesource.com/83016 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Austin Clements authored
heapBits.bits is used during bulkBarrierPreWrite via heapBits.isPointer, which means it must not be preempted. If it is preempted, several bad things can happen: 1. This could allow a GC phase change, and the resulting shear between the barriers and the memory writes could result in a lost pointer. 2. Since bulkBarrierPreWrite uses the P's local write barrier buffer, if it also migrates to a different P, it could try to append to the write barrier buffer concurrently with another write barrier. This can result in the buffer's next pointer skipping over its end pointer, which results in a buffer overflow that can corrupt arbitrary other fields in the Ps (or anything in the heap, really, but it'll probably crash from the corrupted P quickly). Fix this by marking heapBits.bits go:nosplit. This would be the perfect use for a recursive no-preempt annotation (#21314). This doesn't actually affect any binaries because this function was always inlined anyway. (I discovered it when I was modifying heapBits and make h.bits() no longer inline, which led to rampant crashes from problem 2 above.) Updates #22987 and #22988 (but doesn't fix because it doesn't actually change the generated code). Change-Id: I60ebb928b1233b0613361ac3d0558d7b1cb65610 Reviewed-on: https://go-review.googlesource.com/83015 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Rick Hudson <rlh@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #23073 Change-Id: Ia43b28beeff9e57579caf5dcb76146ee29d5033b Reviewed-on: https://go-review.googlesource.com/82918Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 10 Dec, 2017 2 commits
-
-
Alex Brainman authored
Parts of TestUDPConnSpecificMethods and TestWriteToUDP fail, because UDPConn.WriteMsgUDP is broken on Windows XP. UDPConn.WriteMsgUDP uses Windows WSASendMsg API, but that call is not implemented on Windows XP (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms741692(v=vs.85).aspx for details) Update #23072 Change-Id: I4e8f149bc62bd87cd7c199e6832b9ce479af0a3e Reviewed-on: https://go-review.googlesource.com/83077 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alex Brainman authored
For #23072 Change-Id: I089feafef2900413d46f2358b6e41ab78187eced Reviewed-on: https://go-review.googlesource.com/83076Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 09 Dec, 2017 2 commits
-
-
Tobias Klauser authored
Change-Id: I2ad5d73deaee57ccbb2c75378dcc2884e43be3bb Reviewed-on: https://go-review.googlesource.com/82899Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
On DragonFly mmap with MAP_STACK returns the top of the region, not the bottom. Rather than try to cope, just don't use the flag anywhere. Fixes #23061 Change-Id: Ib5df4dd7c934b3efecfc4bc87f8989b4c37555d7 Reviewed-on: https://go-review.googlesource.com/83035 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
- 08 Dec, 2017 17 commits
-
-
Matthew Dempsky authored
The package unsafe docs say it's safe to convert an unsafe.Pointer to uintptr in the argument list to an assembly function, but it was erroneously only detecting normal pointers converted to unsafe.Pointer and then to intptr. Fixes #23051. Change-Id: Id1be19f6d8f26f2d17ba815191717d2f4f899732 Reviewed-on: https://go-review.googlesource.com/82817 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This essentially applies https://golang.org/cl/81636 to the net package. The full truth seems too complicated to write in this method's doc, so I'm going with a simple half truth. The full truth is that File returns the descriptor in blocking mode, because that is historically how it worked, and existing programs would be surprised if the descriptor is suddenly non-blocking. On Unix systems whether a socket is non-blocking or not is a property of the underlying file description, not of a particular file descriptor, so changing the returned descriptor to blocking mode also changes the existing socket to blocking mode. Blocking mode works fine, althoug I/O operations now take up a thread. SetDeadline and friends rely on the runtime poller, and the runtime poller only works if the descriptor is non-blocking. So it's correct that calling File disables SetDeadline. The other half of the truth is that if the program is willing to work with a non-blocking descriptor, it could call syscall.SetNonblock(f.Fd(), true) to change the descriptor, and the original socket, to non-blocking mode. At that point SetDeadline would start working again. I tried to write that in a way that is short and comprehensible but failed. Since we now have the RawConn approach to frobbing the descriptor, and hopefully most people can use that rather than calling File, I decided to punt. Updates #22934 Fixes #21862 Change-Id: If269da762f6f5a88c334e7b6d6f3998f7e10b11e Reviewed-on: https://go-review.googlesource.com/82915Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jeff Johnson authored
Re-work the test to use wmic instead of PowerShell's getmac that's only avaliable on Server 2008. Maintains duplicate detection added for golang/go#21027. Tested on windows-amd64-{2008, 2012, 2016} buildlets. Enabling for Windows XP because it should work[1]. Fixes golang/go#20073 [1] https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic_overview.mspx?mfr=true Change-Id: Ic11d569f7964f61d08ae0dcc1b926efc5336ac5b Reviewed-on: https://go-review.googlesource.com/82975Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Paul Boyd authored
Change-Id: If553950446158cee486006ba85c3663b986008a6 Reviewed-on: https://go-review.googlesource.com/82936Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This test has been getting occasional timeouts on the race builder. The point of the test is whether a file descriptor leaks, not whether the connection occurs in a certain amount of time. So use a very large timeout. The connection is normally fast and the timeout doesn't matter. Updates #13324 Change-Id: Ie1051c4a0be1fca4e63b1277101770be0cdae512 Reviewed-on: https://go-review.googlesource.com/82916 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Update #22906 Update #21897 Change-Id: I73709b2fdac6981d4bc2f7dab0767f2dd7be3be5 Reviewed-on: https://go-review.googlesource.com/82917Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
The jobject type is declared as a pointer, but some JVMs (Dalvik, ART) store non-pointer values in them. In Go, we must use uintptr instead of a real pointer for these types. This is similar to the CoreFoundation types on Darwin which were "fixed" in CL 66332. Update #22906 Update #21897 RELNOTE=yes Change-Id: I0d4c664501d89a696c2fb037c995503caabf8911 Reviewed-on: https://go-review.googlesource.com/81876 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Change-Id: I33f14ea1d58e18081bae3f16c87d11312249c842 Reviewed-on: https://go-review.googlesource.com/82835Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Caleb Spare authored
Change-Id: I235c5bc7ce598047eccc1518984dd27f568046a2 Reviewed-on: https://go-review.googlesource.com/82776 Run-TryBot: Caleb Spare <cespare@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Samuel Tan authored
This error message should reference t2, not t1. Change-Id: I2e42b8335ca9367a1fb7f76c38a1bcf8f32a2bf3 Reviewed-on: https://go-review.googlesource.com/82816Reviewed-by: Gabriel Aszalos <gabriel.aszalos@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Gabriel Aszalos <gabriel.aszalos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rhys Hiltner authored
This was originally done in https://golang.org/cl/31359 but partially undone (apparently unintentionally) in https://golang.org/cl/34310 Fix it, and update tests to ensure the error is unrecoverable. Fixes #23039 Change-Id: I923ebd613a05e67d8acce77f4a68c64c8574faa6 Reviewed-on: https://go-review.googlesource.com/82656 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Ian Lance Taylor authored
The DNS code can start goroutines and not wait for them to complete. This does no harm, but in tests this can cause a race condition with the test hooks that are installed and unintalled around the tests. Add a WaitGroup that tests of DNS can use to avoid the race. Fixes #21090 Change-Id: I6c1443a9c2378e8b89d0ab1d6390c0e3e726b0ce Reviewed-on: https://go-review.googlesource.com/82795Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Samuel Tan authored
If (*Template).New replaces an existing template, reset the existing template that is going to be replaced so that any later attempt to execute this orphaned template will fail. Fixes #22780 Change-Id: I0e058f42c1542c86d19dc5f6c4e1e859e670a4a2 Reviewed-on: https://go-review.googlesource.com/78542 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
Pointer arithemetic is done mod 2^32 on 386, so we can just drop the high bits of any large constant offsets. The bounds check will make sure wraparounds are never observed. Fixes #21655 Change-Id: I68ae5bbea9f02c73968ea2b21ca017e5ecb89223 Reviewed-on: https://go-review.googlesource.com/82675 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Brad Fitzpatrick authored
Change-Id: I65209b90ed7c56d4c751b3e4b3ce1de52dae368c Reviewed-on: https://go-review.googlesource.com/82635Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
I can reproduce with a very short timeout (fractions of a millisecond) combined with -race. But given that this is inherently sensitive to actual time, add a testing mechanism to retry with increasingly large times to compensate for busy buidlers. This also means the test is usually faster now, too, since we can start with smaller durations. Fixes #19608 Change-Id: I3a222464720195849da768e9801eb7b43baa4aeb Reviewed-on: https://go-review.googlesource.com/82595 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
It's unused and doesn't work. Fixes #20833 Change-Id: I09335e84c60f88dd1771f7353b0097f36a5e7660 Reviewed-on: https://go-review.googlesource.com/82636 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 07 Dec, 2017 10 commits
-
-
Brad Fitzpatrick authored
It's 32-bit binaries that fail for reasons unknown on 64-bit kernels. Change-Id: Ib410af0491160e3ed8d32118966142516123db2c Reviewed-on: https://go-review.googlesource.com/82655Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I28ddb8cd347120c08d5b58ae20f481b60416abc1 Reviewed-on: https://go-review.googlesource.com/82755Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Brad Fitzpatrick authored
Fixes #21681 Updates #21728 Change-Id: I79cf4564c1355ecab891102d4215cbbffd8eb0ce Reviewed-on: https://go-review.googlesource.com/82535Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Joe Kyo authored
Change-Id: I5a38200b9e050b484ec39f47c637e651e237390d Reviewed-on: https://go-review.googlesource.com/82536Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
Change-Id: Ib8ef626ae6bc66571ecf4569e37feb75b4b90d10 Reviewed-on: https://go-review.googlesource.com/82555Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Than McIntosh authored
The DWARF inline info generation code was using file/line/column (from src.Pos) as a means of matching up pre- and post-optimization variable nodes. This turns out to be problematic since it looks as though distinct formals on the same line can be assigned the same column number. Work around this issue by adding variable names to the disambiguation code. Added a testpoint to the linker DWARF test that checks to make sure each abstract origin offset of distinct within a given DWARF DW_AT_inlined_routine body. Fixes #23020. Change-Id: Ie09bbe01dc60822d84d4085547b138e644036fb3 Reviewed-on: https://go-review.googlesource.com/82396Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Andrew Bonventre authored
Change-Id: I2a4347540ecb94a9f124a228dc31452620ab0645 Reviewed-on: https://go-review.googlesource.com/82335Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Artyom Pervukhin authored
Closes #23028 Change-Id: I469f1ab2dee9151334b38e0d3a22eb9840c8807b Reviewed-on: https://go-review.googlesource.com/82495Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Fixes #22858 Change-Id: I0478d5609e381f01c7345e7f53c24af05d7f78ad Reviewed-on: https://go-review.googlesource.com/82415 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Updates x/arch/arm64 to git rev. 530ae47 for CL 82437. Change-Id: I0131f7ac783462fcaeddf5625c59784fe30bbd5a Reviewed-on: https://go-review.googlesource.com/82435Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-