aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-11-20 15:55:02 -0800
committerIan Lance Taylor <iant@golang.org>2018-11-29 19:18:12 +0000
commitfbdaa965634be842647195ee2d610dc363c760d2 (patch)
treebe9382231ecf2a7d6686ce2fac0a14f379820dca /src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA
parent81a5c9c306a35a297c86d72c9729a16f69acec21 (diff)
downloadgo-fbdaa965634be842647195ee2d610dc363c760d2.tar.xz
cmd/cgo: use field alignment when setting field offset
The old code ignored the field alignment, and only looked at the field offset: if the field offset required padding, cgo added padding. But while that approach works for Go (at least with the gc toolchain) it doesn't work for C code using packed structs. With a packed struct the added padding may leave the struct at a misaligned position, and the inserted alignment, which cgo is not considering, may introduce additional, unexpected, padding. Padding that ignores alignment is not a good idea when the struct is not packed, and Go structs are never packed. So don't ignore alignment. Fixes #28896 Change-Id: Ie50ea15fa6dc35557497097be9fecfecb11efd8a Reviewed-on: https://go-review.googlesource.com/c/150602 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA')
0 files changed, 0 insertions, 0 deletions