aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2018-04-11 19:43:39 +1000
committerAlex Brainman <alex.brainman@gmail.com>2018-04-18 08:50:42 +0000
commit4869ec00e87ef49db2646c25d28d5c7e4f1caff8 (patch)
tree07b13c9f57b9eb4287d669b56193fbcfbc050517 /api
parent3042463d61a4a9165531aaf45833f1dcefb1e5f9 (diff)
downloadgo-4869ec00e87ef49db2646c25d28d5c7e4f1caff8.tar.gz
go-4869ec00e87ef49db2646c25d28d5c7e4f1caff8.zip
syscall: introduce Pointer type and use it instead of uintptr
Some syscall structures used by crypto/x509 have uintptr fields that store pointers. These pointers are set with a pointer to another Go structure. But the pointers are not visible by garbage collector, and GC does not update the fields after they were set. So when structure with invalid uintptr pointers passed to Windows, we get memory corruption. This CL introduces CertInfo, CertTrustListInfo and CertRevocationCrlInfo types. It uses pointers to new types instead of uintptr in CertContext, CertSimpleChain and CertRevocationInfo. CertRevocationInfo, CertChainPolicyPara and CertChainPolicyStatus types have uintptr field that can be pointer to many different things (according to Windows API). So this CL introduces Pointer type to be used for those cases. As suggested by Austin Clements. Fixes #21376 Updates #24820 Change-Id: If95cd9eee3c69e4cfc35b7b25b1b40c2dc8f0df7 Reviewed-on: https://go-review.googlesource.com/106275 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'api')
-rw-r--r--api/except.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/api/except.txt b/api/except.txt
index e5cb7b8edb..997df042b6 100644
--- a/api/except.txt
+++ b/api/except.txt
@@ -371,3 +371,15 @@ pkg text/template/parse, type VariableNode struct
pkg text/template/parse, type VariableNode struct, Ident []string
pkg text/template/parse, type VariableNode struct, embedded NodeType
pkg text/template/parse, type VariableNode struct, embedded Pos
+pkg syscall (windows-386), type CertChainPolicyPara struct, ExtraPolicyPara uintptr
+pkg syscall (windows-386), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr
+pkg syscall (windows-386), type CertContext struct, CertInfo uintptr
+pkg syscall (windows-386), type CertRevocationInfo struct, CrlInfo uintptr
+pkg syscall (windows-386), type CertRevocationInfo struct, OidSpecificInfo uintptr
+pkg syscall (windows-386), type CertSimpleChain struct, TrustListInfo uintptr
+pkg syscall (windows-amd64), type CertChainPolicyPara struct, ExtraPolicyPara uintptr
+pkg syscall (windows-amd64), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr
+pkg syscall (windows-amd64), type CertContext struct, CertInfo uintptr
+pkg syscall (windows-amd64), type CertRevocationInfo struct, CrlInfo uintptr
+pkg syscall (windows-amd64), type CertRevocationInfo struct, OidSpecificInfo uintptr
+pkg syscall (windows-amd64), type CertSimpleChain struct, TrustListInfo uintptr