- 07 Jan, 2017 2 commits
-
-
Lucas Bremgartner authored
Load extension in BPF is an overload of the load absolute instruction with a 'negative offset'. Disassemble load absolute instructions to load extension, if the offset is 'negative', respectively > (0xFFFFFFFF - 0x1000). Fixes golang/go#18469 Change-Id: I13af8f5af89ce26b13a35d2b06879dd6e1c7434e Reviewed-on: https://go-review.googlesource.com/34771 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Lucas Bremgartner authored
JumpNotEqual, JumpLessThan and JumpLessOrEqual are "fake" jump conditions that don't appear in the machine code. Nevertheless these instructions (jneq/jne, jlt, jle) are listed in the specification and therefore they should be reconstructed from the machine code. Fixes golang/go#18470 Specification: https://www.kernel.org/doc/Documentation/networking/filter.txt Change-Id: I9116b99056e379d89e71adc90516c6747d388e5d Reviewed-on: https://go-review.googlesource.com/34772 Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
- 06 Jan, 2017 3 commits
-
-
Mikio Hara authored
Change-Id: I08148b1a7fa5f57bcf71f4e49a698360d33a6f8e Reviewed-on: https://go-review.googlesource.com/34872 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I00b3297b88142ddb3c0cd08391171ebb6e731550 Reviewed-on: https://go-review.googlesource.com/34751 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I842503c64b7b61913d0748cd5b5618543bcf198b Reviewed-on: https://go-review.googlesource.com/34752 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 05 Jan, 2017 1 commit
-
-
Marcel van Lohuizen authored
The API extends the old API but is intended to be backwards compatible. The old test file serves as a test for this purpose. I will send a CL to update the vendored mirror in core after 1.8 is out. Change-Id: I538df20d42c213d9e038bdb0dad76b6cc132d4fd Reviewed-on: https://go-review.googlesource.com/34770 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
- 02 Jan, 2017 1 commit
-
-
Meir Fischer authored
strings.Join has two allocations: (1) []byte intermediate (2) final string conversion The comma-separated keys are ultimately stored in hpack.HeaderField.Value as a string so (2) is not wasteful. Because strings.Join is used so heavily I assume its implementation is optimal - (1) is necessary. Therefore, short of refactoring hpack.HeaderField's Value type, the status quo seems optimal. This TODO appears to have been copy-pasted from net/http/transfer.go However, the two cases are different. transfer.go has two allocations in addition to strings.Join: concatenation with literals and converting string to bytes in io.WriteString. Change-Id: I292203a6535dd2774f5bf45e7280b89aabb5d78d Reviewed-on: https://go-review.googlesource.com/34626Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Dec, 2016 1 commit
-
-
Kale Blankenship authored
Current handling of WriteTimeout for http2 does not extend the timeout on new streams. Disable the WriteTimeout in http2 for 1.8 release. Fixes test added in https://golang.org/cl/34723 Updates golang/go#18437 Change-Id: I366899fb4ff2e740610cad71e004141d092699a2 Reviewed-on: https://go-review.googlesource.com/34724Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 15 Dec, 2016 7 commits
-
-
Brad Fitzpatrick authored
Change-Id: I22b3781a4514b7e8a3778021c465822022b8bdc2 Reviewed-on: https://go-review.googlesource.com/34499Reviewed-by: Tom Bergan <tombergan@google.com>
-
Tom Bergan authored
Previously, we panic'd on sending WINDOW_UPDATE on the half-closed-local state. However, the RFC allows sending WINDOW_UPDATE in this state, so we should no panic. Change-Id: I702b2d5ad525837d7b8c650b7a2ed3f16371be63 Reviewed-on: https://go-review.googlesource.com/34498 Run-TryBot: Tom Bergan <tombergan@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tom Bergan authored
Updates golang/go#18326 Change-Id: Iaed30073bab10c7fc25132b388d7b2fc101293d5 Reviewed-on: https://go-review.googlesource.com/34494Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tom Bergan authored
Writing the PUSH_PROMISE can happen concurrently with the request handler, so we should pass the request handler a cloned Header.. Updates golang/go#18326 Change-Id: I918e7ffbc02459b9ede3226f4bd3c56a6a3b350f Reviewed-on: https://go-review.googlesource.com/34493 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Tom Bergan <tombergan@google.com> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Mikio Hara authored
Change-Id: If9192dabf9b5cf0d7fefb36dd6d1c1cd8966348a Reviewed-on: https://go-review.googlesource.com/34434Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I42e83ca311b499459c4d6fa75984be3e86da6a22 Reviewed-on: https://go-review.googlesource.com/34433Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: Idf0f3ce0cbd5eb402eb4929e4280b1bf746c04e9 Reviewed-on: https://go-review.googlesource.com/34432Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 13 Dec, 2016 1 commit
-
-
Brad Fitzpatrick authored
The context tests were flaky under Go 1.6 on Windows. Make them slower, but make up for the slowness by parallelizing them. These tests don't run on Go 1.7+ in the subrepo. They were deflaked in the standard library's context in Go 1.7. Updates golang/go#11811 Change-Id: I8dc8d9e13e72e87b4444e92d2316dd95bd7d066d Reviewed-on: https://go-review.googlesource.com/34288 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 10 Dec, 2016 2 commits
-
-
Brad Fitzpatrick authored
Updates golang/go#18273 Change-Id: I2e7589d070a2953972bc8456d572edd616525266 Reviewed-on: https://go-review.googlesource.com/34271 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
-
Tom Bergan authored
resetStream(st) queues a RST_STREAM frame and then calls closeStream(st). Unfortunately, closeStream(st) flushes any writes pending on st, which can drop the RST_STREAM that was just queued. (If we are lucky, the RST_STREAM will fit in the send buffer and won't be dropped, however, if we are unlucky the RST_STREAM will be dropped.) I fixed this bug by removing closeStream(st) from resetStream. Instead, closeStream happens after the RST_STREAM frame is written. This is a more direct implementation of the diagram in RFC 7540 Section 5.1, which says that a stream does not transition to "closed" until after the RST_STREAM has been sent. A side-effect is that the stream may stay open for longer than it did previously (since it won't close until *after* the RST_STREAM frame is actually written). Situations like the following are a problem: - Client sends a DATA frame that exceeds its flow-control window - Server returns streamError(ErrCodeFlowControl) from processData - RST_STREAM is queued behind other frames - Server process the request body and releases flow-control - Client sends another DATA frame, this one fits in the flow-control window. Server should NOT process this frame. To avoid the above problem, we set a bool st.resetQueued=true when RST_STREAM is queued, then ignore all future incoming HEADERS and DATA frames on that stream. I also removed st.sentReset and st.gotReset, which were used to ignore frames after RST_STREAM is sent. Now we just check if the stream is closed. Fixes golang/go#18111 Change-Id: Ieb7c848989431add5b7d95f40d6d91db7edc4980 Reviewed-on: https://go-review.googlesource.com/34238Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Dec, 2016 2 commits
-
-
https://[v6literal]/Brad Fitzpatrick authored
Fixes golang/go#18248 Change-Id: I271fbcc68a86f20c57b258c2e25788908dafdd94 Reviewed-on: https://go-review.googlesource.com/34143Reviewed-by: Tom Bergan <tombergan@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tom Bergan authored
To help debug rare nondeterministic server_test failures, log Framer reads and writes. Sample output from an injected test failure: $ go test golang.org/x/net/http2 --- FAIL: TestServer_Request_Reject_Pseudo_scheme_invalid (0.00s) server_test.go:998: server request made it to handler; should've been rejected server_test.go:514: got a *http2.HeadersFrame; want *RSTStreamFrame server_test.go:229: Framer read log: 2016-12-07 17:06:11.907199013 Framer 0xc4212665b0: read SETTINGS len=18, settings: MAX_FRAME_SIZE=1048576, MAX_CONCURRENT_STREAMS=250, MAX_HEADER_LIST_SIZE=1048896 2016-12-07 17:06:11.907523124 Framer 0xc4212665b0: read SETTINGS flags=ACK len=0 2016-12-07 17:06:11.908090453 Framer 0xc4212665b0: read HEADERS flags=END_STREAM|END_HEADERS stream=1 len=48 server_test.go:235: Framer write log: 2016-12-07 17:06:11.907152927 Framer 0xc4212665b0: wrote SETTINGS len=0 2016-12-07 17:06:11.907207016 Framer 0xc4212665b0: wrote SETTINGS flags=ACK len=0 2016-12-07 17:06:11.907550525 Framer 0xc4212665b0: wrote HEADERS flags=END_STREAM|END_HEADERS stream=1 len=16 Framer logs are written at the end of a test only if the test failed and only if http2debug!=2. (If http2debug=2, then Framer logs are already written to stdout.) Hopefully this will help debug flaky tests. Or it might not. The code is kind of ugly. Updates golang/go#18235 Change-Id: I74c8ef82521d81f123663c98c883c71d9843964f Reviewed-on: https://go-review.googlesource.com/34130 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 07 Dec, 2016 3 commits
-
-
Brad Fitzpatrick authored
TestConnUnicastSocketOptions doesn't work on nacl, plan9, or windows, but the t.Skip at the top was missing the GOOS == "windows" check. (It was present in the ipv6 version of the test) The test than proceeded to try to run and set up a connection pair for testing. Here's what was happening. Goroutines are M (main, the client) and S (server, doing the Accept): M: net.Listen("tcp4", "127.0.0.1:0"), succeeds. M: defer ln.Close() enqueued. M: go acceptor() (start "S" (server) goroutine) M: net.Dial("tcp4", ln.Addr().String()), succeeds. Notably, it's connected to the kernel's TCP stack at this point. The userspace Accept hasn't run. Go's listen backlog is syscall.SOMAXCONN on Windows (which is fine). M: testUnicastSocketOptions: - finds that it's GOOS == "windows", - calls t.Skipf, which calls runtime.Goexit, runs deferred goroutines M: ln.Close() (previously deferred runs) M: test completes Then: S: server goroutine finally schedules S: c, err := ln.Accept(), gets an error (because it's closed) if err != nil { t.Error(err) // setting an error after test is done; bogus So, fix it both ways: skip the test earlier on "windows", and simplify the server goroutine and move the failing into the main goroutine. Also skip other tests earlier on Windows that will also t.Skip. They don't have goroutines, but might as well skip earlier. Fixes golang/go#17655 Change-Id: I5d910d70943be37b2b4b56542ee98e42fc3acd71 Reviewed-on: https://go-review.googlesource.com/34021 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
-
Mikio Hara authored
Change-Id: Ibb7dacadef404f6fc4e6c744a5015835e580c97e Reviewed-on: https://go-review.googlesource.com/34094 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
To warn about the provided stop function should not be nil. Change-Id: I73351b6379ae22e85298ce9e87ee80077f748c7e Reviewed-on: https://go-review.googlesource.com/34091 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
- 06 Dec, 2016 5 commits
-
-
Mikio Hara authored
Change-Id: I6f0745cb5754b059dd05fcaf24454936093eaeaa Reviewed-on: https://go-review.googlesource.com/33934 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I13a03838daab0f45a4d9479c3b7baa94021c720a Reviewed-on: https://go-review.googlesource.com/33933 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Debugged & wrote with Tom Bergan. Updates golang/go#18083 Change-Id: I00a1cb748fe9c0f01c5bd4b8d1ac4438b56f1f8c Reviewed-on: https://go-review.googlesource.com/33971 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tom Bergan <tombergan@google.com>
-
Tom Bergan authored
Update golang/go#18083 Change-Id: I2600f8a7a0d3a630003c010496a7fceca1b9f660 Reviewed-on: https://go-review.googlesource.com/33974Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Tom Bergan authored
Updates #golang/go#18083 Change-Id: If0ebbbb9b5644a4cec94c89e28939fcaeb4de321 Reviewed-on: https://go-review.googlesource.com/33972Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 02 Dec, 2016 2 commits
-
-
Joe Tsai authored
The interface for net.Conn is getting stricter for the Go 1.8 release. We add a package that tests that a given net.Conn implementation properly satisfies the interface. Fixes golang/go#18097 Change-Id: I5e9f1f3c7cb5c060d734ed7e3a24886d4213c4e1 Reviewed-on: https://go-review.googlesource.com/33679Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates golang/go#18152 Change-Id: Ia3df3f9668847690e60a2af0680cf1bd66042384 Reviewed-on: https://go-review.googlesource.com/33806Reviewed-by: Ross Light <light@google.com>
-
- 16 Nov, 2016 5 commits
-
-
Mikio Hara authored
Change-Id: Ib667928f91808640021ea9d61bc5477824729655 Reviewed-on: https://go-review.googlesource.com/33253 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I8900190d3234d3f8883761b2ae735f2a959b9a26 Reviewed-on: https://go-review.googlesource.com/33252 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
This change also uses nettest.SupportsIPv6MulticastDeliveryOnLoopback to disable multicast packet delivery tests on some platform that doesn't support the feature. Fixes golang/go#17015. Change-Id: Ia547efc2ac3779a96592bbc3874533fb65b711af Reviewed-on: https://go-review.googlesource.com/33251 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
The kernel is used in OS X Mountain Lion or below, or iOS version 8 or below. Updates golang/go#17015. Change-Id: I8a849dc2ab4e04535f893b776bf704079cc91977 Reviewed-on: https://go-review.googlesource.com/33250 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I0c4c58d6488ddf321a5d62b6e9f0dd46f5f40438 Reviewed-on: https://go-review.googlesource.com/33256Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 15 Nov, 2016 4 commits
-
-
Tom Bergan authored
https://go-review.googlesource.com/33238 fixed scheduling of RST_STREAMs so they are added to the appropriate stream queue. However, RST_STREAM may be sent before OpenStream or after CloseStream in certain error cases, such as: https://github.com/golang/net/blob/00ed5e97ea3a5ac46658b98e50259941947cec04/http2/server.go#L1395 https://github.com/golang/net/blob/00ed5e97ea3a5ac46658b98e50259941947cec04/http2/frame.go#L866 https://github.com/golang/net/blob/00ed5e97ea3a5ac46658b98e50259941947cec04/http2/frame.go#L947 In these cases, the failing stream has no queue and in priorityWriteScheduler.Push will panic. A simple fix is to add RST_STREAMs to the root queue when the stream queue doesn't exist. This is correct because: - RST_STREAM is tiny and doesn't use flow control bytes, so prioritization is not important. - The server should not send any frames on a stream after sending RST_STREAM, but even if that happens, the RST_STREAM will be ordered before those other frames because the control queue has the highest priority. Fixes golang/go#17919 Change-Id: I2e8101f015822ef975303a1fe87634b36afbdc6b Reviewed-on: https://go-review.googlesource.com/33248Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Tormod Erevik Lea authored
Change-Id: I74ca09e4f4765c1c8d309b8fe1ce25b5e3d8171f Reviewed-on: https://go-review.googlesource.com/33270Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I383c170b38cf2b787c29127efe2d3b0587e6ceec Reviewed-on: https://go-review.googlesource.com/32138Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Fixes golang/go#17243 Change-Id: I76f972f908757b103e2ab8d9b1701312308d66e5 Reviewed-on: https://go-review.googlesource.com/33238Reviewed-by: Tom Bergan <tombergan@google.com>
-
- 14 Nov, 2016 1 commit
-
-
Brad Fitzpatrick authored
The Google-issue one expired and it's too onerous to request another and do it by hand. Change-Id: I221406bc66de4b027b979fd87f6ec38f66318f9e Reviewed-on: https://go-review.googlesource.com/33230Reviewed-by: Tom Bergan <tombergan@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-