mirror of https://github.com/golang/go.git
chanrecv now expects a pointer to the data to be filled in. mapiterinit expects a pointer to the hash iterator to be filled in. In both cases, the temporary being pointed at changes from dead to alive during the call. In order to make sure it is preserved if a garbage collection happens after that transition but before the call returns, the temp must be marked as live during the entire call. But if it is live during the entire call, it needs to be safe for the garbage collector to scan at the beginning of the call, before the new data has been filled in. Therefore, it must be zeroed by the caller, before the call. Do that. My previous attempt waited to mark it live until after the call returned, but that's unsafe (see first paragraph); undo that change in plive.c. This makes powser2 pass again reliably. I looked at every call to temp in the compiler. The vast majority are followed immediately by an initialization of temp, so those are fine. The only ones that needed changing were the ones where the next operation is to pass the address of the temp to a function call, and there aren't too many. Maps are exempted from this because mapaccess returns a pointer to the data and lets the caller make the copy. Fixes many builds. TBR=khr CC=golang-codereviews https://golang.org/cl/80700046 |
||
|---|---|---|
| api | ||
| doc | ||
| include | ||
| lib | ||
| misc | ||
| src | ||
| test | ||
| .hgignore | ||
| .hgtags | ||
| AUTHORS | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README | ||
| favicon.ico | ||
| robots.txt | ||
README
This is the source code repository for the Go programming language.
For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install-source.html
in your web browser.
After installing Go, you can view a nicely formatted
doc/install-source.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install/source.
Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.
--
Binary Distribution Notes
If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README). You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
See doc/install.html for more details.