- 30 Nov, 2015 6 commits
-
-
Robert Griesemer authored
Old parser remains. Change-Id: I05ef1737802e23afc2c2129f58cb66feef8e3425 Reviewed-on: https://go-review.googlesource.com/17244Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Robert Griesemer authored
Fixes #13245. Change-Id: I87be63cc7b27f70ca2f9fb6bc9908b9061fe3d9d Reviewed-on: https://go-review.googlesource.com/17203Reviewed-by: Chris Manghane <cmang@golang.org>
-
Brad Fitzpatrick authored
Updates to x/net rev 195180cf (golang.org/cl/17134, http2: merge duplicate Transport dials) Change-Id: I50b9c73b30c6a21e725aad80126b713d8b0fa362 Reviewed-on: https://go-review.googlesource.com/17261Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Burcu Dogan authored
Fixes #13421. Change-Id: Ic0fc0d0a8e86d2be23db12ddd1a8a8105e26ee56 Reviewed-on: https://go-review.googlesource.com/17250Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Burcu Dogan <jbd@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Carlos C authored
Change-Id: Ica0cf1ba01ba73bd7e2fe38d653503738a962720 Reviewed-on: https://go-review.googlesource.com/13450Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Carlos C authored
Change-Id: Id72cf4daceb7669cf9c7247df8e3ba086ccfe96e Reviewed-on: https://go-review.googlesource.com/12730Reviewed-by: Russ Cox <rsc@golang.org>
-
- 29 Nov, 2015 3 commits
-
-
Mikio Hara authored
Change-Id: Ibc55e98c43cebe5a21ab3b280489e1bce6405b8b Reviewed-on: https://go-review.googlesource.com/17218Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Ian Lance Taylor authored
This is the 386 version of the amd64-specific https://golang.org/cl/16933. Update #12416. Change-Id: Ibc3a99dcc753d6281839d8b61016d6c21dbd9649 Reviewed-on: https://go-review.googlesource.com/16970 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
This makes it more convenient for C code to use GoString with string constants. Since Go string values are immutable, the const qualifier is appropriate in C. Change-Id: I5fb3cdce2ce5079f1f0467a1544bb3a1eb27b811 Reviewed-on: https://go-review.googlesource.com/17067 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 28 Nov, 2015 5 commits
-
-
Mikio Hara authored
The builtin name resolver using various resolution techniques is a bit complicated and we sometimes fotget to take care of all the go and cgo code paths and exchanging information to local and remote sources. This change makes LookupAddr return absolute domain names even in the case of local source. Updates #12189. Fixes #12240. Change-Id: Icdd3375bcddc7f5d4d3b24f134d93815073736fc Reviewed-on: https://go-review.googlesource.com/17216Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Fixes #13419. Change-Id: I530d0b714ea0743c72eacd07b390c3f8cc556e21 Reviewed-on: https://go-review.googlesource.com/17239Reviewed-by: Robert Griesemer <gri@golang.org>
-
Robert Griesemer authored
Follow-up cleanup for https://go-review.googlesource.com/17248: Use properly typed local variable op now that that variable use is not overloaded anymore. Also: Remove unnecessary if stmt from common lexical path. Change-Id: I984b0b346f3fdccd5aedc937330c0a5f99acf324 Reviewed-on: https://go-review.googlesource.com/17249Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
- use same local variable name (lno) for line number for LCOLAS everywhere - remove now unneeded assignment of line number to yylval.i in lexer Fix per suggestion of mdempsky. Fixes #13415. Change-Id: Ie3c7f5681615042a12b81b26724b3a5d8a979c25 Reviewed-on: https://go-review.googlesource.com/17248 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
Some software that produces certificates doesn't encode integers correctly and, about half the time, ends up producing certificates with serial numbers that are actually negative. This buggy software, sadly, appears to be common enough that we should let these errors pass. This change allows a Certificate.SerialNumber to be negative. Fixes #8265. Change-Id: Ief35dae23988fb6d5e2873e3c521366fb03c6af4 Reviewed-on: https://go-review.googlesource.com/17247Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Nov, 2015 2 commits
-
-
Mikio Hara authored
The previous change for #12806 modified internal lookup tables and made LookupAddr return forcibly lowercased host names by accident. This change fixes the issue again without any behavioral change for LookupAddr and adds missing test cases for lookupStaticHost and lookupStaticAddr. Updates #12806. Fixes #13359. Change-Id: Ifff4741cd79eb8b320b1b0f8c5e02b3a167c9fa8 Reviewed-on: https://go-review.googlesource.com/17217 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Usually, you are primarily interested to see the coverage of a particular file (e.g. when you're changing tests that affects a given source file), it is very valuable if you can just refresh the page and immediately see changes to the part you're already looking at (without selecting from the selector again.) Change-Id: I615207c9be6713f436e444771134fceaf4600ff3 Reviewed-on: https://go-review.googlesource.com/17238 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 26 Nov, 2015 8 commits
-
-
Tamir Duberstein authored
Places a fixed size initial stack and the lval inside the parser struct so that they are allocated together. Places $$char inside the parser struct to avoid allocating the closure used in Lookahead(). Change-Id: I0de664a6d612279fdc3255633e2dff904030bc36 Reviewed-on: https://go-review.googlesource.com/16705Reviewed-by: Russ Cox <rsc@golang.org>
-
Ralph Corderoy authored
During the TLS handshake, check the cipher suite the server selects is one of those offered in the ClientHello. The code was checking it was in the larger list that was sometimes whittled down for the ClientHello. Fixes #13174 Change-Id: Iad8eebbcfa5027f30403b9700c43cfa949e135bb Reviewed-on: https://go-review.googlesource.com/16698Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Joe Tsai authored
Functions with switches (#13071) cannot be inlined. Functions with consts (#7655) cannot be inlined. benchmark old MB/s new MB/s speedup BenchmarkEncodeDigitsSpeed1e4-4 10.25 10.20 1.00x BenchmarkEncodeDigitsSpeed1e5-4 26.44 27.22 1.03x BenchmarkEncodeDigitsSpeed1e6-4 32.28 33.51 1.04x BenchmarkEncodeDigitsDefault1e4-4 8.61 8.74 1.02x BenchmarkEncodeDigitsDefault1e5-4 7.03 6.98 0.99x BenchmarkEncodeDigitsDefault1e6-4 6.47 6.46 1.00x BenchmarkEncodeDigitsCompress1e4-4 8.62 8.73 1.01x BenchmarkEncodeDigitsCompress1e5-4 7.01 6.98 1.00x BenchmarkEncodeDigitsCompress1e6-4 6.43 6.53 1.02x BenchmarkEncodeTwainSpeed1e4-4 9.67 10.16 1.05x BenchmarkEncodeTwainSpeed1e5-4 26.46 26.94 1.02x BenchmarkEncodeTwainSpeed1e6-4 33.19 34.02 1.03x BenchmarkEncodeTwainDefault1e4-4 8.12 8.37 1.03x BenchmarkEncodeTwainDefault1e5-4 8.22 8.21 1.00x BenchmarkEncodeTwainDefault1e6-4 8.10 8.13 1.00x BenchmarkEncodeTwainCompress1e4-4 8.24 8.39 1.02x BenchmarkEncodeTwainCompress1e5-4 6.51 6.58 1.01x BenchmarkEncodeTwainCompress1e6-4 6.16 6.13 1.00x Change-Id: Ibafa5e3e2de0529853b5b3180e6fd6cb7090b76f Reviewed-on: https://go-review.googlesource.com/17171Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
And updates h2_bundle.go with the fix from x/net/http2. Fixes #13298 Updates #6891 Change-Id: Ia25f22fa10e2a64b9d59211269882681aa18c101 Reviewed-on: https://go-review.googlesource.com/17241 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Robert Griesemer authored
Slightly modified an example. Fixes #13371. Change-Id: I25d260d4200086a0ef9725950132b760657610c5 Reviewed-on: https://go-review.googlesource.com/17209Reviewed-by: Rob Pike <r@golang.org>
-
Didier Spezia authored
When the source directory path contains spaces, cgo directives cannot be properly validated: $ pwd /root/src/issue 11868 $ cat main.go package main //#cgo CFLAGS: -I${SRCDIR}/../../include import "C" func main() { } $ go build can't load package: package issue 11868: /root/src/issue 11868/main.go: malformed #cgo argument: -I/root/src/issue 11868/../../include Make sure spaces are tolerated in ${SRCDIR} when this variable is expanded. This applies to ${SRCDIR} only. Shell safety checks are still done in the same exact way for anything else. Fixes #11868 Change-Id: I93d1d2b5ab167caa7ae353fe46fb8f69f1f06969 Reviewed-on: https://go-review.googlesource.com/16302Reviewed-by: Russ Cox <rsc@golang.org>
-
Dmitry Vyukov authored
Factor out duplicated race thunks from sync, syscall net and fmt packages into a separate package and use it. Fixes #8593 Change-Id: I156869c50946277809f6b509463752e7f7d28cdb Reviewed-on: https://go-review.googlesource.com/14870Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
sergey.arseev authored
Transactional memory, will later be used for semaphore implementation. Nacl not supported yet. Change-Id: Ic18453dcaa08d07bb217c0b95461584f007d518b Reviewed-on: https://go-review.googlesource.com/16479Reviewed-by: Russ Cox <rsc@golang.org>
-
- 25 Nov, 2015 16 commits
-
-
Michael Hudson-Doyle authored
The kernel rejects attempts to create user namespaces when in a chroot. Change-Id: I6548302732c8f5be52f4167cd7233aea16839ad8 Reviewed-on: https://go-review.googlesource.com/17214Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Updates #13402. Change-Id: Ia7b729d81fb78206d214444911f2e6573b88717a Reviewed-on: https://go-review.googlesource.com/17240Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
This also fixes an unintended behavior where C's "complex float" and "complex double" types were interchangeable with Go's "complex64" and "complex128" types. Fixes #13402. Change-Id: I73f96d9a4772088d495073783c6982e9634430e8 Reviewed-on: https://go-review.googlesource.com/17208Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Without the fix: $ CC=clang-3.5 ./test.bash misc/cgo/errors/test.bash: BUG: expected error output to contain "C.ushort" but saw: # command-line-arguments ./issue13129.go:13: cannot use int(0) (type int) as type C.unsignedshort in assignment Fixes #13129. Change-Id: I2c019d2d000f5bfa3e33c477e533aff97031a84f Reviewed-on: https://go-review.googlesource.com/17207 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Fixes #13365. Change-Id: I5a447ff806dbbb11c8c75e2b5cfa7fd4a845fb92 Reviewed-on: https://go-review.googlesource.com/17206 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Caleb Spare authored
The one-pass transformation is structured as a search over the input machine for conditions that violate the one-pass requisites. At each iteration, we should fully explore all non-input paths that proceed from the current instruction; this is implemented via recursive check calls. But when we reach instructions that demand input (InstRune*), these should be put onto the search queue. Instead of searching this way, the routine previously (effectively) proceeded through the machine one instruction at a time until finding an Inst{Match,Fail,Rune*}, calling check on each instruction. This caused bug #11905, where the transformation stopped before rewriting all InstAlts as InstAltMatches. Further, the check function unnecessarily recurred on InstRune* instructions. (I believe this helps to mask the above bug.) This change also deletes some unused functions and duplicate test cases. Fixes #11905. Change-Id: I5b0b26efea3d3bd01c7479a518b5ed1b886701cd Reviewed-on: https://go-review.googlesource.com/17195Reviewed-by: Russ Cox <rsc@golang.org>
-
Caleb Spare authored
The prefix computation for onepass was incorrectly returning complete=true when it encountered a beginning-of-text empty width match (^) in the middle of an expression. Fix by returning complete only when the prefix is followed by $ and then an accepting state. Fixes #11175. Change-Id: Ie9c4cf5f76c1d2c904a6fb2f016cedb265c19fde Reviewed-on: https://go-review.googlesource.com/16200 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Caleb Spare authored
This helps users who wish to use separate Regexps in each goroutine to avoid lock contention. Previously they had to parse the expression multiple times to achieve this. I used variants of the included benchmark to evaluate this change. I used the arguments -benchtime 20s -cpu 1,2,4,8,16 on a machine with 16 hardware cores. Comparing a single shared Regexp vs. copied Regexps, we can see that lock contention causes huge slowdowns at higher levels of parallelism. The copied version shows the expected linear speedup. name old time/op new time/op delta MatchParallel 366ns ± 0% 370ns ± 0% +1.09% (p=0.000 n=10+8) MatchParallel-2 324ns ±28% 184ns ± 1% -43.37% (p=0.000 n=10+10) MatchParallel-4 352ns ± 5% 93ns ± 1% -73.70% (p=0.000 n=9+10) MatchParallel-8 480ns ± 3% 46ns ± 0% -90.33% (p=0.000 n=9+8) MatchParallel-16 510ns ± 8% 24ns ± 6% -95.36% (p=0.000 n=10+8) I also compared a modified version of Regexp that has no mutex and a single machine (the "RegexpForSingleGoroutine" rsc mentioned in https://github.com/golang/go/issues/8232#issuecomment-66096128). In this next test, I compared using N copied Regexps vs. N separate RegexpForSingleGoroutines. This shows that, even for this relatively simple regex, avoiding the lock entirely would only buy about 10-12% further improvement. name old time/op new time/op delta MatchParallel 370ns ± 0% 322ns ± 0% -12.97% (p=0.000 n=8+8) MatchParallel-2 184ns ± 1% 162ns ± 1% -11.60% (p=0.000 n=10+10) MatchParallel-4 92.7ns ± 1% 81.1ns ± 2% -12.43% (p=0.000 n=10+10) MatchParallel-8 46.4ns ± 0% 41.8ns ±10% -9.78% (p=0.000 n=8+10) MatchParallel-16 23.7ns ± 6% 20.6ns ± 1% -13.14% (p=0.000 n=8+8) Updates #8232. Change-Id: I15201a080c363d1b44104eafed46d8df5e311902 Reviewed-on: https://go-review.googlesource.com/16110Reviewed-by: Russ Cox <rsc@golang.org>
-
Tamir Duberstein authored
Fixes #12980. Change-Id: I936db2f57f7c4dc80bb8ec32715c4c6b7bf0d708 Reviewed-on: https://go-review.googlesource.com/16112Reviewed-by: Russ Cox <rsc@golang.org>
-
Giulio Iotti authored
From the XML spec: "XML processors should match character encoding names in a case-insensitive way" Fixes #12417. Change-Id: I678c50152a49c14364be62b3f21ab9b9b009b24b Reviewed-on: https://go-review.googlesource.com/14084Reviewed-by: Russ Cox <rsc@golang.org>
-
Michal Bohuslávek authored
Fixes #11112. Change-Id: I16e7363549a0dec8c61addfa14af0866c1fd7c40 Reviewed-on: https://go-review.googlesource.com/14173Reviewed-by: Russ Cox <rsc@golang.org>
-
Charles Weill authored
Fixes #12963 Change-Id: Icc50dfb6130fe1e189d45f923c2f7408d3cf9401 Reviewed-on: https://go-review.googlesource.com/16047Reviewed-by: Russ Cox <rsc@golang.org>
-
Aliaksandr Valialkin authored
Benchmark results: benchmark old ns/op new ns/op delta BenchmarkEndToEndPipe-4 7547 7294 -3.35% BenchmarkEndToEndByteBuffer-4 5146 5092 -1.05% BenchmarkEndToEndSliceByteBuffer-4 552779 439768 -20.44% BenchmarkEncodeComplex128Slice-4 266370 266184 -0.07% BenchmarkEncodeFloat64Slice-4 111891 110258 -1.46% BenchmarkEncodeInt32Slice-4 74482 74080 -0.54% BenchmarkEncodeStringSlice-4 84404 84279 -0.15% BenchmarkEncodeInterfaceSlice-4 3942925 3045995 -22.75% BenchmarkDecodeComplex128Slice-4 451837 415282 -8.09% BenchmarkDecodeFloat64Slice-4 283584 262558 -7.41% BenchmarkDecodeInt32Slice-4 246571 237383 -3.73% BenchmarkDecodeStringSlice-4 734210 479625 -34.67% BenchmarkDecodeInterfaceSlice-4 4778225 4160935 -12.92% benchmark old allocs new allocs delta BenchmarkEndToEndPipe-4 3 2 -33.33% BenchmarkEndToEndByteBuffer-4 3 2 -33.33% BenchmarkEndToEndSliceByteBuffer-4 1002 402 -59.88% BenchmarkEncodeComplex128Slice-4 1 1 +0.00% BenchmarkEncodeFloat64Slice-4 1 1 +0.00% BenchmarkEncodeInt32Slice-4 1 1 +0.00% BenchmarkEncodeStringSlice-4 1 1 +0.00% BenchmarkEncodeInterfaceSlice-4 3001 1 -99.97% BenchmarkDecodeComplex128Slice-4 188 185 -1.60% BenchmarkDecodeFloat64Slice-4 188 185 -1.60% BenchmarkDecodeInt32Slice-4 188 185 -1.60% BenchmarkDecodeStringSlice-4 2188 1185 -45.84% BenchmarkDecodeInterfaceSlice-4 6197 4194 -32.32% benchmark old bytes new bytes delta BenchmarkEndToEndPipe-4 64 48 -25.00% BenchmarkEndToEndByteBuffer-4 64 48 -25.00% BenchmarkEndToEndSliceByteBuffer-4 34551 10554 -69.45% BenchmarkEncodeComplex128Slice-4 55 55 +0.00% BenchmarkEncodeFloat64Slice-4 33 33 +0.00% BenchmarkEncodeInt32Slice-4 32 32 +0.00% BenchmarkEncodeStringSlice-4 36 36 +0.00% BenchmarkEncodeInterfaceSlice-4 144555 347 -99.76% BenchmarkDecodeComplex128Slice-4 28240 28097 -0.51% BenchmarkDecodeFloat64Slice-4 11840 11697 -1.21% BenchmarkDecodeInt32Slice-4 10817 10673 -1.33% BenchmarkDecodeStringSlice-4 56128 39985 -28.76% BenchmarkDecodeInterfaceSlice-4 132565 100421 -24.25% Change-Id: Ief7c7706b1f2916486ab7190b81aafbb16b70f1e Reviewed-on: https://go-review.googlesource.com/13660Reviewed-by: Russ Cox <rsc@golang.org>
-
Erik Dubbelboer authored
json.Number is a special case which didn't have any checks and could result in invalid JSON. Fixes #10281 Change-Id: Ie3e726e4d6bf6a6aba535d36f6107013ceac913a Reviewed-on: https://go-review.googlesource.com/12250Reviewed-by: Russ Cox <rsc@golang.org>
-
Joe Tsai authored
CRC-32 computation is stateless and the p slice does not get stored anywhere. Thus, we mark the assembly functions as noescape so that it doesn't believe that p leaks in: func Update(crc uint32, tab *Table, p []byte) uint32 Before: ./crc32.go:153: leaking param: p After: ./crc32.go:153: Update p does not escape Change-Id: I52ba35b6cc544fff724327140e0c27898431d1dc Reviewed-on: https://go-review.googlesource.com/17069Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
This compares the behavior of server handlers and the net/http Transport in both HTTP/1 and HTTP/2 mode and verifies they're the same. This also moves some client<->server tests into clientserver_test.go. Many of them were in serve_test.go or transport_test.go but were basically testing both. h2_bundle.go is an update of the golang.org/x/net/http2 code from https://golang.org/cl/17204 (x/net git rev c745c36eab10) Fixes #13315 Fixes #13316 Fixes #13317 Fixes other stuff found in the process too Updates #6891 (http2 support in general) Change-Id: Id9c45fad44cdf70ac95d2b89e578d66e882d3cc2 Reviewed-on: https://go-review.googlesource.com/17205Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-