File tree 1 file changed +13
-0
lines changed 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,19 @@ <h3 id="cgo">Cgo</h3>
397
397
documentation</ a > for more information.
398
398
</ p >
399
399
400
+ < p > <!-- CL 250940 -->
401
+ In Go 1.15.3 and later, cgo will not permit Go code to allocate an
402
+ undefined struct type (a C struct defined as just < code > struct
403
+ S;</ code > or similar) on the stack or heap.
404
+ Go code will only be permitted to use pointers to those types.
405
+ Allocating an instance of such a struct and passing a pointer, or a
406
+ full struct value, to C code was always unsafe and unlikely to work
407
+ correctly; it is now forbidden.
408
+ The fix is to either rewrite the Go code to use only pointers, or to
409
+ ensure that the Go code sees the full definition of the struct by
410
+ including the appropriate C header file.
411
+ </ p >
412
+
400
413
< h3 id ="commonname "> X.509 CommonName deprecation</ h3 >
401
414
402
415
< p > <!-- CL 231379 -->
You can’t perform that action at this time.
0 commit comments