- 17 Jun, 2015 15 commits
-
-
Mikio Hara authored
Change-Id: Ia5c6d9fb114be65d7c20c7eb97ed696977051031 Reviewed-on: https://go-review.googlesource.com/11167Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This fixes a hang during runtime.TestTraceStress. It also fixes double-scan of stacks, which leads to stack barrier installation failures. Both of these have shown up as flaky failures on the dashboard. Fixes #10941. Change-Id: Ia2a5991ce2c9f43ba06ae1c7032f7c898dc990e0 Reviewed-on: https://go-review.googlesource.com/11089Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
Adjust timestamps in TestABIChecking to make sure that the library and executable are rebuilt when expected. Change-Id: I3288c254ba8201b5b4255347b0cb056fa0908657 Reviewed-on: https://go-review.googlesource.com/11128Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Yves Junqueira <yves.junqueira@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Change-Id: I0fcc35f43bc6059e6203af6134319cfc060c4b9a Reviewed-on: https://go-review.googlesource.com/11085Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
//go:systemstack means that the function must run on the system stack. Add one use in runtime as a demonstration. Fixes #9174. Change-Id: I8d4a509cb313541426157da703f1c022e964ace4 Reviewed-on: https://go-review.googlesource.com/10840Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com>
-
Yongjian Xu authored
Change-Id: I750900e0aed9ec528fea3f442c35196773e3ba5e Reviewed-on: https://go-review.googlesource.com/11163Reviewed-by: Minux Ma <minux@golang.org>
-
Mikio Hara authored
Change-Id: Ib0b0be901f2ed52e1b432ae62f0b1940eb27ecc3 Reviewed-on: https://go-review.googlesource.com/11137Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Jeremy Jackins authored
I updated some references to 6g, 6l and friends that I came across, as those programs don't exist anymore. I also fixed some echos in make.rc to match other make.* scripts while I was there. Change-Id: Ib84532cd4688cf65174dd9869e5d42af98a20a48 Reviewed-on: https://go-review.googlesource.com/11162Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Joe Tsai authored
Corrected several issues: * RFC1951 section 3.2.7 dictates that it is okay for the HDist tree to have a single code of zero bits. Furthermore, the behavior of the C zlib library permits empty trees even when there are more than one codes. * RFC1951 section 3.2.5 shows that HLit codes 286 and 287 are invalid. Thus, Go's implementation should choke on inputs using these codes. * RFC1951 section 3.2.5 and 3.2.7 are ambiguous about whether the number of HDist codes can be greater than 30. The C zlib library (which is the canonical reference implementation) performs this check here: https://github.com/madler/zlib/blob/62d6112a7981ad7c34f3b43cffdf00d4662a4f25/inflate.c#L906 In addition, a number of test cases were added to the unit tests that exercises these edge cases. The test cases listed in TestStreams will either fail or succeed in a manner matching the behaviour of the C zlib version. Given that the C zlib implementation is the reference for the world, Go's implementation should match C zlib behaviour. Fixes #11030 Change-Id: Ic24e4e40ce5832c7e1930249246e86d34bfedaa6 Reviewed-on: https://go-review.googlesource.com/11000Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Alex Brainman authored
Change-Id: If6dc3acdc023ac78f63e257974cd2d2e9f1cca10 Reviewed-on: https://go-review.googlesource.com/11161Reviewed-by: Andrew Gerrand <adg@golang.org>
-
David Chase authored
Also modified test/run.go to ignore messages prefixed <autogenerated> because those cannot be described with "// ERROR ...", and backed out patch from issue #9537 because it is no longer necessary. The reasons described in the 9537 discussion for why escape analysis cannot run late no longer hold, happily. Fixes #11053. Change-Id: Icb14eccdf2e8cde3d0f8fb8a216b765400a96385 Reviewed-on: https://go-review.googlesource.com/11088Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Chase <drchase@google.com>
-
Alex Brainman authored
This change reintroduces CL 8523. CL 8523 was reverted because it broke darwin and netbsd builds. Now that this test is part of "go tool dist test" command we could skip OSes that fail. Updates #10360 Change-Id: Iaaeb5b800126492f36415a439c333a218fe4ab67 Reviewed-on: https://go-review.googlesource.com/11119Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
So the tests don't interfere with each other on windows. Fixes #11217 Change-Id: I4b3936bc64c95c7274298d6f137b24a28876b625 Reviewed-on: https://go-review.googlesource.com/11138Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
This change allows LookupAddr to use getnameinfo through cgo for working together with various name services other than DNS. Fixes #7855. Change-Id: I5b3b4aefe3d1b904541c3350865734d8cbb1c1c4 Reviewed-on: https://go-review.googlesource.com/3420Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I854a093b9e1a62d2515ca114ee84956510925921 Reviewed-on: https://go-review.googlesource.com/10839Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 16 Jun, 2015 15 commits
-
-
Robert Griesemer authored
This flag is not needed in the std repo because we don't have tests requiring it. Remove it before it's frozen into the API. Change-Id: I18b861eea146ad67e7a3c26ee8be681d8065ef12 Reviewed-on: https://go-review.googlesource.com/11150Reviewed-by: Alan Donovan <adonovan@google.com>
-
Michael Hudson-Doyle authored
This makes the behaviour match what happens when duplicate symbols are read from regular object files and fixes errors about cgoAlwaysFalse when linking an executable that uses cgo against a shared library. Change-Id: Ibb8cd8fe3f7813cde504b7483f1e857868d7e063 Reviewed-on: https://go-review.googlesource.com/11117Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David du Colombier authored
TestHostname was re-enabled in CL 10753. However, on Plan 9 the hostname is not obtained by executing a "hostname" command, but by reading the #c/sysname file. Change-Id: I80c0e303f4983fe39ceb300ad64e2c4a8392b695 Reviewed-on: https://go-review.googlesource.com/11033 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
Currently, when shrinkstack computes whether the halved stack allocation will have enough room for the stack, it accounts for the stack space that's actively in use but fails to leave extra room for the stack guard space. As a result, *if* the minimum stack size is small enough or the guard large enough, it may shrink the stack and leave less than enough room to run nosplit functions. If the next function called after the stack shrink is a nosplit function, it may overflow the stack without noticing and overwrite non-stack memory. We don't think this is happening under normal conditions right now. The minimum stack allocation is 2K and the guard is 640 bytes. The "worst case" stack shrink is from 4K (4048 bytes after stack barrier array reservation) to 2K (2016 bytes after stack barrier array reservation), which means the largest "used" size that will qualify for shrinking is 4048/4 - 8 = 1004 bytes. After copying, that leaves 2016 - 1004 = 1012 bytes of available stack, which is significantly more than the guard space. If we were to reduce the minimum stack size to 1K or raise the guard space above 1012 bytes, the logic in shrinkstack would no longer leave enough space. It's also possible to trigger this problem by setting firstStackBarrierOffset to 0, which puts stack barriers in a debug mode that steals away *half* of the stack for the stack barrier array reservation. Then, the largest "used" size that qualifies for shrinking is (4096/2)/4 - 8 = 504 bytes. After copying, that leaves (2096/2) - 504 = 8 bytes of available stack; much less than the required guard space. This causes failures like those in issue #11027 because func gc() shrinks its own stack and then immediately calls casgstatus (a nosplit function), which overflows the stack and overwrites a free list pointer in the neighboring span. However, since this seems to require the special debug mode, we don't think it's responsible for issue #11027. To forestall all of these subtle issues, this commit modifies shrinkstack to correctly account for the guard space when considering whether to halve the stack allocation. Change-Id: I7312584addc63b5bfe55cc384a1012f6181f1b9d Reviewed-on: https://go-review.googlesource.com/10714Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Issues #10240, #10541, #10941, #11023, #11027 and possibly others are indicating memory corruption in the runtime. One of the easiest places to both get corruption and detect it is in the allocator's free lists since they appear throughout memory and follow strict invariants. This commit adds a check when sweeping a span that its free list is sane and, if not, it prints the corrupted free list and panics. Hopefully this will help us collect more information on these failures. Change-Id: I6d417bcaeedf654943a5e068bd76b58bb02d4a64 Reviewed-on: https://go-review.googlesource.com/10713Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Austin Clements <austin@google.com>
-
Russ Cox authored
Change-Id: I401ce8d612160a4f4ee617bddca6827fa544763a Reviewed-on: https://go-review.googlesource.com/11087Reviewed-by: Austin Clements <austin@google.com>
-
Mikio Hara authored
Change-Id: I2cd58a665d9df26583128c633c443325dcc3f288 Reviewed-on: https://go-review.googlesource.com/11131Reviewed-by: Minux Ma <minux@golang.org>
-
Russ Cox authored
Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
The motivation of TestLookupHost was to test codepaths on LookupHost, LookupIP when we set CGO_ENABLED=1. Now we have serveral tests on those APIs and their codepaths such as TestLookupGooglePublicDNSAddr, TestCgoLookupIP, TestGoLookupIP, and the test using the ambiguous source "localhost" is unnecessary. Fixes #11182. Change-Id: I397c823e1648114d91a229b316477bff2948b4f9 Reviewed-on: https://go-review.googlesource.com/11057Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Sadly examples cannot use the new internal/testenv, so this is extends the crude build tag restriction in this file. Change-Id: I49646ca71e45074a917813ae8e612cc715c78be8 Reviewed-on: https://go-review.googlesource.com/11086Reviewed-by: Robert Griesemer <gri@golang.org>
-
Mikio Hara authored
Unfortunately there's no simple, easy way to make Dial{TCP,UDP} fail consistently across all platforms. Fow now we skip the test on Solaris. Change-Id: Ib3c55f670ac6a174fe9ea682dac7aab96b1e9dfb Reviewed-on: https://go-review.googlesource.com/11058Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
Fixes #10683. Change-Id: I4cce3f298b787c736dbabe544a11a9215bcd3671 Reviewed-on: https://go-review.googlesource.com/10336Reviewed-by: Russ Cox <rsc@golang.org>
-
Paul Marks authored
dialSerial connects to a list of addresses in sequence. If a timeout is specified, then each address gets an equal fraction of the remaining time, with a magic constant (2 seconds) to prevent "dial a million addresses" from allotting zero time to each. Normally, net.Dial passes the DNS stub resolver's output to dialSerial. If an error occurs (like destination/port unreachable), it quickly skips to the next address, but a blackhole in the network will cause the connection to hang until the timeout elapses. This is how UNIXy clients traditionally behave, and is usually sufficient for non-broken networks. The DualStack flag enables dialParallel, which implements Happy Eyeballs by racing two dialSerial goroutines, giving the preferred family a head start (300ms by default). This allows clients to avoid long timeouts when the network blackholes IPv4 xor IPv6. Fixes #8453 Fixes #8455 Fixes #8847 Change-Id: Ie415809c9226a1f7342b0217dcdd8f224ae19058 Reviewed-on: https://go-review.googlesource.com/8768Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: Id93b8ab42fa311ce32209734ec9a0813f8736e25 Reviewed-on: https://go-review.googlesource.com/9914Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I09b99eb36e550d92bd865cc4749058a398fa00cb Reviewed-on: https://go-review.googlesource.com/10838Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 15 Jun, 2015 10 commits
-
-
Robert Griesemer authored
This is https://go-review.googlesource.com/10999 which we could not apply in x/tools/go/types because we must not rely on 1.5 features in that repo yet. Change-Id: I9a57cdb7ad4051df278d1fbed90c736df50f426f Reviewed-on: https://go-review.googlesource.com/11125Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
The main change is: golang.org/cl/10800 add pos parameter to Eval; remove New, EvalNode followed by several cleanups/follow-up fixes: golang.org/cl/10992 remove global vars in test golang.org/cl/10994 remove unused scope parameter from NewSignature golang.org/cl/10995 provide full source file extent to file scope golang.org/cl/10996 comment fix in resolver.go golang.org/cl/11004 updated cmd/vet golang.org/cl/11042 be robust in the presence of incorrect/missing position info Fixes #9980. Change-Id: Id4aff688f6a399f76bf92b84c7e793b8da8baa48 Reviewed-on: https://go-review.googlesource.com/11122Reviewed-by: Alan Donovan <adonovan@google.com>
-
Brad Fitzpatrick authored
Change-Id: I171a1125e25b13c934c2cd545bd03f49f642910d Reviewed-on: https://go-review.googlesource.com/11113Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
The problem was not the kernel version as I thought before, it was that the test used the same number for both the UID and the GID. Thanks to Chris Siebenmann for debugging this. Fixes #11220. Change-Id: Ib5077e182497155e84044683209590ee0f7c9dde Reviewed-on: https://go-review.googlesource.com/11124Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Russ Cox authored
This CL adds a very long comment explaining how isStale and the new build IDs work. As part of writing the comment I realized: // When the go command makes the wrong build decision and does not // rebuild something it should, users fall back to adding the -a flag. // Any common use of the -a flag should be considered prima facie evidence // that isStale is returning an incorrect false result in some important case. // Bugs reported in the behavior of -a itself should prompt the question // ``Why is -a being used at all? What bug does that indicate?'' The two uses of -a that are most commonly mentioned in bugs filed against the go command are: go install -a ./... go build -tags netgo -a myprog Both of these commands now do the right thing without needing -a. The -a exception we introduced in Go 1.4 was for the first form, and it broke the second form. Again, neither needs -a anymore, so restore the old, simpler, easier to explain, less surprising meaning used in Go 1.3: if -a is given, rebuild EVERYTHING. See the comment for more justification and history. Summary of recent CLs (to link bugs to this one): Fixes #3036. Now 'go install ./...' works. Fixes #6534. Now 'go install ./...' works. Fixes #8290. Now 'go install ./...' works. Fixes #9369. Now 'go build -tags netgo myprog' works. Fixes #10702. Now using one GOPATH with Go 1.5 and Go 1.6 works. (Each time you switch, everything needed gets rebuilt. Switching from Go 1.4 to Go 1.5 will rebuild properly. Switching from Go 1.5 back to Go 1.4 still needs -a when invoking the Go 1.4 go command.) Change-Id: I19f9eb5286efaa50de7c8326602e94604ab572eb Reviewed-on: https://go-review.googlesource.com/10761Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This causes packages and binaries built by Go 1.5 to look out of date to Go 1.6 and vice versa, so that when you flip between different Go versions but keep the same GOPATH, the right rebuilding happens at each flip. Go 1.4 binaries will also look out of date to Go 1.5, but Go 1.5 binaries will not look out of date to Go 1.4 (since Go 1.4 doesn't have anything like this). People flipping between Go 1.4 and Go 1.5 will still need to use go install -a every time to flip to Go 1.4, but not when they flip back to Go 1.5. Fixes #6534. Fixes #10702. Change-Id: I0ae7f268f822d483059a938a4f22846ff9275b4c Reviewed-on: https://go-review.googlesource.com/10760Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Russ Cox authored
A workaround for #10460. Change-Id: I607a556561d509db6de047892f886fb565513895 Reviewed-on: https://go-review.googlesource.com/10819Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Srdjan Petrovic authored
Fixes #11131 When running 'go install -buildmode=c-shared', under the circumstances described in issue #11131, the install command would fail trying to install cgo headers if they have already been installed (by a previous call to 'go install -buildmode=c-shared'). Since it's safe to overwrite said headers (according to iant@), this CL introduces a parameter to builder's 'copy' and 'move' functions that, if set to 'true', would force the overwriting of already installed files. This parameter value is set to 'true' only when installing cgo headers, for now. Change-Id: I5bda17ee757066a8e5d2b39f2e8f3a389eb1e4a2 Reviewed-on: https://go-review.googlesource.com/10870 Run-TryBot: Srdjan Petrovic <spetrovic@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
The number of CPUs is of value when benchmarking but mostly noise when testing. The recent change to default to the number of CPUs available has made the tests noisier and confusing. Fixes #11200 Change-Id: Ifc87d9ccb4177d73e304fb7ffcef4367bd163c9e Reviewed-on: https://go-review.googlesource.com/11121Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #10303. Change-Id: Ia68d3566ba3ebeea6e18e388446bd9b8c431e156 Reviewed-on: https://go-review.googlesource.com/10814Reviewed-by: Ian Lance Taylor <iant@golang.org>
-