diff --git a/doc/go1.10.html b/doc/go1.10.html index a6e186fb73..4c0e847c05 100644 --- a/doc/go1.10.html +++ b/doc/go1.10.html @@ -30,6 +30,10 @@ adds caching of successful test results, runs vet automatically during tests, and permits passing string values directly between Go and C using cgo. +A new compiler option whitelist may cause +unexpected invalid +flag errors in code that built successfully with older +releases.

Changes to the language

@@ -261,6 +265,18 @@ and the test2json documentation.

Cgo

+

+Options specified by cgo using #cgo CFLAGS and the like +are now checked against a whitelist of permitted options. +This closes a security hole in which a downloaded package uses +compiler options like +-fplugin +to run arbitrary code on the machine where it is being built. +This can cause a build error such as invalid flag in #cgo CFLAGS. +For more background, and how to handle this error, see +https://golang.org/s/invalidflag. +

+

Cgo now implements a C typedef like “typedef X Y” using a Go type alias, so that Go code may use the types C.X and C.Y interchangeably.