- 27 Feb, 2019 14 commits
-
-
Gergely Brautigam authored
If a type switch case expression has failed typechecking, the case body is likely to also fail with confusing or spurious errors. Suppress typechecking the case body when this happens. Fixes #28926 Change-Id: Idfdb9d5627994f2fd90154af1659e9a92bf692c4 Reviewed-on: https://go-review.googlesource.com/c/158617 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Tobias Klauser authored
Fixes #30253 Change-Id: I0c3d67649ea379b67f3575c1219fe05a04f056ae Reviewed-on: https://go-review.googlesource.com/c/162859 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Tobias Klauser authored
If a PE file with invalid optional header size (neither sizeofOptionalHeader32 nor sizeofOptionalHeader64) is passed to NewFile, the File.OptionalHeader will be nil which leads to a panic in (*File).ImportedSymbols(). Fixes #30250 Change-Id: Ie97306de4a0e2dcfdc7b1b599891f574aa63adca Reviewed-on: https://go-review.googlesource.com/c/162858 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Filippo Valsorda authored
Updates #30055 Change-Id: I3e79dd7592673c5d76568b0bcded6c391c3be6b3 Reviewed-on: https://go-review.googlesource.com/c/163081 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Filippo Valsorda authored
In Go 1.13 we will enable RSA-PSS in TLS 1.2 at the same time as we make TLS 1.3 enabled by default. This reverts commit 7ccd3583. Updates #30055 Change-Id: I6f2ddf7652d1172a6b29f4e335ff3a71a89974bc Reviewed-on: https://go-review.googlesource.com/c/163080 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
-
Josh Bleecher Snyder authored
Prior to this change, DATA instructions accepted the values 1, 2, 4, and 8 as sizes. The acceptable sizes were further restricted to 4 and 8 for float constants. This was both too restrictive and not restrictive enough: string constants may reasonably have any length, and address constants should really only accept pointer-length sizes. Fixes #30269 Change-Id: I06e44ecdf5909eca7b19553861aec1fa39655c2b Reviewed-on: https://go-review.googlesource.com/c/163747 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
These are required when testing gccgo. Change-Id: I6a81d7f4d48292c32a8b3b15ef44d859ab3aa26e Reviewed-on: https://go-review.googlesource.com/c/163861 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Leon Klingele authored
Change-Id: Id2e57bc8e18e062f60c6ac8a58dc15e049352088 GitHub-Last-Rev: 6d33b809cf8a3b5412333b1c3cc237000be8101d GitHub-Pull-Request: golang/go#30016 Reviewed-on: https://go-review.googlesource.com/c/160440 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
-
Mikio Hara authored
Updates #15228. Change-Id: I1b73defccb4c933d71c408aa31d32af9d1bc4ab8 Reviewed-on: https://go-review.googlesource.com/c/163357Reviewed-by: Matt Layher <mdlayher@gmail.com>
-
Rob Pike authored
Fix the punctuation and use the proper units for microseconds, while explaining the incorrect but common variant 'us'. Change-Id: I9e96694ef27ab4761efccd8616ac7b6700f60d39 Reviewed-on: https://go-review.googlesource.com/c/163917Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Consistent logic for handling both duplicate map keys and case values, and eliminates ad hoc value hashing code. Also makes cmd/compile consistent with go/types's handling of duplicate constants (see #28085), which is at least an improvement over the status quo even if we settle on something different for the spec. As a side effect, this also suppresses cmd/compile's warnings about duplicate nils in (non-interface expression) switch statements, which was technically never allowed by the spec anyway. Updates #28085. Updates #28378. Change-Id: I176a251e770c3c5bc11c2bf8d1d862db8f252a17 Reviewed-on: https://go-review.googlesource.com/c/152544 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
CL 142497 renamed "statictmp_N" to ".stmp_N", but missed an instance that was added by CL 151498 (submitted between the window that CL 142497 was reviewed/tested and later rebased/merged). Change-Id: I597ee59dfa40821c7af2881b47e06f84a8140ec8 Reviewed-on: https://go-review.googlesource.com/c/163877 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brian Kessler authored
If the variables passed in to the cofactor arguments of GCD (x, y) aliased the input arguments (a, b), the previous implementation would result in incorrect results for y. This change reorganizes the calculation so that the only case that need to be handled is when y aliases b, which can be handled with a simple check. Tests were added for all of the alias cases for input arguments and and and irrelevant test case for a previous binary GCD calculation was dropped. Fixes #30217 Change-Id: Ibe6137f09b3e1ae3c29e3c97aba85b67f33dc169 Reviewed-on: https://go-review.googlesource.com/c/162517 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
go101 authored
The current ExampleCommentMap might panic if there are more satisfied comments in the parsed program. Change-Id: Ibe6943470aa0cfb450dae9fc07c1199acaabef73 GitHub-Last-Rev: c79e98c2868179ea47618b296ce28c5eebc0b99d GitHub-Pull-Request: golang/go#28587 Reviewed-on: https://go-review.googlesource.com/c/147359 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
- 26 Feb, 2019 26 commits
-
-
Francesc Campoy authored
This change limits the capacity of the slices of bytes returned by: - Find - FindAll - FindAllSubmatch to be the same as their length. Fixes #30169 Change-Id: I07b632757d2bfeab42fce0d42364e2a16c597360 Reviewed-on: https://go-review.googlesource.com/c/161877Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
This will need to be updated from time to time as new targets are added to gccgo. But that is better than always returning nil. Change-Id: I04b8c4d0f8efa38e2a148eb2e38b16b09f0351c3 Reviewed-on: https://go-review.googlesource.com/c/158844 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
WhisperRain authored
Set element in slice to nil avoiding memory leak. Change-Id: I9dbef9a0466407011e326725d3a0b681cd815389 GitHub-Last-Rev: 1bae5d375876a7f146eb04c2a5ba88d079264eb3 GitHub-Pull-Request: golang/go#30386 Reviewed-on: https://go-review.googlesource.com/c/163601 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
This makes the tests slightly faster, though the bulk of the time is still spent building the test programs. Also run some tests in parallel. Updates #26470 Change-Id: Ia5ec2b99831d69c426b43dbab80613aa03e705f5 Reviewed-on: https://go-review.googlesource.com/c/153258Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
Updates https://gcc.gnu.org/PR89406 Change-Id: Iccf2760e42e9caa90720b96e74a805a9c0d48f35 Reviewed-on: https://go-review.googlesource.com/c/163277 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com> Reviewed-by: Than McIntosh <thanm@google.com>
-
Ian Lance Taylor authored
Fixes #30400 Change-Id: Icbd1dda29562afa80c8e37657133a6fe48070ac0 Reviewed-on: https://go-review.googlesource.com/c/163744Reviewed-by: Rob Pike <r@golang.org>
-
Leon Klingele authored
Change-Id: Ia0847790a597c35ebb572db6fc1b7534ecf8f006 GitHub-Last-Rev: 03f039d0abbce0e2a2bf15201948e46354950a22 GitHub-Pull-Request: golang/go#30022 Reviewed-on: https://go-review.googlesource.com/c/160446Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Leon Klingele authored
Change-Id: Iaa0e1721996b582bba9509c083755e1f125abb6b GitHub-Last-Rev: c9b13ec0cdc2b22aafa54706dc6df6113a11712b GitHub-Pull-Request: golang/go#29996 Reviewed-on: https://go-review.googlesource.com/c/160420 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ian Lance Taylor authored
Also store 64-bit data in lib/time/zoneinfo.zip. The comments argue that we don't need the 64-bit data until 2037 or 2106, but that turns out not to be the case. We also need them for dates before December 13, 1901, which is time.Unix(-0x80000000, 0). Fixes #30099 Change-Id: Ib8c9efb29b7b3c08531ae69912c588209d6320e9 Reviewed-on: https://go-review.googlesource.com/c/161202Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Iskander Sharipov authored
Emit &runtime.zerobase instead of a call to newobject for allocations of zero sized objects in walk.go. Fixes #29446 Change-Id: I11b67981d55009726a17c2e582c12ce0c258682e Reviewed-on: https://go-review.googlesource.com/c/155840 Run-TryBot: Iskander Sharipov <quasilyte@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Bryan Heden authored
Original Printf("%d", hi) obviously doesn't produce %!d(string=hi) unless somewhere before this code block you have hi := "hi" somewhere, also this change maintains consistency with the rest of it Change-Id: I40d8cca623176dcad66374ba74e3a1f8f975ac9e GitHub-Last-Rev: 242e9ee6afba7ab22ed2967b0ba01ef18db01ca9 GitHub-Pull-Request: golang/go#30223 Reviewed-on: https://go-review.googlesource.com/c/162541Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Mottl authored
This commit adds godoc for Dir.Open function. Change-Id: Ibc3b22f38660a082802e1f868c5cf9d880fc2801 GitHub-Last-Rev: 774cfd7d8cc61989179956e47d51451135b6c203 GitHub-Pull-Request: golang/go#30353 Reviewed-on: https://go-review.googlesource.com/c/163437Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Change-Id: Icdc980e0dcb5639c49aba5f4f252f33bd207e4fa Reviewed-on: https://go-review.googlesource.com/c/162617 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Jeremy Jay authored
Change-Id: Ib24778f3172c011e6a39ee65dce8764f3cc911ea GitHub-Last-Rev: 9c617c1e60ac48db67e26e64ce240d3845c0e6ac GitHub-Pull-Request: golang/go#30284 Reviewed-on: https://go-review.googlesource.com/c/162999Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Leon Klingele authored
Change-Id: I904b8655f21743189814bccf24073b6fbb9fc56d GitHub-Last-Rev: b032c14394c949f9ad7b18d019a3979d38d4e1fb GitHub-Pull-Request: golang/go#29997 Reviewed-on: https://go-review.googlesource.com/c/160421Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Derek Phan authored
Change-Id: Ic93a084311de46461ed3b30f4ac2fe11311e74d7 GitHub-Last-Rev: 32fbd63b10d0fa489406333ff6f8b6708974a73c GitHub-Pull-Request: golang/go#29705 Reviewed-on: https://go-review.googlesource.com/c/157642 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
-
Alessandro Arzilli authored
Avoid name collisions between autogenerated statictmp variables and user defined global variables. Fixes #25113 Change-Id: I023eb42a5c2bd2f5352b046d33363faed87084dc Reviewed-on: https://go-review.googlesource.com/c/142497Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Back when the linker did code generation after dead code elimination, it had to know that references to runtime.read_tls_fallback could be generated at code generation time (and never appear before that). Now that code generation is done by the compiler, the references to runtime.read_tls_fallback are obvious in the relocations, so the linker no longer needs special knowledge of this symbol. Change-Id: I9813a8478e85a6a13470b2d0528db53fd33fcfdf Reviewed-on: https://go-review.googlesource.com/c/154601 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Marcel van Lohuizen authored
generating frame information in errors will cause this function to no longer be inlined. Updates #29934. Change-Id: I1d7bc11707f1872d7315f627bfb9a12afa41e358 Reviewed-on: https://go-review.googlesource.com/c/161760 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
The number of CPUs reported by the hw.ncpu sysctl is twice as high as the actual number of CPUs running on OpenBSD 6.4. with hyperthreading disabled (hw.smt=0). Try hw.cpuonline first and fall back to hw.ncpu in case it fails (which is the case on older OpenBSD before 6.4). Fixes #30127 Change-Id: Id091234b8038cc9f7c40519d039fc1a05437c40d Reviewed-on: https://go-review.googlesource.com/c/161757 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Ggicci authored
The path of the new stripped URL should also be cleaned. Since an empty path may cause unexpected errors in some HTTP handlers, e.g. http.ServeFile. Fixes #30165 Change-Id: Ib44fdce6388b5d62ffbcab5266925ef8f13f26e2 Reviewed-on: https://go-review.googlesource.com/c/161738Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Yasser Abdolmaleki authored
Change-Id: If9332bae87449c94fc14710133614fcd84d2815c Reviewed-on: https://go-review.googlesource.com/c/161726Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Tobias Klauser authored
This was spotted during the review of the corresponding CL 154179 for x/sys/unix. Let's change it in syscall as well to be consistent. Change-Id: I33f25db1f6ba941b694c2aa276336448cc2b9b51 Reviewed-on: https://go-review.googlesource.com/c/154719 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tooru Takahashi authored
Change-Id: I31ac8845e72c3027c9a463b1f691f4d2b7913ec0 GitHub-Last-Rev: a6b185cc41d649141e6034b77bcfe53525498ea6 GitHub-Pull-Request: golang/go#29682 Reviewed-on: https://go-review.googlesource.com/c/157518Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
-
Keith Randall authored
They can't be used, so we don't need code generated for them. We just need to report errors in their bodies. The compiler currently has a bunch of special cases sprinkled about for "_" functions, because we never generate a linker symbol for them. Instead, abort compilation earlier so we never reach any of that special-case code. Fixes #29870 Change-Id: I3530c9c353deabcf75ce9072c0b740e992349ee5 Reviewed-on: https://go-review.googlesource.com/c/158845 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
var a []int = ... p := &a[0] _ = *p We don't need to nil check on the 3rd line. If the bounds check on the 2nd line passes, we know p is non-nil. We rely on the fact that any cap>0 slice has a non-nil pointer as its pointer to the backing array. This is true for all safely-constructed slices, and I don't see any reason why someone would violate this rule using unsafe. R=go1.13 Fixes #30366 Change-Id: I3ed764fcb72cfe1fbf963d8c1a82e24e3b6dead7 Reviewed-on: https://go-review.googlesource.com/c/163740 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-