From 6a51736366f51e3b1a21c9732078b61f0a8d44e4 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 28 Oct 2014 20:12:17 -0700 Subject: doc/go1.4.html: GODEBUG and assembler changes LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/160660046 --- doc/go1.4.html | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/go1.4.html b/doc/go1.4.html index c5a918adc..7e670c47c 100644 --- a/doc/go1.4.html +++ b/doc/go1.4.html @@ -157,7 +157,7 @@ for code that does unsafe things.

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.

@@ -223,6 +223,61 @@ so the effect is minimal, but programs that store integers (for example) in interfaces will see more allocations.

+

+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. +

+ +

Assembly

+ +

+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. +

+

Status of gccgo

@@ -410,13 +465,6 @@ rebuild the standard library and commands, to avoid overwriting the installation -

Changes to cgo

- -

-TODO cgo news -

- -

Changes to godoc

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