- 14 Feb, 2018 25 commits
-
-
Cherry Zhang authored
Just like all.bash passes flags to make.bash, I think it makes sense that naclmake.bash and nacltest.bash do so as well. For example, on a slow machine I can do "./nacltest.bash -v" to see the build progress. Change-Id: Id766dd590e6b83e8b5345822580dc1b05eac8ea3 Reviewed-on: https://go-review.googlesource.com/93117 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Cherry Zhang authored
On nacl/arm, R12 is clobbered by the RET instruction in function that has a frame. runtime.udiv doesn't have a frame, so it does not clobber R12. Change-Id: I0de448749f615908f6659e92d201ba3eb2f8266d Reviewed-on: https://go-review.googlesource.com/93116 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Cherry Zhang authored
If nil, fault before taking the lock or calling into the kernel. Change-Id: I013d78a5f9233c2a9197660025f679940655d384 Reviewed-on: https://go-review.googlesource.com/93636 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Cherry Zhang authored
Updates #23778. Change-Id: I80e57a15b6e3bbc2e25ea186399ff0e360fc5c21 Reviewed-on: https://go-review.googlesource.com/93635 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Martin Möhrmann authored
Replace explicit range loop that applies orderexprinplace on a list of nodes with existing helper function orderexprlistinplace. Passes toolstash -cmp. Change-Id: Ic8098ed08cf67f319de3faa83b00a5b73bbde95d Reviewed-on: https://go-review.googlesource.com/88815Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Andrew Bonventre authored
Change-Id: I02938b2435e3a98efea7ee5545a6f8f5f6f794b4 Reviewed-on: https://go-review.googlesource.com/93915Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Chad Rosier authored
The tbz/tbnz checks the sign bit to determine if the value is >= 0 or < 0. go1 benchmark results: name old speed new speed delta JSONEncode 94.4MB/s ± 1% 95.7MB/s ± 0% +1.36% (p=0.000 n=10+9) JSONDecode 19.7MB/s ± 1% 19.9MB/s ± 1% +1.08% (p=0.000 n=9+10) Gzip 45.5MB/s ± 0% 46.0MB/s ± 0% +1.06% (p=0.000 n=10+10) Revcomp 376MB/s ± 0% 379MB/s ± 0% +0.69% (p=0.000 n=10+10) RegexpMatchHard_1K 12.6MB/s ± 0% 12.7MB/s ± 0% +0.57% (p=0.000 n=10+8) RegexpMatchMedium_32 3.21MB/s ± 0% 3.22MB/s ± 0% +0.31% (p=0.000 n=9+10) RegexpMatchEasy1_1K 1.27GB/s ± 0% 1.27GB/s ± 0% +0.23% (p=0.000 n=9+9) RegexpMatchHard_32 11.4MB/s ± 0% 11.4MB/s ± 1% +0.19% (p=0.036 n=10+8) RegexpMatchEasy0_1K 1.77GB/s ± 0% 1.77GB/s ± 0% +0.13% (p=0.000 n=9+10) RegexpMatchMedium_1K 19.3MB/s ± 0% 19.3MB/s ± 0% +0.04% (p=0.008 n=10+8) RegexpMatchEasy0_32 131MB/s ± 0% 131MB/s ± 0% ~ (p=0.211 n=10+10) GobDecode 57.5MB/s ± 1% 57.6MB/s ± 2% ~ (p=0.469 n=10+10) GobEncode 58.6MB/s ± 1% 58.5MB/s ± 2% ~ (p=0.781 n=10+10) GoParse 9.40MB/s ± 0% 9.39MB/s ± 0% -0.19% (p=0.005 n=10+9) RegexpMatchEasy1_32 133MB/s ± 0% 133MB/s ± 0% -0.48% (p=0.000 n=10+10) Template 20.9MB/s ± 0% 20.6MB/s ± 0% -1.54% (p=0.000 n=8+10) Change-Id: I411efe44db35c3962445618d5a47c12e31b3925b Reviewed-on: https://go-review.googlesource.com/92715 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Tobias Klauser authored
The pipe2 syscall is part of NetBSD since version 6.0 and thus exists in all officially supported versions (6.0 through 6.1 and 7.0+). Follows CL 38426 Change-Id: I7b62b507300c3dfbcc6ae56408a7d7088ddccc77 Reviewed-on: https://go-review.googlesource.com/94035 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Benny Siegert <bsiegert@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nate Wilkinson authored
The previous fix had "bug" and "build" in the wrong order. Fixes #23791 Change-Id: I4897428516b159966c13c1054574c4f6fbf0fbac Reviewed-on: https://go-review.googlesource.com/94017Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Lorenz Bauer authored
Include reader / writer interactions of RWMutex in the mutex profile. Writer contention is already included in the profile, since a plain Mutex is used to control exclusion. Fixes #18496 Change-Id: Ib0dc1ffa0fd5e6d964a6f7764d7f09556eb63f00 Reviewed-on: https://go-review.googlesource.com/87095 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Peter Weinberger <pjw@google.com>
-
Conrado Gouvea authored
GCM allows using tag sizes smaller than the block size. This adds a NewGCMWithNonceAndTagSize function which allows specifying the tag size. Fixes #19594 Change-Id: Ib2008c6f13ad6d916638b1523c0ded8a80eaf42d Reviewed-on: https://go-review.googlesource.com/48510Reviewed-by: Filippo Valsorda <hi@filippo.io> Run-TryBot: Filippo Valsorda <hi@filippo.io> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Filippo Valsorda authored
Fixes #23736 Change-Id: I850d91a512394c4292927d51c475064bfa4e3053 Reviewed-on: https://go-review.googlesource.com/92815Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Gccgo failed this test. Updates #23620 Change-Id: I3979a6d3b87d2d014850accf9cb7f356349e6195 Reviewed-on: https://go-review.googlesource.com/91138 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
-
David Crawshaw authored
The stackguard is set to stackPreempt earlier in reentersyscall, and as it comes with throwsplit = true there's no way for the stackguard to be set to anything else by the end of reentersyscall. Change-Id: I4e942005b22ac784c52398c74093ac887fc8ec24 Reviewed-on: https://go-review.googlesource.com/65673 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Ben Shi authored
FNMULS&FNMULD are efficient arm64 instructions, which can be used to improve FP performance. This CL use them to optimize pairs of neg-mul operations. Here are benchmark test results on Raspberry Pi 3 with ArchLinux. 1. A special test case gets about 15% improvement. (https://github.com/benshi001/ugo1/blob/master/fpmul_test.go) FPMul-4 485µs ± 0% 410µs ± 0% -15.49% (p=0.000 n=26+23) 2. There is little regression in the go1 benchmark (excluding noise). name old time/op new time/op delta BinaryTree17-4 42.0s ± 3% 42.1s ± 2% ~ (p=0.542 n=39+40) Fannkuch11-4 33.3s ± 3% 32.9s ± 1% ~ (p=0.200 n=40+32) FmtFprintfEmpty-4 534ns ± 0% 534ns ± 0% ~ (all equal) FmtFprintfString-4 1.09µs ± 1% 1.09µs ± 0% ~ (p=0.950 n=32+32) FmtFprintfInt-4 1.14µs ± 0% 1.14µs ± 1% ~ (p=0.571 n=32+31) FmtFprintfIntInt-4 1.79µs ± 3% 1.76µs ± 0% -1.42% (p=0.004 n=40+34) FmtFprintfPrefixedInt-4 2.17µs ± 0% 2.17µs ± 0% ~ (p=0.073 n=31+34) FmtFprintfFloat-4 3.33µs ± 3% 3.28µs ± 0% -1.46% (p=0.001 n=40+34) FmtManyArgs-4 7.28µs ± 6% 7.19µs ± 0% ~ (p=0.641 n=40+33) GobDecode-4 96.5ms ± 4% 96.5ms ± 9% ~ (p=0.214 n=40+40) GobEncode-4 79.5ms ± 0% 80.7ms ± 4% +1.51% (p=0.000 n=34+40) Gzip-4 4.53s ± 4% 4.56s ± 4% +0.60% (p=0.000 n=40+40) Gunzip-4 451ms ± 3% 442ms ± 0% -1.93% (p=0.000 n=40+32) HTTPClientServer-4 530µs ± 1% 535µs ± 1% +0.88% (p=0.000 n=39+39) JSONEncode-4 214ms ± 4% 211ms ± 0% ~ (p=0.059 n=40+31) JSONDecode-4 865ms ± 5% 864ms ± 4% -0.06% (p=0.003 n=40+40) Mandelbrot200-4 52.0ms ± 3% 52.1ms ± 3% ~ (p=0.556 n=40+40) GoParse-4 43.1ms ± 8% 42.1ms ± 0% ~ (p=0.083 n=40+33) RegexpMatchEasy0_32-4 1.02µs ± 3% 1.02µs ± 4% +0.06% (p=0.020 n=40+40) RegexpMatchEasy0_1K-4 3.90µs ± 0% 3.96µs ± 3% +1.58% (p=0.000 n=31+40) RegexpMatchEasy1_32-4 967ns ± 4% 981ns ± 3% +1.40% (p=0.000 n=40+40) RegexpMatchEasy1_1K-4 6.41µs ± 4% 6.43µs ± 3% ~ (p=0.386 n=40+40) RegexpMatchMedium_32-4 1.76µs ± 3% 1.78µs ± 3% +1.08% (p=0.000 n=40+40) RegexpMatchMedium_1K-4 561µs ± 0% 562µs ± 0% +0.09% (p=0.003 n=34+31) RegexpMatchHard_32-4 31.5µs ± 2% 31.1µs ± 4% -1.17% (p=0.000 n=30+40) RegexpMatchHard_1K-4 960µs ± 3% 950µs ± 4% -1.02% (p=0.016 n=40+40) Revcomp-4 7.79s ± 7% 7.79s ± 4% ~ (p=0.859 n=40+40) Template-4 889ms ± 6% 872ms ± 3% -1.86% (p=0.025 n=40+31) TimeParse-4 4.80µs ± 0% 4.89µs ± 3% +1.71% (p=0.001 n=31+40) TimeFormat-4 4.70µs ± 1% 4.78µs ± 3% +1.57% (p=0.000 n=33+40) [Geo mean] 710µs 709µs -0.13% name old speed new speed delta GobDecode-4 7.96MB/s ± 4% 7.96MB/s ± 9% ~ (p=0.174 n=40+40) GobEncode-4 9.65MB/s ± 0% 9.51MB/s ± 4% -1.45% (p=0.000 n=34+40) Gzip-4 4.29MB/s ± 4% 4.26MB/s ± 4% -0.59% (p=0.000 n=40+40) Gunzip-4 43.0MB/s ± 3% 43.9MB/s ± 0% +1.90% (p=0.000 n=40+32) JSONEncode-4 9.09MB/s ± 4% 9.22MB/s ± 0% ~ (p=0.429 n=40+31) JSONDecode-4 2.25MB/s ± 5% 2.25MB/s ± 4% ~ (p=0.278 n=40+40) GoParse-4 1.35MB/s ± 7% 1.37MB/s ± 0% ~ (p=0.071 n=40+25) RegexpMatchEasy0_32-4 31.5MB/s ± 3% 31.5MB/s ± 4% -0.08% (p=0.018 n=40+40) RegexpMatchEasy0_1K-4 263MB/s ± 0% 259MB/s ± 3% -1.51% (p=0.000 n=31+40) RegexpMatchEasy1_32-4 33.1MB/s ± 4% 32.6MB/s ± 3% -1.38% (p=0.000 n=40+40) RegexpMatchEasy1_1K-4 160MB/s ± 4% 159MB/s ± 3% ~ (p=0.364 n=40+40) RegexpMatchMedium_32-4 565kB/s ± 3% 562kB/s ± 2% ~ (p=0.208 n=40+40) RegexpMatchMedium_1K-4 1.82MB/s ± 0% 1.82MB/s ± 0% -0.27% (p=0.000 n=34+31) RegexpMatchHard_32-4 1.02MB/s ± 3% 1.03MB/s ± 4% +1.04% (p=0.000 n=32+40) RegexpMatchHard_1K-4 1.07MB/s ± 4% 1.08MB/s ± 4% +0.94% (p=0.003 n=40+40) Revcomp-4 32.6MB/s ± 7% 32.6MB/s ± 4% ~ (p=0.965 n=40+40) Template-4 2.18MB/s ± 6% 2.22MB/s ± 3% +1.83% (p=0.020 n=40+31) [Geo mean] 7.77MB/s 7.78MB/s +0.16% 3. There is little change in the compilecmp benchmark (excluding noise). name old time/op new time/op delta Template 2.37s ± 3% 2.35s ± 4% ~ (p=0.529 n=10+10) Unicode 1.38s ± 8% 1.36s ± 5% ~ (p=0.247 n=10+10) GoTypes 8.10s ± 2% 8.10s ± 2% ~ (p=0.971 n=10+10) Compiler 40.5s ± 4% 40.8s ± 1% ~ (p=0.529 n=10+10) SSA 115s ± 2% 115s ± 3% ~ (p=0.684 n=10+10) Flate 1.45s ± 5% 1.46s ± 3% ~ (p=0.796 n=10+10) GoParser 1.86s ± 4% 1.84s ± 2% ~ (p=0.095 n=9+10) Reflect 5.11s ± 2% 5.13s ± 2% ~ (p=0.315 n=10+10) Tar 2.22s ± 3% 2.23s ± 1% ~ (p=0.299 n=9+7) XML 2.72s ± 3% 2.72s ± 3% ~ (p=0.912 n=10+10) [Geo mean] 5.03s 5.02s -0.21% name old user-time/op new user-time/op delta Template 2.92s ± 2% 2.89s ± 1% ~ (p=0.247 n=10+10) Unicode 1.71s ± 5% 1.69s ± 4% ~ (p=0.393 n=10+10) GoTypes 9.78s ± 2% 9.76s ± 2% ~ (p=0.631 n=10+10) Compiler 49.1s ± 2% 49.1s ± 1% ~ (p=0.796 n=10+10) SSA 144s ± 1% 144s ± 2% ~ (p=0.796 n=10+10) Flate 1.74s ± 2% 1.73s ± 3% ~ (p=0.842 n=10+9) GoParser 2.23s ± 3% 2.25s ± 2% ~ (p=0.143 n=10+10) Reflect 5.93s ± 3% 5.98s ± 2% ~ (p=0.211 n=10+9) Tar 2.65s ± 2% 2.69s ± 3% +1.51% (p=0.010 n=9+10) XML 3.25s ± 2% 3.21s ± 1% -1.24% (p=0.035 n=10+9) [Geo mean] 6.07s 6.07s -0.08% name old text-bytes new text-bytes delta HelloSize 641kB ± 0% 641kB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 9.46kB ± 0% 9.46kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 125kB ± 0% 125kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.24MB ± 0% 1.24MB ± 0% ~ (all equal) Change-Id: Id095d998c380eef929755124084df02446a6b7c1 Reviewed-on: https://go-review.googlesource.com/92555 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Ian Lance Taylor authored
Increase the sleep and wait for up to 2 seconds for the dup2. Apparently it can sometimes take a long time. Fixes #23784 Change-Id: I929530b057bbcd842b28a7640c39dd68d719ff7d Reviewed-on: https://go-review.googlesource.com/93895 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Martí authored
Backslashes are ignored in Match and Glob on Windows, since those collide with the separator character. However, they should still work in both functions on other operating systems. hasMeta did not reflect this logic - it always treated a backslash as a non-special character. Do that only on Windows. Assuming this is what the TODO was referring to, remove it. There are no other characters that scanChunk treats especially. Fixes #23418. Change-Id: Ie0bd795812e0ed9d8c8c1bbc3137f29d960cba84 Reviewed-on: https://go-review.googlesource.com/87455 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Daniel Martí authored
path.Match works purely with strings, not file paths. That's what sets it apart from filepath.Match. For example, only filepath.Match will change its behavior towards backslashes on Windows, to accomodate for the file path separator on that system. As such, path.Match should make no mention of file names. Nor should path.ErrBadPattern mention globbing at all - the package has no notion of globbing, and the error concerns only patterns. For a similar reason, remove the mention of globbing from filepath.ErrBadPattern. The error isn't reserved to just globbing, as it can be returned from filepath.Match. And, as before, it only concerns the patterns themselves. Change-Id: I58a83ffa3e2549625d8e546ef916652525504bd1 Reviewed-on: https://go-review.googlesource.com/87857Reviewed-by: Rob Pike <r@golang.org>
-
Alberto Donizetti authored
Fatalf calls in two Float tests use the %s verb with Floats values, which is not allowed and results in failure messages that look like this: float_test.go:1385: i = 0, prec = 1, ToZero: %!s(*big.Float=1) [0] / %!s(*big.Float=1) [0] = %!s(*big.Float=0.0625) want %!s(*big.Float=1) Switch to %v. Change-Id: Ifdc80bf19c91ca1b190f6551a6d0a51b42ed5919 Reviewed-on: https://go-review.googlesource.com/87199 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Martin Möhrmann authored
ordercopyexpr is only called with 0 or 1 as value for the clear argument. The clear variable in ordercopyexpr is only used in the call to ordertemp which has a clear argument of type bool. Change the clear argument of ordercopyexpr from int to bool and change calls to ordercopyexpr to use false instead of 0 and true instead of 1. Passes toolstash -cmp. Change-Id: Ic264aafd3b0c8b99f6ef028ffaa2e30f23f9125a Reviewed-on: https://go-review.googlesource.com/88115Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
-
Martin Möhrmann authored
This makes the constant names less verbose and aligns them more with the Linux kernel which uses HWCAP_XXX for the constant names. Change-Id: Ia7d079b59b57978adc045945951eaa1d99b41fac Reviewed-on: https://go-review.googlesource.com/91738 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Also order the syscall number list by numerically for mips64x. Follow-up for CL 92895. Change-Id: I5f01f8c626132a06160997fce8a2aef0c486bb1c Reviewed-on: https://go-review.googlesource.com/93616 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Agniva De Sarker authored
This moves the paragraph mentioning the use of _ higher up to emphasize the warning and thereby reducing chances of getting stuck. Fixes #22617 Change-Id: I64352a3e966a22d86fc9d381332bade49d74714a Reviewed-on: https://go-review.googlesource.com/87375Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tim Cooper authored
Fixes #23574 Change-Id: I69573de47daa6fd53cc99a78c0c4b867460242e3 Reviewed-on: https://go-review.googlesource.com/90275Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
The sub-word shifts need to sign-extend before shifting, to avoid bringing in data from higher in the argument. Fixes #23812 Change-Id: I0a95a0b49c48f3b40b85765bb4a9bb492be0cd73 Reviewed-on: https://go-review.googlesource.com/93716 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
- 13 Feb, 2018 15 commits
-
-
Mikio Hara authored
As usual, adding go1.11 early in the cycle so that we can start regression testing of the master toolchain. Change-Id: Ie96eca7223722d60d7acc6b3b996b76740c36419 Reviewed-on: https://go-review.googlesource.com/93775Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David du Colombier authored
CL 92916 added the GOMAXPROCS test in TestTraceSymbolize. This test only succeeds when the value of GOMAXPROCS changes. Since the test calls runtime.GOMAXPROCS(1), it will fails on machines where GOMAXPROCS=1. This change fixes the test by calling runtime.GOMAXPROCS(oldGoMaxProcs+1). Fixes #23816. Change-Id: I1183dbbd7db6077cbd7fa0754032ff32793b2195 Reviewed-on: https://go-review.googlesource.com/93735 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Change-Id: Id057dcc85d64e5c670710fbab6cacd4b906cf594 Reviewed-on: https://go-review.googlesource.com/93655 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Martí authored
It makes no sense to try to get the zero value of a nil type, hence the panic. When we have a nil type, use reflect.ValueOf(nil) instead. This was showing itself if one used a missing field on the data between parentheses, when the data was a nil interface: t := template.Must(template.New("test").Parse(`{{ (.).foo }}`)) var v interface{} t.Execute(os.Stdout, v) Resulting in: panic: reflect: Zero(nil) [recovered] panic: reflect: Zero(nil) Fixes #21171. Change-Id: Ifcc4a0c67e6df425b65bc9f82fde6fcf03828579 Reviewed-on: https://go-review.googlesource.com/84482 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Kevin Burke authored
Change-Id: I8a6c3e225038cbeb315433fabf8835f582836d3e Reviewed-on: https://go-review.googlesource.com/93657Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tamir Duberstein authored
Since https://golang.org/cl/38533, this validation is performed in driverArgs. Change-Id: I13a3ca46a1aa3197370de1095fb46ab83ea4628c Reviewed-on: https://go-review.googlesource.com/91115Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
HaraldNordgren authored
When 'convertAssign' gives an error, instead of giving just the index of the failing column -- which is not always helpful, especially when there are lots of columns in the query -- utilize 'rs.rowsi.Columns()' to extract the underlying column name and include that in the error string: sql: Scan error on column index 0, name "some_column": ... Fixes #23362 Change-Id: I0fe71ff3c25f4c0dd9fc6aa2c2da2360dd93e3e0 Reviewed-on: https://go-review.googlesource.com/86537Reviewed-by: Harald Nordgren <haraldnordgren@gmail.com> Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
The former checks if a type has a method called "Format". The latter checks if a type satisfies fmt.Formatter. isFormatter does exactly what we want, so it's both simpler and more accurate. Remove the only use of hasMethod in its favor. Change-Id: Idc156a99081c3308f98512b87011a04aa8c6638d Reviewed-on: https://go-review.googlesource.com/91215 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Daniel Martí authored
All the other tools and commands print the usage text to standard error. "go tool compile" was the odd one out, so fix it. While at it, make objabi.Flagprint a bit more Go-like with an io.Writer instead of a file descriptor, which is likely a leftover from the C days. Fixes #23234. Change-Id: I9abf2e79461e61c8c8bfaee2c6bf8faf26e0e6c3 Reviewed-on: https://go-review.googlesource.com/85418 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Austin Clements authored
Currently, if a sigpanic call is injected into C code, it's possible for preparePanic to leave the stack in a state where traceback can't unwind correctly past the sigpanic. Specifically, shouldPushPanic sniffs the stack to decide where to put the PC from the signal context. In the cgo case, it will find that !findfunc(pc).valid() because pc is in C code, and then it will check if the top of the stack looks like a Go PC. However, this stack slot is just in a C frame, so it could be uninitialized and contain anything, including what looks like a valid Go PC. For example, in https://build.golang.org/log/c601a18e2af24794e6c0899e05dddbb08caefc17, it sees 1c02c23a <runtime.newproc1+682>. When this condition is met, it skips putting the signal PC on the stack at all. As a result, when we later unwind from the sigpanic, we'll "successfully" but incorrectly unwind to whatever PC was in this uninitialized slot and go who knows where from there. Fix this by making shouldPushPanic assume that the signal PC is always usable if we're running C code, so we always make it appear like sigpanic's caller. This lets us be pickier again about unexpected return PCs in gentraceback. Updates #23640. Change-Id: I1e8ade24b031bd905d48e92d5e60c982e8edf160 Reviewed-on: https://go-review.googlesource.com/91137 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
This logic is duplicated in all of the preparePanic functions. Pull it out into one architecture-independent function. Change-Id: I7ef4e78e3eda0b7be1a480fb5245fc7424fb2b4e Reviewed-on: https://go-review.googlesource.com/91255 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Nate Wilkinson authored
Fixes #23791 Change-Id: I3ded0cd6e9fea14f477f90cf4ad1fb9ff95257f4 Reviewed-on: https://go-review.googlesource.com/93416Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
While doing that, establish a negative value as signal for unknown array lengths and adjust various array-length processing code to handle that case. Fixes #23712. Change-Id: Icf488faaf972638b42b22d4b4607d1c512c8fc2c Reviewed-on: https://go-review.googlesource.com/93438Reviewed-by: Alan Donovan <adonovan@google.com>
-
Peter Teichman authored
The Netscape looping application extension encodes how many times the animation should restart, and if it's present there is no way to signal that a GIF should play only once. Use LoopCount=-1 to signal when a decoded GIF had no looping extension, and update the encoder to omit that extension block when LoopCount=-1. Fixes #15768 GitHub-Last-Rev: 249744f0e28ef8907aa876070a102cb5493f5084 GitHub-Pull-Request: golang/go#23761 Change-Id: Ic915268505bf12bdad690b59148983a7d78d693b Reviewed-on: https://go-review.googlesource.com/93076Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates #20784 Change-Id: Ic07c78a86da5026e407ac9ecb3117d320c198048 Reviewed-on: https://go-review.googlesource.com/82016Reviewed-by: Andrew Bonventre <andybons@golang.org>
-