From: Rob Pike Date: Wed, 29 Oct 2014 03:12:17 +0000 (-0700) Subject: doc/go1.4.html: GODEBUG and assembler changes X-Git-Tag: go1.4beta1~16 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ce7c8fe0fd171bb09296c3dd4d8ca419e28ac5d0;p=gostls13.git doc/go1.4.html: GODEBUG and assembler changes LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://golang.org/cl/160660046 --- diff --git a/doc/go1.4.html b/doc/go1.4.html index c5a918adcd..7e670c47cb 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)