commit | fd45e267c2f6ce7c6a88842e3ad94d3469223e42 | [log] [tgz] |
---|---|---|
author | Matthew Dempsky <mdempsky@google.com> | Thu Aug 05 13:05:23 2021 -0700 |
committer | Matthew Dempsky <mdempsky@google.com> | Thu Aug 05 20:22:31 2021 +0000 |
tree | 0f721bdeb6a04dacbe298e6726c8bd09fe5af16d | |
parent | 6e738868a7a943d7d4fd6bb1963e7f6d78111726 [diff] |
runtime: warn that KeepAlive is not an unsafe.Pointer workaround Even experienced users occasionally mistake that runtime.KeepAlive can be used as a workaround for following the unsafe.Pointer safety rules, but it cannot. Add an explicit warning to this effect to dissuade users from trying to use it as such. Fixes #47562. Change-Id: I842e33a3e1c080933c6b1bd1b6318448adbf495c Reviewed-on: https://go-review.googlesource.com/c/go/+/340269 Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.html.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.