- 15 Oct, 2015 6 commits
-
-
Matthew Dempsky authored
This isn't C anymore. No binary change to pkg/linux_amd64/runtime.a. Change-Id: I24d66b0f5ac888f432b874aac684b1395e7c8345 Reviewed-on: https://go-review.googlesource.com/15903Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Apply static bounds checking logic during type checking even to zero-element arrays, but skip synthesized OINDEX nodes that the compiler has asserted are within bounds (such as the ones generated while desugaring ORANGE nodes). This matches the logic in walkexpr that also skips static bounds checking when Bounded is true. Passes toolstash/buildall. Fixes #12944. Change-Id: I14ba03d71c002bf969d69783bec8d1a8e10e7d75 Reviewed-on: https://go-review.googlesource.com/15902Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
No functional change and passes toolstash/buildall, but eliminates a 13-deep nesting of if statements. Change-Id: I32e63dcf358c6eb521935f4ee07fbe749278e5ef Reviewed-on: https://go-review.googlesource.com/15901Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I0255f24f5c5925ea4daa28a28d23606df35d4373 Reviewed-on: https://go-review.googlesource.com/15824Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Nodir Turakulov authored
Read what a non-empty interface points to. The deleted lines were added in https://codereview.appspot.com/4810060/, which attempted to break an infinite loop. That was a long time ago. If I just delete these lines with current codebase, the test "bug1" (added in that CL) does not fail. All new tests fail without this fix. Fixes #12924 Change-Id: I9370ca44facd6af3019850aa065b936e5a482d37 Reviewed-on: https://go-review.googlesource.com/15809Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Alexandre Cesaro authored
As specified by RFC 2047 section 2, encoded-words may not be more than 75 characters long. We only enforce this rule when the charset is UTF-8, since multi-bytes characters must not be split accross encoded-words (see section 5.3). Fixes #12300 Change-Id: I72a43fc3fe6ddeb3dab54dcdce0837d7ebf658f0 Reviewed-on: https://go-review.googlesource.com/14957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Oct, 2015 9 commits
-
-
Aaron Jacobs authored
The clues to this were already there, but as a user I was still unsure. Make this more explicit. Change-Id: I68564f3498dcd4897772a303588f03a6b65f111d Reviewed-on: https://go-review.googlesource.com/15172Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Nodir Turakulov authored
As correctly mentioned in #11883, encodeState.string and encodeState.stringBytes never return an error. This CL removes the error from the function signatures and somewhat simplifies call sites. Fixes #11883 Change-Id: I1d1853d09631c545b68b5eea86ff7daa2e0ca10b Reviewed-on: https://go-review.googlesource.com/15836 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
This enables HTTP/2 by default (for https only) if the user didn't configure anything in their NPN/ALPN map. If they're using SPDY or an alternate http2 or a newer http2 from x/net/http2, we do nothing and don't use the standard library's vendored copy of x/net/http2. Upstream remains golang.org/x/net/http2. Update #6891 Change-Id: I69a8957a021a00ac353f9d7fdb9a40a5b69f2199 Reviewed-on: https://go-review.googlesource.com/15828 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
golang.org/x/net/http2 becomes net/http/h2_bundle.go (using adonovan's x/tools/cmd/bundle tool), becoming a hidden part of the net/http package. golang.org/x/net/http2/hpack becomes vendor/golang.org/x/net/http2/hpack. At git rev 7331ef52 (https://go-review.googlesource.com/15821) Change-Id: Ia6683e6f91a481b11a778638bf65b6a338744eea Reviewed-on: https://go-review.googlesource.com/15822Reviewed-by: Andrew Gerrand <adg@golang.org>
-
David Glasser authored
The PROXY protocol is supported by several proxy servers such as haproxy and Amazon ELB. This protocol allows services running behind a proxy to learn the remote address of the actual client connecting to the proxy, by including a single textual line at the beginning of the TCP connection. http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt There are several Go libraries for this protocol (such as https://github.com/armon/go-proxyproto), which operate by wrapping a net.Conn with an implementation whose RemoteAddr method reads the protocol line before returning. This means that RemoteAddr is a blocking call. Before this change, http.Serve called RemoteAddr from the main Accepting goroutine, not from the per-connection goroutine. This meant that it would not Accept another connection until RemoteAddr returned, which is not appropriate if RemoteAddr needs to do a blocking read from the socket first. Fixes #12943. Change-Id: I1a242169e6e4aafd118b794e7c8ac45d0d573421 Reviewed-on: https://go-review.googlesource.com/15835Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joe Tsai authored
Change-Id: I2ac6b178e666e34e028001078faf62ce71e12e9d Reviewed-on: https://go-review.googlesource.com/15834Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Steven Hartland authored
Allow all CGI environment settings from the inherited set and default inherited set to be overridden including PATH by Env. Change-Id: Ief8d33247b879fa87a8bfd6416d4813116db98de Reviewed-on: https://go-review.googlesource.com/14959Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Raul Silvera authored
The current fastlog2 testing checks all 64M values in the domain of interest, which is too much for platforms with no native floating point. Reduce testing under testing.Short() to speed up builds for those platforms. Related to #12620 Change-Id: Ie5dcd408724ba91c3b3fcf9ba0dddedb34706cd1 Reviewed-on: https://go-review.googlesource.com/15830Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Joel Sing <jsing@google.com> Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Katrina Owen authored
The documentation listing err == EOF can be confusing to newcomers to the language who are looking for the relevant documentation for that error. Change-Id: I301885950d0e1d0fbdf3a1892fca86eac7a0c616 Reviewed-on: https://go-review.googlesource.com/15806Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 13 Oct, 2015 5 commits
-
-
Shenghou Ma authored
Due to #9401, trailing empty fields will occupy at least 1 byte of space. Fixes #12884. Change-Id: I838d3f1a73637e526f5a6dbc348981227d5bb2fd Reviewed-on: https://go-review.googlesource.com/15660 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hyang-Ah Hana Kim authored
Also, handle the case where 'read' returns EINVAL instead of EBADF when the descriptor is not ready. (android 4.4.4/cyanogenmod, nexus7) Change-Id: I56c5949d27303d44a4fd0de38951b85e20cef167 Reviewed-on: https://go-review.googlesource.com/15810Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Fixes these warnings from go vet: buildid_linux.go:25: no formatting directive in Fatalf call callback.go:180: arg pc[i] for printf verb %p of wrong type: uintptr env.go:34: possible misuse of unsafe.Pointer issue7665.go:22: possible misuse of unsafe.Pointer Change-Id: I83811b9c10c617139713a626b4a34ab05564d4fe Reviewed-on: https://go-review.googlesource.com/15802Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Brad Fitzpatrick authored
Fixes #12785 Change-Id: Iae4383889298c6a78b1ba41bd2cda70b0758fcba Reviewed-on: https://go-review.googlesource.com/15737Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
The duplication of _Kind and kind constants is a legacy of the conversion from C. Change-Id: I368b35a41f215cf91ac4b09dac59699edb414a0e Reviewed-on: https://go-review.googlesource.com/15800Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 12 Oct, 2015 4 commits
-
-
Burcu Dogan authored
There is no easy way to understand what user intent was and whether they wanted to use a dynamic import or not. If we skip logging such errors, it breaks common use cases such as https://golang.org/issue/12810. It's a better approach to expose the underlying mechanism and be more verbose with the error messages. Fixes #12810. Change-Id: I7e922c9e848382690d9d9b006d7046e6cf93223b Reviewed-on: https://go-review.googlesource.com/15756Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Burcu Dogan authored
Fixes #12907. Change-Id: I5925852fe6962d4ec7dbb3ea5323e8ddfaf9d576 Reviewed-on: https://go-review.googlesource.com/15755Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I536d55f784bb042a2dee94b2878aff42bc182eed Reviewed-on: https://go-review.googlesource.com/15734Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
These were proposed in the RFC over three years ago, then proposed to be added to Go in https://codereview.appspot.com/7678043/ 2 years and 7 months ago, and the spec hasn't been updated or retracted the whole time. Time to export them. Of note, HTTP/2 uses code 431 (Request Header Fields Too Large). Updates #12843 Change-Id: I78c2fed5fab9540a98e845ace73f21c430a48809 Reviewed-on: https://go-review.googlesource.com/15732Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 11 Oct, 2015 2 commits
-
-
Didier Spezia authored
A MIME header can include values defined on several lines. Only the first line of each value was trimmed. Make sure all the lines are trimmed before being aggregated. Fixes #11204 Change-Id: Id92f384044bc6c4ca836e5dba2081fe82c82dc85 Reviewed-on: https://go-review.googlesource.com/15683Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
Fixes #12722 Change-Id: I6a630d8b072ef2b1c63de941743148f8c96b8e5f Reviewed-on: https://go-review.googlesource.com/15671Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Oct, 2015 4 commits
-
-
Brad Fitzpatrick authored
Fixes #12674 Change-Id: I82f53026dd2fc27bd7999d43c27932d683d92af6 Reviewed-on: https://go-review.googlesource.com/15730Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Change-Id: I34c8ada1f3c5d401944483df424011fa2ae9fc3d Reviewed-on: https://go-review.googlesource.com/15673Reviewed-by: Dave Cheney <dave@cheney.net>
-
Dave Cheney authored
Fixes #12866 net/http.Client returns some errors wrapped in a *url.Error. To avoid the requirement to unwrap these errors to determine if the cause was temporary or a timeout, make *url.Error implement net.Error directly. Change-Id: I1ba84ecc7ad5147a40f056ff1254e60290152408 Reviewed-on: https://go-review.googlesource.com/15672Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Joe Tsai authored
A vast majority of the time, ReadError isn't even returned during IO operations. Instead, an unwrapped error will be returned because of the ReadByte call on L705. Because DEFLATE streams are primarily compressed and require byte for byte Huffman decoding, most of the data read from a data stream will go through ReadByte. Although this is technically an API change, any user reliant on this error would not have worked properly anyways due to the fact that most IO error are not wrapped. We might as well deprecate ReadError. It is useless and actually makes clients that do depend on catching IO errors more difficult. Fixes #11856 Fixes #12724 Change-Id: Ib5fec5ae215e977c4e85de5701ce6a473d400af8 Reviewed-on: https://go-review.googlesource.com/14834Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 09 Oct, 2015 10 commits
-
-
Ian Lance Taylor authored
The -W option has not worked since Go 1.3. It is not documented. When it did work, it generated useful output, but it was for human viewing; there was no reason to write a script that passes the -W option, so it's unlikely that anybody is using it today. Change-Id: I4769f1ffd308a48324a866592eb7fd79a4cdee54 Reviewed-on: https://go-review.googlesource.com/15701Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Remove another use of NodeList. Change-Id: Ice07eff862caf715f722dec7829006bf71715b07 Reviewed-on: https://go-review.googlesource.com/15432Reviewed-by: Dave Cheney <dave@cheney.net>
-
Nodir Turakulov authored
All warnings in cmd/go are printed using fmt.Fprintf(os.Stderr...) except one in test.go which is printed using log.Printf. This is a minor inconsistency. Change-Id: Ib470d318810b44b86e6cfaa77e9a556a5ad94069 Reviewed-on: https://go-review.googlesource.com/15657 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
Currently, when the mutator allocates, the runtime first allocates the memory and then, if that G has done "enough" allocation, the runtime checks whether the G has assist debt to pay off and, if so, pays it off. This approach leads to under-assisting, where a G can allocate a large region (or many small regions) before paying for it, or can even exit with outstanding debt. This commit flips this around so that a G always acquires enough credit for an allocation before it can perform that allocation. We continue to amortize the cost of assists by requiring that they over-assist when triggered to build up credit for many allocations. Fixes #11967. Change-Id: Idac9f11133b328535667674d837be72c23ebd899 Reviewed-on: https://go-review.googlesource.com/15409Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
-
Austin Clements authored
Currently we track the per-G GC assist balance as two monotonically increasing values: the bytes allocated by the G this cycle (gcalloc) and the scan work performed by the G this cycle (gcscanwork). The assist balance is hence assistRatio*gcalloc - gcscanwork. This works, but has two important downsides: 1) It requires floating-point math to figure out if a G is in debt or not. This makes it inappropriate to check for assist debt in the hot path of mallocgc, so we only do this when a G allocates a new span. As a result, Gs can operate "in the red", leading to under-assist and extended GC cycle length. 2) Revising the assist ratio during a GC cycle can lead to an "assist burst". If you think of plotting the scan work performed versus heaps size, the assist ratio controls the slope of this line. However, in the current system, the target line always passes through 0 at the heap size that triggered GC, so if the runtime increases the assist ratio, there has to be a potentially large assist to jump from the current amount of scan work up to the new target scan work for the current heap size. This commit replaces this approach with directly tracking the GC assist balance in terms of allocation credit bytes. Allocating N bytes simply decreases this by N and assisting raises it by the amount of scan work performed divided by the assist ratio (to get back to bytes). This will make it cheap to figure out if a G is in debt, which will let us efficiently check if an assist is necessary *before* performing an allocation and hence keep Gs "in the black". This also fixes assist bursts because the assist ratio is now in terms of *remaining* work, rather than work from the beginning of the GC cycle. Hence, the plot of scan work versus heap size becomes continuous: we can revise the slope, but this slope always starts from where we are right now, rather than where we were at the beginning of the cycle. Change-Id: Ia821c5f07f8a433e8da7f195b52adfedd58bdf2c Reviewed-on: https://go-review.googlesource.com/15408Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Currently we ensure a minimum heap distance of 1MB when computing the assist ratio. Rather than enforcing this minimum on the heap distance, it makes more sense to enforce that the heap goal itself is at least 1MB over the live heap size at the beginning of GC. Currently the two approaches are semantically equivalent, but this will let us switch to basing the assist ratio on current heap distance rather than the initial heap distance, since we can't enforce this minimum on the current heap distance (the GC may never finish because the goal posts will always be 1MB away). Change-Id: I0027b1c26a41a0152b01e5b67bdb1140d43ee903 Reviewed-on: https://go-review.googlesource.com/15604Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Currently, gcController.scanWork is updated as lazily as possible since it is only read at the end of the GC cycle. We're about to read it during the GC cycle to improve the assist ratio revisions, so modify gcDrain* to regularly flush to gcController.scanWork in much the same way as we regularly flush to gcController.bgScanCredit. One consequence of this is that it's difficult to keep gcw.scanWork monotonic, so we give up on that and simply return the amount of scan work done by gcDrainN rather than calculating it in the caller. Change-Id: I7b50acdc39602f843eed0b5c6d2dacd7e762b81d Reviewed-on: https://go-review.googlesource.com/15407Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Currently callers of gcDrain control whether it flushes scan work credit to gcController.bgScanCredit by passing a value other than -1 for the flush threshold. Shortly we're going to make this always flush scan work to gcController.scanWork and optionally also flush scan work to gcController.bgScanCredit. This will be much easier if the flush threshold is simply a constant (which it is in practice) and callers merely control whether or not the flush includes the background credit. Hence, replace the flush threshold argument with a flag. Change-Id: Ia27db17de8a3f1e462a5d7137d4b5dc72f99a04e Reviewed-on: https://go-review.googlesource.com/15406Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
These functions were nearly identical. Consolidate them by adding a flags argument. In addition to cleaning up this code, this makes further changes that affect both functions easier. Change-Id: I6ec5c947603bbbd3ff4040113b2fbc240e99745f Reviewed-on: https://go-review.googlesource.com/15405Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Change-Id: I950af8d80433b3ae8a1da0aa7a8d2d0b295dd313 Reviewed-on: https://go-review.googlesource.com/15404Reviewed-by: Rick Hudson <rlh@golang.org>
-