From c622ec556b0798d5696ec97a5e180c035dea392b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 14 Feb 2018 18:04:54 -0800 Subject: [PATCH] [release-branch.go1.10] doc: add note about invalid flag errors to 1.10 release notes Updates #23672 Updates #23749 Change-Id: I85b6493bd1e4095398508b7ef395c35463dfbde1 Reviewed-on: https://go-review.googlesource.com/94158 Reviewed-by: Brad Fitzpatrick Reviewed-by: Andrew Bonventre (cherry picked from commit f2354d0aacdd5ce1952c5441c6a489378ccb7656) Reviewed-on: https://go-review.googlesource.com/94655 --- doc/go1.10.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. -- 2.50.0