- 11 Dec, 2015 9 commits
-
-
Ian Lance Taylor authored
This file is not part of the benchmark shootout, and we wrote it, so use the usual copyright header, not a partial version of the shootout license. Fixes #13575. Change-Id: Ib610e2ad82914b4ef096a2424cfffe3383db2d5b Reviewed-on: https://go-review.googlesource.com/17715 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Dmitry Vyukov authored
Currently we wake up new worker threads whenever we pass through the scheduler with nmspinning==0. This leads to lots of unnecessary thread wake ups. Instead let only spinning threads wake up new spinning threads. For the following program: package main import "runtime" func main() { for i := 0; i < 1e7; i++ { runtime.Gosched() } } Before: $ time ./test real 0m4.278s user 0m7.634s sys 0m1.423s $ strace -c ./test % time seconds usecs/call calls errors syscall 99.93 9.314936 3 2685009 17536 futex After: $ time ./test real 0m1.200s user 0m1.181s sys 0m0.024s $ strace -c ./test % time seconds usecs/call calls errors syscall 3.11 0.000049 25 2 futex Fixes #13527 Change-Id: Ia1f5bf8a896dcc25d8b04beb1f4317aa9ff16f74 Reviewed-on: https://go-review.googlesource.com/17540Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Change-Id: I26fc120e66f559e4da90883ed5c8457a99426a25 Reviewed-on: https://go-review.googlesource.com/17729Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
This change can break real code. There are other newline-related bugs in this code, and fixing them will also break real code. If we're going to break real code, let's fix all the bugs together and just break things once. This reverts commit 8331f19d. Change-Id: Ie4b3022f3a305c3e1f78cc208e50beed212608e6 Reviewed-on: https://go-review.googlesource.com/17724Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
The meaning of DeepEqual has never been specified. Do that. Also fix bug involving maps with NaN keys. Except for the map bug fix, there should be no semantic changes here. Fixes #12025. Change-Id: Ied562cf543a22ec645d42bdb9b41d451c16b1f21 Reviewed-on: https://go-review.googlesource.com/17450Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
Host names in URLs must not use %-escaping for ASCII bytes, per RFC 3986. url.Parse has historically allowed spaces and < > " in the URL host. In Go 1.5, URL's String method started escaping those, but then Parse would rejects the escaped form. This CL is an attempt at some consistency between Parse and String as far as the accepted host characters and the encoding of host characters, so that if Parse succeeds, then Parse -> String -> Parse also succeeds. Allowing space seems like a mistake, so reject that in Parse. (Similarly, reject \t, \x01, and so on, all of which were being allowed.) Allowing < > " doesn't seem awful, so continue to do that, and go back to the Go 1.4 behavior of not escaping them in String. Fixes #11302. Change-Id: I0bf65b874cd936598f20694574364352a5abbe5f Reviewed-on: https://go-review.googlesource.com/17387Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #11826. Change-Id: Id220dd558ca8d8d78c01975087122d27757deea0 Reviewed-on: https://go-review.googlesource.com/17458Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rahul Chaudhry authored
debug.schedtrace is an int32. Convert it to int64 before multiplying with constant 1000000. Otherwise, schedtrace values more than 2147 result in int32 overflow causing incorrect delays between traces. Change-Id: I064e8d7b432c1e892a705ee1f31a2e8cdd2c3ea3 Reviewed-on: https://go-review.googlesource.com/17712Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
ˆ (U+02C6) is a circumflex accent, not an exponentiation operator. In the rest of the source code for this package, exponentation is written as **, so do the same here. Change-Id: I107b85be242ab79d152eb8a6fcf3ca2b197d7658 Reviewed-on: https://go-review.googlesource.com/17671Reviewed-by: Robert Griesemer <gri@golang.org>
-
- 10 Dec, 2015 11 commits
-
-
Brad Fitzpatrick authored
Fixes #13569 Change-Id: I04c9a44437414177e2fee260518cfe53a67e6364 Reviewed-on: https://go-review.googlesource.com/17684Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Fixes #10433. Change-Id: I2a8b54e3f07488f204b1d14eb2603842caaf1e5a Reviewed-on: https://go-review.googlesource.com/17386Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
In particular, we can initialize globals with them at link time instead of generating code for them in an init() function. Less code, less startup cost. But the real reason for this change is binary size. This change reduces the binary size of hello world by ~4%. The culprit is fmt.ssFree, a global variable which is a sync.Pool of scratch scan states. It is initalized with a captureless closure as the pool's New action. That action in turn references all the scanf code. If you never call any of the fmt.Scanf* routines, ssFree is never used. But before this change, ssFree is still referenced by fmt's init function. That keeps ssFree and all the code it references in the binary. With this change, ssFree is initialized at link time. As a result, fmt.init never mentions ssFree. If you don't call fmt.Scanf*, ssFree is unreferenced and it and the scanf code are not included. This change is an easy fix for what is generally a much harder problem, the unnecessary initializing of unused globals (and retention of code that they reference). Ideally we should have separate init code for each global and only include that code if the corresponding global is live. (We'd need to make sure that the initializing code has no side effects, except on the global being initialized.) That is a much harder change. Update #6853 Change-Id: I19d1e33992287882c83efea6ce113b7cfc504b67 Reviewed-on: https://go-review.googlesource.com/17398Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
There was back-and-forth on this but it has been decided to fix the original complaint, which was easy. Fixes #7268. Change-Id: I6b607c49ad44579086aba2c4f4c5424b97fbed64 Reviewed-on: https://go-review.googlesource.com/17710Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Fixes some failing Google tests when run under Go tip (1.6). Updates #12986 Change-Id: I0ca4d20f6103d10ea9464e45730085401336dada Reviewed-on: https://go-review.googlesource.com/17698Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Nodir Turakulov <nodir@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Until recently, we always permitted an empty string to NewRequest. Keep that property, since it broke tests within in Google when trying out Go 1.6, and probably would've broken others too. Change-Id: Idddab1ae7b9423d5caac00af2c897fe1065b600b Reviewed-on: https://go-review.googlesource.com/17699Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
Change-Id: I12a43b15e81a5e0b174c1c49e77f8307c567233b Reviewed-on: https://go-review.googlesource.com/17697Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
This is a simple change to the command that should resolve problems like finding vendored packages before their non-vendored siblings. By searching in breadth-first order, we find the matching package lowest in the hierarchy, which is more likely to be correct than the deeper one, such as a vendored package, that will be found in a depth-first scan. This may be sufficient to resolve the issue, and has the merit that it is very easy to explain. I will leave the issue open for now in case my intuition is wrong. Update #12423 Change-Id: Icf69e8beb1845277203fcb7d19ffb7cca9fa41f5 Reviewed-on: https://go-review.googlesource.com/17691Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
Fixes #13559. Change-Id: I6fe8b5083192e8eb6c1b3ca1919fde81a00ccb7e Reviewed-on: https://go-review.googlesource.com/17695 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
-
Mikio Hara authored
The current implementation including Go 1.5 through 1.5.2 misuses Windows API and mishandles the returned values from GetAdapterAddresses on Windows. This change fixes various issues related to network facility information by readjusting interface and interface address parsers. Updates #5395. Updates #10530. Updates #12301. Updates #12551. Updates #13542. Fixes #12691. Fixes #12811. Fixes #13476. Fixes #13544. Also fixes fragile screen scraping test cases in net_windows_test.go. Additional information for reviewers: It seems like almost all the issues above have the same root cause and it is misunderstanding of Windows API. If my interpretation of the information on MSDN is correctly, current implementation contains the following bugs: - SIO_GET_INTERFACE_LIST should not be used for IPv6. The behavior of SIO_GET_INTERFACE_LIST is different on kernels and probably it doesn't work correctly for IPv6 on old kernels such as Windows XP w/ SP2. Unfortunately MSDN doesn't describe the detail of SIO_GET_INTERFACE_LIST, but information on the net suggests so. - Fetching IP_ADAPTER_ADDRESSES structures with fixed size area may not work when using IPv6. IPv6 generates ton of interface addresses for various addressing scopes. We need to adjust the area appropriately. - PhysicalAddress field of IP_ADAPTER_ADDRESSES structure may have extra space. We cannot ignore PhysicalAddressLength field of IP_ADAPTER_ADDRESS structure. - Flags field of IP_ADAPTER_ADDRESSES structure doesn't represent any of administratively and operatinal statuses. It just represents settings for windows network adapter. - MTU field of IP_ADAPTER_ADDRESSES structure may have a uint32(-1) on 64-bit platform. We need to convert the value to interger appropriately. - IfType field of IP_ADAPTER_ADDRESSES structure is not a bit field. Bitwire operation for the field is completely wrong. - OperStatus field of IP_ADAPTER_ADDRESSES structure is not a bit field. Bitwire operation for the field is completely wrong. - IPv6IfIndex field of IP_ADAPTER_ADDRESSES structure is just a substitute for IfIndex field. We cannot prefer IPv6IfIndex to IfIndex. - Windows XP, 2003 server and below don't set OnLinkPrefixLength field of IP_ADAPTER_UNICAST_ADDRESS structure. We cannot rely on the field on old kernels. We can use FirstPrefix field of IP_ADAPTER_ADDRESSES structure and IP_ADAPTER_PREFIX structure instead. - Length field of IP_ADAPTER_{UNICAST,ANYCAST,MULTICAST}_ADDRESS sturecures doesn't represent an address prefix length. It just represents a socket address length. Change-Id: Icabdaf7bd1d41360a981d2dad0b830b02b584528 Reviewed-on: https://go-review.googlesource.com/17412Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Brad Fitzpatrick authored
Failing ones are marked skipped. Fixes #13543 (was just a test issue) Updates #13555 (to be fixed later) Updates #13556 (to be fixed later) Updates #13557 (to be fixed later) Fixes bug in golang.org/cl/17428 (http1 now uses HTTP status 431, not 413) Change-Id: I8f7431fee35f2fc081cfe2c232ae75a00800a60b Reviewed-on: https://go-review.googlesource.com/17683Reviewed-by: Blake Mizerany <blake.mizerany@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Burcu Dogan <jbd@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 09 Dec, 2015 17 commits
-
-
Matthew Dempsky authored
This code used to be necessary because of the error messages generated by the YACC-based parser, but they're no longer relevant under the new recursive descent parser: - LBRACE no longer exists, so "{ or {" can never occur. - The parser never generates error messages about "@" or "?" now (except in import sections, where they're actually legitimate). - The s/LLITERAL/litbuf/ substitution is handled in p.syntax_error. Change-Id: Id39f747e4aa492c5830d14a47b161920bd4589ad Reviewed-on: https://go-review.googlesource.com/17690Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
When using GOEXPERIMENT=fieldtrack, we can see AUSEFIELD instructions. We generally want to ignore them. No tests because as far as I can tell there are no tests for GOEXPERIMENT=fieldtrack. Change-Id: Iee26f25592158e5db691a36cf8d77fc54d051314 Reviewed-on: https://go-review.googlesource.com/17610Reviewed-by: David Symonds <dsymonds@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #13550 Change-Id: I407daad8b94f6773d7949ba27981d26cbfd2cdf4 Reviewed-on: https://go-review.googlesource.com/17682Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Fixes #12796 Updates #13444 Change-Id: I56840c0baf9b32a683086a80f5db1c5ea0a7aedf Reviewed-on: https://go-review.googlesource.com/17680Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Found by github user asukakenji. Change-Id: I4c76316b69e8a243fb6bf280283f3722e728d853 Reviewed-on: https://go-review.googlesource.com/17641Reviewed-by: Robert Griesemer <gri@golang.org>
-
Emmanuel Odeke authored
Change-Id: I6427b0914fc4ccd9b841eae3aefe3b7a355fc436 Reviewed-on: https://go-review.googlesource.com/17596 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
Use Windows getmac command to verify interface MAC addresses net package returns. The test is to be enabled once issue #12691 is fixed. Updates #12691 Change-Id: Ic28c83303590cb4d48ee025250d4b6e30683bfd4 Reviewed-on: https://go-review.googlesource.com/17632Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alex Brainman authored
EvalSymlinks code assumes that Join has a bug (see issue #11551 for details). But issue #11551 has been fixed. Remove the workaround so it does not confuses us when we read code next time. Change-Id: I06bea20189f01f9922237c05516847353d8e4736 Reviewed-on: https://go-review.googlesource.com/17620Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Change-Id: I1164c7a76cf6e6c48ca5153d4c163f5962c4f0cd Reviewed-on: https://go-review.googlesource.com/17622Reviewed-by: Dave Cheney <dave@cheney.net>
-
Alex Brainman authored
Use windows netsh command to verify interface addresses and netmasks net package returns. The test is to be enabled once issue #12811 is fixed. Updates #12811 Change-Id: I191e350a1403e5133791d4ec59561fefa24f5c61 Reviewed-on: https://go-review.googlesource.com/17478Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Another (historic) artifact due to partially resolving symbols too early. Fixes #13539. Change-Id: Ie720c491cfa399599454f384b3a9735e75d4e8f1 Reviewed-on: https://go-review.googlesource.com/17600 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Damien Neil <dneil@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Change-Id: I21317e3f60502759efc026cdfdb0b1d5f411cae9 Reviewed-on: https://go-review.googlesource.com/17521 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: I345b6ea7024a1c85c805b2d2e22f9f79aeca5816 Reviewed-on: https://go-review.googlesource.com/17462 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: If6cc1298ad550790ee981c1b5dc618a14947dc4a Reviewed-on: https://go-review.googlesource.com/17526 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: I181346a8d2a8a96fd790cde087c8fd73af911298 Reviewed-on: https://go-review.googlesource.com/17529 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates to http2's golang.org/cl/17590 (git rev 1796f9b8b) Fixes #13495 Fixes #13532 Change-Id: I9b95ab438e1d895c75d031d8fcf2605921182a5e Reviewed-on: https://go-review.googlesource.com/17591Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Emmanuel Odeke authored
Change-Id: I282a399657c71f7b6406fcdde8afc82a13bdfe5f Reviewed-on: https://go-review.googlesource.com/17530 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 08 Dec, 2015 3 commits
-
-
Emmanuel Odeke authored
Change-Id: I9a1fe057f5bf008fa16577a7d71064050aea47e9 Reviewed-on: https://go-review.googlesource.com/17525 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates golang.org/x/net/http2 to git rev 438097d76 Fixes #13444 Change-Id: I699ac02d23b56db3e8a27d3f599ae56cd0a5b4b2 Reviewed-on: https://go-review.googlesource.com/17570Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Matt T. Proud authored
This adapts pem.TestFuzz to sanitize the generated Block fields, because the encoder and wireformat do not differentiate between nil and empty slices and maps, while reflect.DeepEqual rightfully does. In the commit mentioned below, we adapt quick.Value in testing/quick to generate these value states, which had heretofore been impossible with the standard library fuzz test facility. This commit is a piecemeal extraction from ... https://go-review.googlesource.com/#/c/16470 ..., which rsc requested to be separated from the nil slice and map generations. Change-Id: Iec751a2b0082af6e672a09dc9b7f4b4fb309e8a8 Reviewed-on: https://go-review.googlesource.com/17499Reviewed-by: Russ Cox <rsc@golang.org>
-