aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-04[release-branch.go1.19] go1.19.2go1.19.2Gopher Robot
Change-Id: Ia5de3a0fa07f212c5c19f9e01b0ed2cfab739e95 Reviewed-on: https://go-review.googlesource.com/c/go/+/438598 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Gopher Robot <gobot@golang.org> Run-TryBot: Gopher Robot <gobot@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-04[release-branch.go1.19] regexp: limit size of parsed regexpsRuss Cox
Set a 128 MB limit on the amount of space used by []syntax.Inst in the compiled form corresponding to a given regexp. Also set a 128 MB limit on the rune storage in the *syntax.Regexp tree itself. Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue. Fixes CVE-2022-41715. Updates #55949. Fixes #55951. Change-Id: Ia656baed81564436368cf950e1c5409752f28e1b Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1592047 Reviewed-by: Julie Qiu <julieqiu@google.com> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Roland Shoemaker <bracewell@google.com> TryBot-Result: Security TryBots <security-trybots@go-security-trybots.iam.gserviceaccount.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/438499 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-10-04[release-branch.go1.19] archive/tar: limit size of headersDamien Neil
Set a 1MiB limit on special file blocks (PAX headers, GNU long names, GNU link names), to avoid reading arbitrarily large amounts of data into memory. Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue. Fixes CVE-2022-2879 Updates #54853 Fixes #55926 Change-Id: I85136d6ff1e0af101a112190e027987ab4335680 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1565555 Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Run-TryBot: Roland Shoemaker <bracewell@google.com> Reviewed-by: Roland Shoemaker <bracewell@google.com> (cherry picked from commit 6ee768cef6b82adf7a90dcf367a1699ef694f3b2) Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1591053 Reviewed-by: Julie Qiu <julieqiu@google.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/438498 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Carlos Amedee <carlos@golang.org>
2022-09-28[release-branch.go1.19] net/http/httputil: avoid query parameter smugglingDamien Neil
Query parameter smuggling occurs when a proxy's interpretation of query parameters differs from that of a downstream server. Change ReverseProxy to avoid forwarding ignored query parameters. Remove unparsable query parameters from the outbound request * if req.Form != nil after calling ReverseProxy.Director; and * before calling ReverseProxy.Rewrite. This change preserves the existing behavior of forwarding the raw query untouched if a Director hook does not parse the query by calling Request.ParseForm (possibly indirectly). Fixes #55843 For #54663 For CVE-2022-2880 Change-Id: If1621f6b0e73a49d79059dae9e6b256e0ff18ca9 Reviewed-on: https://go-review.googlesource.com/c/go/+/432976 Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/433735 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-09-21[release-branch.go1.19] cmd/compile/internal/typebits: relax alignment checkCuong Manh Le
Now we have 8-byte alignment types on 32-bit system, so in some rare case, e.g, generated wrapper for embedded interface, the function argument may need more than 4 byte alignment. We could pad somehow, but this is a rare case which makes it hard to ensure that we've got it right. So relaxing the check for argument and return value region of the stack. Fixes #55152 Change-Id: I34986e17a920254392a39439ad3dcb323da2ea8d Reviewed-on: https://go-review.googlesource.com/c/go/+/431098 Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/431895
2022-09-21[release-branch.go1.19] cmd/compile: skip emitting dictionaries with missing ↵Matthew Dempsky
method expressions The nounified frontend currently tries to construct dictionaries that correspond to invalid instantiations (i.e., instantiations T[X] where X does not satisfy the constraints specified on T's type parameter). As a consequence, we may fail to find method expressions needed by the dictionary. The real fix for this is to avoid creating those dictionaries in the first place, because they should never actually be needed at runtime. But that seems scary for a backport: we've repeatedly attempted to backport generics fixes, which have fixed one issue but introduced another. This CL is a minimally invasive solution to #54225, which avoids the ICE by instead skipping emitting the invalid dictionary. If the dictionary ends up not being needed (which I believe will always be the case), then the linker's reachability analysis will simply ignore its absence. Or worst case, if the dictionary *is* reachable somehow, we've simply turned an ICE into a link-time missing symbol failure. That's not great for user experience, but it seems like a small trade off to avoid risking breaking any other currently working code. Fixes #55270. Change-Id: Ic379696079f4729b1dd6a66994a58cca50281a84 Reviewed-on: https://go-review.googlesource.com/c/go/+/429655 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/429895 Reviewed-by: Keith Randall <khr@google.com>
2022-09-21[release-branch.go1.19] cmd/link: suppress -no_pie deprecation warning on darwinCherry Mui
Apparently the new darwin linker starts to emit a warning about -no_pie deprecation. Maybe we want to switch to PIE by default. For now, suppress the warning. This also makes it easier for backporting to previous releases. Fixes #55114. Updates #55112, #54482. Change-Id: I1a3b74c237a9d00ec3b030fc3a9940a31e5cd37e Reviewed-on: https://go-review.googlesource.com/c/go/+/430937 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 706d84fca2b36fdf670a0d921e6a8a3b481eaa05) Reviewed-on: https://go-review.googlesource.com/c/go/+/431517
2022-09-21[release-branch.go1.19] cmd/link: stop passing -pagezero_size to darwin linkerCherry Mui
We added -pagezero_size in CL 72730, where it was intented for iOS. The current code passes it only on macOS/AMD64 instead. It is not really necessary there. Also, the new darwin linker starts to emit a warning about deprecation of the flag. Stop passing it. For #55114. Updates #55112, #54482. Change-Id: If9db7a1645c37d4284e48f075856912df8d8c1a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/430936 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> (cherry picked from commit 5231ba2f054f2ecb1387bad00b8745d6fe532ea4) Reviewed-on: https://go-review.googlesource.com/c/go/+/431515 Reviewed-by: Austin Clements <austin@google.com>
2022-09-21[release-branch.go1.19] go/types, types2: allow (string...) signature with ↵Robert Griesemer
NewSignatureType Includes cases where the core type of the variadic parameter is a slice or bytestring. Permits a client to create the signature for various instantiations of append. Fixes #55149. Change-Id: I0f4983eb00c088cbe1d87954ee0b2df0ccc3bc49 Reviewed-on: https://go-review.googlesource.com/c/go/+/430455 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/431935
2022-09-21[release-branch.go1.19] cmd/compile: avoid using destination pointer base ↵Keith Randall
type in memmove optimization The type of the source and destination of a memmove call isn't always accurate. It will always be a pointer (or an unsafe.Pointer), but the base type might not be accurate. This comes about because multiple copies of a pointer with different base types are coalesced into a single value. In the failing example, the IData selector of the input argument is a *[32]byte in one branch of the type switch, and a *[]byte in the other branch. During the expand_calls pass both IDatas become just copies of the input register. Those copies are deduped and an arbitrary one wins (in this case, *[]byte is the unfortunate winner). Generally an op v can rely on v.Type during rewrite rules. But relying on v.Args[i].Type is discouraged. Fixes #55124 Change-Id: I348fd9accf2058a87cd191eec01d39cda612f120 Reviewed-on: https://go-review.googlesource.com/c/go/+/431496 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> (cherry picked from commit e283473ebbebf4a80db166e7e852d03c5cff1a61) Reviewed-on: https://go-review.googlesource.com/c/go/+/431917
2022-09-19[release-branch.go1.19] cmd/compile/internal/inline: fix latent ↵Matthew Dempsky
CalleeEffects issue ir.ClosureExpr implements ir.InitNode, so ir.InitExpr can prepend init statements to it. However, CalleeEffects wasn't aware of this and could cause the init statements to get dropped when inlining a call to a closure. This isn't an issue today, because we don't create closures with init statements. But I ran into this within unified IR. Easy and robust solution: just take advantage that ir.TakeInit can handle any node. Fixes #54917. Change-Id: Ica05fbf6a8c5be4b11927daf84491a1140da5431 Reviewed-on: https://go-review.googlesource.com/c/go/+/422196 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/429896 Reviewed-by: Michael Knyszek <mknyszek@google.com>
2022-09-13[release-branch.go1.19] runtime/cgo: add -fno-stack-protector to CFLAGSAustin Clements
Some compilers default to having -fstack-protector on, which breaks when using internal linking because the linker doesn't know how to find the support functions. Fixes #54764 (Original fix by Ian Lance Taylor <iant@golang.org>) Change-Id: I2d8cb7fb780de4cd37314af3957b8f429b1e4b70 Reviewed-on: https://go-review.googlesource.com/c/go/+/429138 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-09-09[release-branch.go1.19] all: upgrade golang.org/x/net to ↵Damien Neil
v0.0.0-20220907013720-d52c520e3766 Restore vendoring after go1.19.1 security release. For #54376 Change-Id: Ie1512aa2bf77e5f448893c89e4841cb14896da9b Reviewed-on: https://go-review.googlesource.com/c/go/+/429317 Reviewed-by: Carlos Amedee <carlos@golang.org> Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-06[release-branch.go1.19] go1.19.1go1.19.1Gopher Robot
Change-Id: Iada84ba9c8e727e89cfb4ac21a27e085fa7f60e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/428697 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Gopher Robot <gobot@golang.org> Auto-Submit: Gopher Robot <gobot@golang.org>
2022-09-06[release-branch.go1.19] net/http: update bundled golang.org/x/net/http2Damien Neil
Disable cmd/internal/moddeps test, since this update includes PRIVATE track fixes. Fixes CVE-2022-27664 Fixes #54376 For #54658 Change-Id: I747900a66d7276e7d0bd246cd8cd0da95305c3ca Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1554417 Reviewed-by: Tatiana Bradley <tatianabradley@google.com> Reviewed-by: Roland Shoemaker <bracewell@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/428655 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Tatiana Bradley <tatiana@golang.org> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-31[release-branch.go1.19 cmd/compile: align stack offset to alignment larger ↵Cherry Mui
than PtrSize In typebits.Set we check that the offset is a multiple of the alignment, which makes perfect sense. But for values like atomic.Int64, which has 8-byte alignment even on 32-bit platforms (i.e. the alignment is larger than PtrSize), if it is on stack it may be under-aligned, as the stack frame is only PtrSize aligned. Normally we would prevent such values on stack, as the escape analysis force values with higher alignment to heap. But for a composite literal assignment like x = AlignedType{...}, the compiler creates an autotmp for the RHS then copies it to the LHS. The autotmp is on stack and may be under-aligned. Currently this may cause an ICE in the typebits.Set check. This CL makes it align the _offset_ of the autotmp to 8 bytes, which satisfies the check. Note that this is actually lying: the actual address at run time may not necessarily be 8-byte aligned as we only align SP to 4 bytes. The under-alignment is probably okay. The only purpose for the autotmp is to copy the value to the LHS, and the copying code we generate (at least currently) doesn't care the alignment beyond stack alignment. Updates #54638. Fixes #54697. Change-Id: I13c16afde2eea017479ff11dfc24092bcb8aba6a Reviewed-on: https://go-review.googlesource.com/c/go/+/425256 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 1211a62bdcb0f070c5082255bcc90e1a14c16bb2) Reviewed-on: https://go-review.googlesource.com/c/go/+/425935
2022-08-31[release-branch.go1.19] runtime: mark morestack_noctxt SPWRITE on LR ↵Cherry Mui
architectures On LR architectures, morestack (and morestack_noctxt) are called with a special calling convention, where the caller doesn't save LR on stack but passes it as a register, which morestack will save to g.sched.lr. The stack unwinder currently doesn't understand it, and would fail to unwind from it. morestack already writes SP (as it switches stack), but morestack_noctxt (which tailcalls morestack) doesn't. If a profiling signal lands right in morestack_noctxt, the unwinder will try to unwind the stack and go off, and possibly crash. Marking morestack_noctxt SPWRITE stops the unwinding. Ideally we could teach the unwinder about the special calling convention, or change the calling convention to be less special (so the unwinder doesn't need to fetch a register from the signal context). This is a stop-gap solution, to stop the unwinder from crashing. Updates #54332. Fixes #54675. Change-Id: I75295f2e27ddcf05f1ea0b541aedcb9000ae7576 Reviewed-on: https://go-review.googlesource.com/c/go/+/425396 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> (cherry picked from commit e4be2ac79f3cc7219ae1cf8334463d11cae24e01) Reviewed-on: https://go-review.googlesource.com/c/go/+/425615
2022-08-31[release-branch.go1.19] runtime: fix ppc64 startup on newer linux kernelsPaul E. Murphy
R0 needs to be cleared at startup as it may not always be cleared by the kernel on newer kernels. Fixes #54665 Change-Id: Id7055699aaa8d8b193b7e3e784f075ce29ac3f1d Reviewed-on: https://go-review.googlesource.com/c/go/+/424927 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/425394 Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-08-31[release-branch.go1.19] cmd/compile: only inline method wrapper if method ↵Cuong Manh Le
don't contain closures CL 327871 changes methodWrapper to always perform inlining after global escape analysis. However, inlining the method may reveal closures, which require walking all function bodies to decide whether to capture free variables by value or by ref. To fix it, just not doing inline if the method contains any closures. Fixes #54726 Change-Id: I4b0255b86257cc6fe7e5fafbc545cc5cff9113e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/426334 Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/426160
2022-08-30[release-branch.go1.19] cmd/go/internal/imports: recognize "unix" build tagZeke Lu
For #20322 For #51572 Updates #54712 Fixes #54736 Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e GitHub-Last-Rev: cd2c6536b0298baf3c54e5bdbc456a814545cff4 GitHub-Pull-Request: golang/go#54716 Reviewed-on: https://go-review.googlesource.com/c/go/+/426296 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> (cherry picked from commit 3c6a5cdb9a29c0e3b12cdaa8ab81ba22d989e3b0) Reviewed-on: https://go-review.googlesource.com/c/go/+/426814 Run-TryBot: Bryan Mills <bcmills@google.com>
2022-08-29[release-branch.go1.19] cmd/link: fix trampolines breaking DWARF line infoJeremy Quirke
When trampolines are needed (e.g. Darwin ARM64), the DWARF LPT (Line Program Table - see DWARF section 6.1) generation fails because the replacement symbols are marked as external symbols and skipped during the DWARF LPT generation phase. Fixes #54406 Change-Id: I6c93f5378f50e5edf30d5121402a48214abb1ce2 GitHub-Last-Rev: 085bbc55dbc95d55456cc2acc46a0d02416c2848 GitHub-Pull-Request: golang/go#54321 Reviewed-on: https://go-review.googlesource.com/c/go/+/422154 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 2340d371796f95acdcc399e60f9ecefec2add8df) Reviewed-on: https://go-review.googlesource.com/c/go/+/423214 Run-TryBot: Cherry Mui <cherryyz@google.com>
2022-08-29[release-branch.go1.19] crypto/tls: support ECDHE when ec_point_formats is ↵Filippo Valsorda
missing Updates #49126 Fixes #54643 Change-Id: I9d6f6392b1a6748bdac1d2c6371b22d75829a2b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/425295 Run-TryBot: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Alex Scheel <alex.scheel@hashicorp.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: David Chase <drchase@google.com> (cherry picked from commit 1df2a03b17b4496bddfb482ec45b2a29c20e5249) Reviewed-on: https://go-review.googlesource.com/c/go/+/425635
2022-08-29[release-branch.go1.19] cmd/go/internal/imports: include ToolTags in the ↵Zeke Lu
Tags map This fixes a regression introduced when the "race" mode tag was moved to the ToolTags field in CL 358539. Fixes #54660 Updates #54468 Change-Id: I107771948a4fe9d743cc13d1c15f324212b08e03 GitHub-Last-Rev: d211e351ef3331f2c38b16d327d992a32ebbfe30 GitHub-Pull-Request: golang/go#54618 Reviewed-on: https://go-review.googlesource.com/c/go/+/425154 Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 6ba2674ddc5373f261211ba5ebc38496dc660604) Reviewed-on: https://go-review.googlesource.com/c/go/+/426434 Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-08-29[release-branch.go1.19] cmd/go: avoid registering AtExit handlers in testsBryan C. Mills
Ever since 'go build' was added (in CL 5483069), it has used an atexit handler to clean up working directories. CL 154109 introduced 'cc' command to the script test framework that called Init on a builder once per invocation. Unfortunately, since base.AtExit is unsynchronized, the Init added there caused any script that invokes that command to be unsafe for concurrent use. This change fixes the race by having the 'cc' command pass in its working directory instead of allowing the Builder to allocate one. Following modern Go best practices, it also replaces the in-place Init method (which is prone to typestate and aliasing bugs) with a NewBuilder constructor function. Updates #54423. Fixes #54637. Change-Id: I8fc2127a7d877bb39a1174e398736bb51d03d4d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/425205 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Than McIntosh <thanm@google.com> (cherry picked from commit d5aa088d822bc8ef3ceb80c20184f40fcb9b8d2e) Reviewed-on: https://go-review.googlesource.com/c/go/+/425207
2022-08-29[release-branch.go1.19] crypto/x509: don't panic marshaling invalid ECDSA keysFilippo Valsorda
MarshalPKIXPublicKey, CreateCertificate, CreateCertificateRequest, MarshalECPrivateKey, and MarshalPKCS8PrivateKey started raising a panic when encoding an invalid ECDSA key in Go 1.19. Since they have an error return value, they should return an error instead. Updates #54288 Fixes #54295 Change-Id: Iba132cd2f890ece36bb7d0396eb9a9a77bdb81df Reviewed-on: https://go-review.googlesource.com/c/go/+/422298 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> (cherry picked from commit f64f12f0b32eba7d49c259480e0fa0c79eb47600) Reviewed-on: https://go-review.googlesource.com/c/go/+/425634
2022-08-29[release-branch.go1.19] net/url: consistently remove ../ elements in JoinPathDamien Neil
JoinPath would fail to remove relative elements from the start of the path when the first path element is "". In addition, JoinPath would return the original path unmodified when provided with no elements to join, violating the documented behavior of always cleaning the resulting path. Correct both these cases. JoinPath("http://go.dev", "../go") // before: http://go.dev/../go // after: http://go.dev/go JoinPath("http://go.dev/../go") // before: http://go.dev/../go // after: http://go.dev/go For #54385. Fixes #54635. Fixes CVE-2022-32190. Change-Id: I6d22cd160d097c50703dd96e4f453c6c118fd5d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/423514 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> (cherry picked from commit 0765da5884adcc8b744979303a36a27092d8fc51) Reviewed-on: https://go-review.googlesource.com/c/go/+/425357 Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-29[release-branch.go1.19] cmd/go: avoid overwriting cached Origin metadataBryan C. Mills
Fixes #54633. Updates #54631. Change-Id: I17d2fa282642aeb1ae2a6e29a0756b8960bea34b Reviewed-on: https://go-review.googlesource.com/c/go/+/425255 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Than McIntosh <thanm@google.com> (cherry picked from commit e3004d96b6899945d76e5dd373756324c8ff98fb) Reviewed-on: https://go-review.googlesource.com/c/go/+/425211
2022-08-29[release-branch.go1.19] cmd/compile: handle partially overlapping assignmentsKeith Randall
Normally, when moving Go values of type T from one location to another, we don't need to worry about partial overlaps. The two Ts must either be in disjoint (nonoverlapping) memory or in exactly the same location. There are 2 cases where this isn't true: 1) Using unsafe you can arrange partial overlaps. 2) Since Go 1.17, you can use a cast from a slice to a ptr-to-array. https://go.dev/ref/spec#Conversions_from_slice_to_array_pointer This feature can be used to construct partial overlaps of array types. var a [3]int p := (*[2]int)(a[:]) q := (*[2]int)(a[1:]) *p = *q We don't care about solving 1. Or at least, we haven't historically and no one has complained. For 2, we need to ensure that if there might be partial overlap, then we can't use OpMove; we must use memmove instead. (memmove handles partial overlap by copying in the correct direction. OpMove does not.) Note that we have to be careful here not to introduce a call when we're marshaling arguments to a call or unmarshaling results from a call. Fixes #54629 Change-Id: I1ca6aba8041576849c1d85f1fa33ae61b80a373d Reviewed-on: https://go-review.googlesource.com/c/go/+/425076 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Keith Randall <khr@golang.org> (cherry picked from commit 332a5981d0ae3f21f668f94755f43ecd8ee9a9eb) Reviewed-on: https://go-review.googlesource.com/c/go/+/425234
2022-08-29[release-branch.go1.19] misc/cgo/testcarchive: permit SIGQUIT for ↵Ian Lance Taylor
TestSignalForwardingExternal Occasionally the signal will be sent to a Go thread, which will cause the program to exit with SIGQUIT rather than SIGSEGV. Add TestSignalForwardingGo to test the case where the signal is expected to be delivered to a Go thread. This is a roll forward of CL 419014 which was rolled back in CL 424954. This CL differs from 419014 in that it skips TestSignalForwardingGo on darwin-amd64. For #53907 Fixes #54239 Change-Id: I5df3fd610c068df3bd48d9b3d7a9379248b97999 Reviewed-on: https://go-review.googlesource.com/c/go/+/425002 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> (cherry picked from commit d05ce23756573c6dc2c5026d936f2ef6ac140ee2) Reviewed-on: https://go-review.googlesource.com/c/go/+/425487 Reviewed-by: David Chase <drchase@google.com>
2022-08-29[release-branch.go1.19] cmd/compile: correct alignment of atomic.Int64Cuong Manh Le
Same as CL 417555, but for cmd/compile. Fixes #54235 Change-Id: I4cc6deaf0a87c952f636888b4ab73f81a44bfebd Reviewed-on: https://go-review.googlesource.com/c/go/+/420975 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/422034 Reviewed-by: Than McIntosh <thanm@google.com>
2022-08-19[release-branch.go1.19] cmd: vendor github.com/google/pprof to fix mangled ↵Michael Pratt
type parameter symbol names Updates github.com/google/pprof to bring in the commit from https://github.com/google/pprof/pull/717 which fixes mangled symbol names for type parameters. For #54105 Fixes #54420 Change-Id: I01af9f780aba3338b960a03b30906a23642e4448 Reviewed-on: https://go-review.googlesource.com/c/go/+/420234 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Than McIntosh <thanm@google.com> (cherry picked from commit cd9cd925bb9ed79975f2531a6b84f69905e4fc31) Reviewed-on: https://go-review.googlesource.com/c/go/+/423356 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2022-08-17[release-branch.go1.19] cmd/compile: fix wrong typeparams for selector expr ↵Cuong Manh Le
with embedded generic type For selector expression "x.M" where "M" is a promoted method, irgen is using the type of receiver "x" for determining the typeparams for instantiation. However, because M is a promoted method, so its associated receiver is not "x", but "x.T" where "T" is the embedded field of "x". That casues a mismatch when converting non-shape types arguments. Fixing it by using the actual receiver which has the method, instead of using the base receiver. Fixes #54243 Change-Id: I1836fc422d734df14e9e6664d4bd014503960bfc Reviewed-on: https://go-review.googlesource.com/c/go/+/419294 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/423114 Reviewed-by: Carlos Amedee <carlos@golang.org>
2022-08-11[release-branch.go1.19] cmd/compile: fix import/export of ODYNAMICDOTTYPEMatthew Dempsky
The RType field isn't needed when performing type assertions from non-empty interface types, because we use the ITab field instead. But the inline body exporter didn't know to expect this. It's possible we could use a single bool to distinguish whether we're serializing the RType or ITab field, but using two is simpler and seems safer. Fixes #54309. Change-Id: I9ddac72784fb2241fee0a0dee30493d868a2c259 Reviewed-on: https://go-review.googlesource.com/c/go/+/421755 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 0c4db1e347dc51589e5289388305b02108ca0aa1) Reviewed-on: https://go-review.googlesource.com/c/go/+/421715 Reviewed-by: Than McIntosh <thanm@google.com>
2022-08-02[release-branch.go1.19] go1.19go1.19Gopher Robot
Change-Id: Iea643b04a7eea7c882d7eec481b67e4ecc08a559 Reviewed-on: https://go-review.googlesource.com/c/go/+/420834 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-08-01[release-branch.go1.19] test: improve generic type assertion testMatthew Dempsky
The test added in CL 420674 only tested that the type assertions compiled at all. This CL changes it into a run test to make sure the type assertions compile and also run correctly. Updates #54135. Change-Id: Id17469faad1bb55ff79b0bb4163ef50179330033 Reviewed-on: https://go-review.googlesource.com/c/go/+/420421 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> (cherry picked from commit f2a9f3e2e0ce7e582d226ad9a41d3c36b146fc25) Reviewed-on: https://go-review.googlesource.com/c/go/+/420675 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2022-08-01[release-branch.go1.19] cmd/compile: fix wrong dict pass condition for type ↵Wayne Zuo
assertions Updates #54135. Change-Id: I2b27af8124014b2699ea44bdc765e1fb8f6c8028 Reviewed-on: https://go-review.googlesource.com/c/go/+/420394 Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org> Reviewed-by: Ian Lance Taylor <iant@google.com> (cherry picked from commit 27038b70f860e29fdf472ac5fb208b6ad9598c10) Reviewed-on: https://go-review.googlesource.com/c/go/+/420674 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-08-01[release-branch.go1.19] all: merge master (e99f53f) into release-branch.go1.19Dmitri Shuralyov
Merge List: + 2022-08-01 e99f53fed9 doc: move Go 1.19 release notes to x/website + 2022-08-01 8b13a073a1 doc: mention removal of cmd/compile's -importmap and -installsuffix flags + 2022-08-01 e95fd4c238 doc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCH + 2022-08-01 dee3efd9f8 doc/go1.19: fix a few links that were missing trailing slashes + 2022-07-30 f32519e5fb runtime: fix typos + 2022-07-29 9a2001a8cc cmd/dist: always pass -short=true with -quick + 2022-07-28 5c8ec89cb5 doc/go1.19: minor adjustments and links + 2022-07-28 417be37048 doc/go1.19: improve the loong64 release notes + 2022-07-28 027855e8d8 os/exec: add GODEBUG setting to opt out of ErrDot changes + 2022-07-27 462b78fe70 misc/cgo/test: use fewer threads in TestSetgidStress in long mode + 2022-07-27 055113ef36 math/big: check buffer lengths in GobDecode + 2022-07-27 4248146154 net: document UDPConn.ReadFromUDPAddrPort's AddrPort result more + 2022-07-26 faf4e97200 net: fix WriteMsgUDPAddrPort addr handling + 2022-07-26 caa225dd29 doc/go1.19: note that updated race syso files require GNU ld 2.26 + 2022-07-26 ceefd3a37b bytes: document that Reader.Reset affects the result of Size + 2022-07-26 3e97294663 runtime/cgo: use frame address to set g0 stack bound + 2022-07-25 24dc27a3c0 cmd/compile: fix blank label code + 2022-07-25 9fcc8b2c1e runtime: fix runtime.Breakpoint() on windows/arm64 + 2022-07-25 795a88d0c3 cmd/go: add space after comma in 'go help test' + 2022-07-25 9eb3992ddd doc/go1.19: minor fixes + 2022-07-25 dcea1ee6e3 time: clarify documentation for allowed formats and add tests to prove them + 2022-07-25 37c8112b82 internal/fuzz: fix typo in function comments + 2022-07-25 850d547d2d doc/go1.19: expand crypto release notes + 2022-07-24 64f2829c9c runtime: fix typo in function comments + 2022-07-24 2ff563a00e cmd/compile/internal/noder: correct spelling errors for instantiation + 2022-07-22 c5da4fb7ac cmd/compile: make jump table symbol local + 2022-07-22 774fa58d1d A+C: delete AUTHORS and CONTRIBUTORS + 2022-07-21 2d655fb15a unsafe: document when Sizeof/Offsetof/Alignof are not constant + 2022-07-21 076c3d7f07 net/http: remove accidental heading in Head documentation + 2022-07-21 c4a6d3048b cmd/dist: enable race detector test on S390X + 2022-07-20 244c8b0500 cmd/cgo: allow cgo to pass strings or []bytes bigger than 1<<30 + 2022-07-20 df38614bd7 test: use go tool from tree, not path + 2022-07-20 bb1749ba3b cmd/compile: improve GOAMD64=v1 violation test + 2022-07-19 176b63e711 crypto/internal/nistec,debug/gosym: fix typos + 2022-07-19 8e1e64c16a cmd/compile: fix mknode script + 2022-07-19 28be440d34 A+C: add Weizhi Yan + 2022-07-19 85a482fc24 runtime: revert to using the precomputed trigger for pacer calculations + 2022-07-19 ae7340ab68 CONTRIBUTORS: update for the Go 1.19 release + 2022-07-18 de8101d21b runtime: fix typos + 2022-07-18 967a3d985d cmd/compile: revert "remove -installsuffix flag" + 2022-07-18 c0c1bbde17 http: improve Get documentation + 2022-07-15 2aa473cc54 go/types, types2: correct alignment of atomic.Int64 + 2022-07-15 4651ebf961 encoding/gob: s/TestIngoreDepthLimit/TestIgnoreDepthLimit/ + 2022-07-14 dc00aed6de go/parser: skip TestParseDepthLimit for short tests + 2022-07-14 783ff7dfc4 encoding/xml: skip TestCVE202230633 for short tests + 2022-07-14 aa80228526 cmd/go/internal/modfetch: avoid duplicating path components in Git fetch errors + 2022-07-14 b9d5a25442 cmd/go: save zip sums for downloaded modules in 'go mod download' in a workspace + 2022-07-14 a906d3dd09 cmd/go: avoid re-enqueuing workspace dependencies with errors + 2022-07-14 266c70c263 doc/go1.19: add a release note for 'go list -json=SomeField' + 2022-07-13 558785a0a9 cmd/compile: remove -installsuffix flag + 2022-07-13 1355ea3045 cmd/compile: remove -importmap flag + 2022-07-13 f71f3d1b86 misc/cgo/testshared: run tests only in GOPATH mode + 2022-07-13 feada53661 misc/cgo/testcshared: don't rely on an erroneous install target in tests + 2022-07-13 c006b7ac27 runtime: clear timerModifiedEarliest when last timer is deleted + 2022-07-13 923740a8cc cmd/compile: fix type assert in dict pass + 2022-07-12 bf2ef26be3 cmd/go: in script tests, avoid checking non-main packages for staleness + 2022-07-12 5f5cae7200 cmd/go: avoid indexing GOROOT packages when the compiler is 'gccgo' + 2022-07-12 c2edb2c841 cmd/go: port TestIssue16471 to a script test and add verbose logging + 2022-07-12 9c2526e637 cmd/go/internal/modfetch/codehost: add missing newline in '# lock' log message + 2022-07-12 85486bcccb image/jpeg: increase TestLargeImageWithShortData timeout by an order of magnitude + 2022-07-12 27794c4d4a cmd/go/internal/modload: ignore disallowed errors when checking for updates Change-Id: Ic05832c8c7c33ab016386bf7e85d6bad62a8fb98
2022-08-01doc: move Go 1.19 release notes to x/websiteDmitri Shuralyov
Now that the development of the Go 1.19 release is almost done, its release notes are moved to their eventual long-term home in x/website in CL 420417. Delete the initial development copy here. For golang/go#51400. Change-Id: I741285555af28ce9a64e7f8d2b9fe2a0f3e13c26 Reviewed-on: https://go-review.googlesource.com/c/go/+/420418 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-08-01doc: mention removal of cmd/compile's -importmap and -installsuffix flagsMatthew Dempsky
Updates #51225. Change-Id: I820f3f5ba169635fee37c30e41b370c9399a436d Reviewed-on: https://go-review.googlesource.com/c/go/+/417534 Reviewed-by: Russ Cox <rsc@golang.org>
2022-08-01doc/go1.19: fix typo: EM_LONGARCH -> EM_LOONGARCHWANG Xuerui
Another last-minute fix. The whole repo is checked case-insensitively against "longarch" and this is the only occurrence. Change-Id: If13c123c1e44001a346f1df1df9d839c699703b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/420494 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-08-01doc/go1.19: fix a few links that were missing trailing slashesBrad Fitzpatrick
They were part of a chain of three redirects. Now it's only two, but that's #54081. Change-Id: Ibfe6a17a372df61df40124892951b48577e4ced9 Reviewed-on: https://go-review.googlesource.com/c/go/+/419634 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-30runtime: fix typoshopehook
Change-Id: I30c125be6cb321aa03ea827bd11c3169087e3d4c Reviewed-on: https://go-review.googlesource.com/c/go/+/420314 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-07-29cmd/dist: always pass -short=true with -quickIan Lance Taylor
Fixes #53818 Change-Id: I190a8bcf50d92b9c10e9980e630ebb362d8b19ec Reviewed-on: https://go-review.googlesource.com/c/go/+/417918 Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-07-28doc/go1.19: minor adjustments and linksRuss Cox
A few last-minute clarifications before the release. Change-Id: Ia0123441633c147aa3f76ea29ed26c7722e2416c Reviewed-on: https://go-review.googlesource.com/c/go/+/419994 Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-07-28doc/go1.19: improve the loong64 release notesWANG Xuerui
Link to the LoongArch documentations site, mention the ABI variant supported, and add a note about the unfortunate old-world/new-world split situation that users must be aware of. Updates #46229 For #51400 Change-Id: I6789f509263a0dbf113481148665e7951aa6a989 Reviewed-on: https://go-review.googlesource.com/c/go/+/417715 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn>
2022-07-28os/exec: add GODEBUG setting to opt out of ErrDot changesRuss Cox
The changes are likely to break users, and we need to make it easy to unbreak without code changes. For #43724. Fixes #53962. Change-Id: I105c5d6c801d354467e0cefd268189c18846858e Reviewed-on: https://go-review.googlesource.com/c/go/+/419794 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
2022-07-27misc/cgo/test: use fewer threads in TestSetgidStress in long modeCherry Mui
TestSetgidStress originally spawns 1000 threads for stress testing. It caused timeout on some builders so CL 415677 reduced to 50 in short mode. But it still causes flaky timeouts in longtest builders, so reduce the number of threads in long mode as well. Should fix #53641. Change-Id: I02f4ef8a143bb1faafe3d11ad223f36f5cc245c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/419453 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-27math/big: check buffer lengths in GobDecodeRoland Shoemaker
In Float.GobDecode and Rat.GobDecode, check buffer sizes before indexing slices. Fixes #53871 Change-Id: I1b652c32c2bc7a0e8aa7620f7be9b2740c568b0a Reviewed-on: https://go-review.googlesource.com/c/go/+/417774 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Tatiana Bradley <tatiana@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org>
2022-07-27net: document UDPConn.ReadFromUDPAddrPort's AddrPort result moreBrad Fitzpatrick
Clarify the form of its IPv4 addresses when listening on an unspecified address. (found while testing/reviewing CL 399454) Change-Id: I62b367f5a4e6d340eb72dd7ec342080f1821e63e Reviewed-on: https://go-review.googlesource.com/c/go/+/419614 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-07-26net: fix WriteMsgUDPAddrPort addr handlingdatabase64128
WriteMsgUDPAddrPort should accept IPv4 target addresses on IPv6 UDP sockets. An IPv4 target address will be converted to an IPv4-mapped IPv6 address. Fixes #52264. Change-Id: Ib9ed4c61fa1289ae7bbc8c4c9de1a9951b647ec0 GitHub-Last-Rev: 6776fdb0a76faa71ebde58f5143fb1ffb3112adf GitHub-Pull-Request: golang/go#52265 Reviewed-on: https://go-review.googlesource.com/c/go/+/399454 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>