From: Ian Lance Taylor
Date: Sat, 12 Dec 2020 03:10:00 +0000 (-0800)
Subject: doc/go1.15: mention 1.15.3 cgo restriction on empty structs
X-Git-Tag: go1.16beta1~10
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=129bb1917b4914f0743ec9b4ef0dfb74df39c07d;p=gostls13.git
doc/go1.15: mention 1.15.3 cgo restriction on empty structs
For #40954
Change-Id: I6a30aed31a16e820817f4ca5c7f591222e922946
Reviewed-on: https://go-review.googlesource.com/c/go/+/277432
Trust: Ian Lance Taylor
Reviewed-by: Keith Randall
---
diff --git a/doc/go1.15.html b/doc/go1.15.html
index c691bf3bd5..c9997c0ca3 100644
--- a/doc/go1.15.html
+++ b/doc/go1.15.html
@@ -397,6 +397,19 @@ Do not send CLs removing the interior tags from such phrases.
documentation for more information.
+
+ In Go 1.15.3 and later, cgo will not permit Go code to allocate an
+ undefined struct type (a C struct defined as just struct
+ S;
or similar) on the stack or heap.
+ Go code will only be permitted to use pointers to those types.
+ Allocating an instance of such a struct and passing a pointer, or a
+ full struct value, to C code was always unsafe and unlikely to work
+ correctly; it is now forbidden.
+ The fix is to either rewrite the Go code to use only pointers, or to
+ ensure that the Go code sees the full definition of the struct by
+ including the appropriate C header file.
+
+
X.509 CommonName deprecation