From 6a51736366f51e3b1a21c9732078b61f0a8d44e4 Mon Sep 17 00:00:00 2001
From: Rob Pike
We have clarified this situation in the documentation included in the release.
-The Go compatibilty guidelines and the
+The Go compatibility guidelines and the
docs for the unsafe
package
are now explicit that unsafe code is not guaranteed to remain compatible.
+As of Go 1.3, the runtime crashes if it finds a memory word that should contain
+a valid pointer but instead contains an obviously invalid pointer (for example, the value 3).
+Programs that store integers in pointer values may run afoul of this check and crash.
+In Go 1.4, setting the GODEBUG
variable
+invalidptr=0
disables
+the crash as a workaround, but we cannot guarantee that future releases will be
+able to avoid the crash; the correct fix is to rewrite code not to alias integers and pointers.
+
+The language accepted by the assemblers cmd/5a
, cmd/6a
+and cmd/8a
has had several changes,
+mostly to make it easier to deliver type information to the runtime.
+
+First, the textflag.h
file that defines flags for TEXT
directives
+has been copied from the linker source directory to a standard location so it can be
+included with the simple directive
+
+#include "textflag.h" ++ +
+The more important changes are in how assembler source can define the necessary
+type information.
+For most programs it will suffice to move data
+definitions (DATA
and GLOBL
directives)
+out of assembly into Go files
+and to write a Go declaration for each assembly function.
+The assembly document describes what to do.
+
+Updating:
+Assembly files that include textflag.h
from its old
+location will still work, but should be updated.
+For the type information, most assembly routines will need no change,
+but all should be examined.
+Assembly source files that define data,
+functions with non-empty stack frames, or functions that return pointers
+need particular attention.
+A description of the necessary (but simple) changes
+is in the assembly document.
+
+More information about these changes is in the assembly document. +
+@@ -410,13 +465,6 @@ rebuild the standard library and commands, to avoid overwriting the installation -
-TODO cgo news -
- -TODO godoc news @@ -522,7 +570,6 @@ See the relevant package documentation for more information about each change. cmd/6l, liblink: use pc-relative addressing for all memory references, so that linking Go binaries at high addresses works (CL 125140043). This cuts the maximum size of a Go binary's text+data+bss from 4GB to 2GB. -asm: make textflag.h available outside of cmd/ld (CL 128050043) bufio: handling of empty tokens at EOF changed, may require scanner change (CL 145390043) compress/flate, compress/gzip, compress/zlib: Reset support (https://codereview.appspot.com/97140043) crypto/tls: add support for ALPN (RFC 7301) (CL 108710046) -- cgit v1.2.1