mirror of
https://github.com/golang/go.git
synced 2026-02-02 17:05:05 +03:00
Compare commits
81 Commits
dev.boring
...
go1.18.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ed0e51b5e | ||
|
|
020fc47501 | ||
|
|
b2b4b9e015 | ||
|
|
45568433ed | ||
|
|
6fabc53cae | ||
|
|
2375a6882e | ||
|
|
4f4542479d | ||
|
|
13bda0ebfb | ||
|
|
0287895996 | ||
|
|
c0599c5b78 | ||
|
|
2d6881b91a | ||
|
|
f4f19990c6 | ||
|
|
1fb46d2a20 | ||
|
|
9247bdddba | ||
|
|
500d75a555 | ||
|
|
66432dadb1 | ||
|
|
3e79a84853 | ||
|
|
a286c7dd79 | ||
|
|
c6688b58ea | ||
|
|
94274d0ffd | ||
|
|
24fcbb9808 | ||
|
|
0b0d2fe66d | ||
|
|
84264fceca | ||
|
|
9535031e32 | ||
|
|
2097b2d51b | ||
|
|
c9b9a010eb | ||
|
|
f92bfa440f | ||
|
|
abb3f05524 | ||
|
|
c6ba470316 | ||
|
|
30d9077a34 | ||
|
|
6412231192 | ||
|
|
0bf8319883 | ||
|
|
78b8b4a176 | ||
|
|
6ebf676289 | ||
|
|
69bc821a01 | ||
|
|
c258e9d07d | ||
|
|
d17c5731ba | ||
|
|
f4d55662d6 | ||
|
|
290883a559 | ||
|
|
39a8c8cf2e | ||
|
|
9d738480d2 | ||
|
|
32ff9b5de6 | ||
|
|
8b0583a054 | ||
|
|
677c6fe94c | ||
|
|
4aa1efed48 | ||
|
|
428533fab4 | ||
|
|
4b9b25a21d | ||
|
|
d69d093c77 | ||
|
|
c79ccd88ab | ||
|
|
8706c09622 | ||
|
|
2c6a889234 | ||
|
|
1edc1ccf15 | ||
|
|
a0c7e2620a | ||
|
|
c6b5b7e6e5 | ||
|
|
36d32da19f | ||
|
|
1e4dc06f1a | ||
|
|
d10b8192c0 | ||
|
|
bf366ef711 | ||
|
|
92644ff54a | ||
|
|
673d52b33a | ||
|
|
e3f9a4f2ae | ||
|
|
c827ddf9e5 | ||
|
|
aeced24498 | ||
|
|
f913f9dd1a | ||
|
|
a54f962c29 | ||
|
|
7f9a85f2d9 | ||
|
|
520f0d0401 | ||
|
|
0b38b0277e | ||
|
|
40f6480db6 | ||
|
|
839c0f3b3e | ||
|
|
ce427cf961 | ||
|
|
79cf7c839b | ||
|
|
9f40b4f7a4 | ||
|
|
9f5e2849e1 | ||
|
|
77a142486e | ||
|
|
fd5b9b7c07 | ||
|
|
6206d65235 | ||
|
|
9f2f0ee6ce | ||
|
|
cb5a598d7f | ||
|
|
e70ee95914 | ||
|
|
39d2f50919 |
7
AUTHORS
7
AUTHORS
@@ -202,7 +202,7 @@ Ben Burkert <ben@benburkert.com>
|
||||
Ben Haines <bhainesva@gmail.com>
|
||||
Ben Lubar <ben.lubar@gmail.com>
|
||||
Ben Olive <sionide21@gmail.com>
|
||||
Ben Shi <powerman1st@163.com> <ben.shi@streamcomputing.com>
|
||||
Ben Shi <powerman1st@163.com>
|
||||
Benjamin Black <b@b3k.us>
|
||||
Benjamin Cable <cable.benjamin@gmail.com>
|
||||
Benjamin Hsieh <tanookiben@users.noreply.github.com>
|
||||
@@ -263,7 +263,6 @@ Casey Callendrello <squeed@gmail.com>
|
||||
Casey Marshall <casey.marshall@gmail.com>
|
||||
Cezar Sá Espinola <cezarsa@gmail.com>
|
||||
ChaiShushan <chaishushan@gmail.com>
|
||||
Changkun Ou <hi@changkun.de> <hi@changkun.us>
|
||||
Chaoqun Han <hanssccv@gmail.com>
|
||||
Charles Fenwick Elliott <Charles@FenwickElliott.io>
|
||||
Charles L. Dorian <cldorian@gmail.com>
|
||||
@@ -570,7 +569,6 @@ Hootsuite Inc.
|
||||
Hsin-Ho Yeh <yhh92u@gmail.com>
|
||||
Hu Keping <hukeping@huawei.com>
|
||||
Hugues Bruant <hugues.bruant@gmail.com>
|
||||
HyperConnect Inc.
|
||||
Ian Gudger <ian@loosescre.ws>
|
||||
Ian Kent <iankent85@gmail.com>
|
||||
IBM
|
||||
@@ -829,7 +827,6 @@ Liberty Fund Inc
|
||||
Linaro Limited
|
||||
Lion Yang <lion@aosc.xyz>
|
||||
Lloyd Dewolf <foolswisdom@gmail.com>
|
||||
Loongson Technology Corporation Limited
|
||||
Lorenzo Masini <rugginoso@develer.com>
|
||||
Lorenzo Stoakes <lstoakes@gmail.com>
|
||||
Luan Santos <cfcluan@gmail.com>
|
||||
@@ -1149,7 +1146,6 @@ Piers <google@hellopiers.pro>
|
||||
Pieter Droogendijk <pieter@binky.org.uk>
|
||||
Pietro Gagliardi <pietro10@mac.com>
|
||||
Piyush Mishra <piyush@codeitout.com>
|
||||
PlanetScale, Inc.
|
||||
Platform.sh
|
||||
Pontus Leitzler <leitzler@gmail.com>
|
||||
Prasanga Siripala <pj@pjebs.com.au>
|
||||
@@ -1435,7 +1431,6 @@ Wei Guangjing <vcc.163@gmail.com>
|
||||
Weichao Tang <tevic.tt@gmail.com>
|
||||
Weixie Cui <cuiweixie@gmail.com> <523516579@qq.com>
|
||||
Wembley G. Leach, Jr <wembley.gl@gmail.com>
|
||||
Wen Yang <yangwen.yw@gmail.com>
|
||||
Will Faught <will.faught@gmail.com>
|
||||
Will Storey <will@summercat.com>
|
||||
Willem van der Schyff <willemvds@gmail.com>
|
||||
|
||||
@@ -365,7 +365,7 @@ Ben Lubar <ben.lubar@gmail.com>
|
||||
Ben Lynn <benlynn@gmail.com>
|
||||
Ben Olive <sionide21@gmail.com>
|
||||
Ben Schwartz <bemasc@google.com>
|
||||
Ben Shi <powerman1st@163.com> <ben.shi@streamcomputing.com>
|
||||
Ben Shi <powerman1st@163.com>
|
||||
Ben Toews <mastahyeti@gmail.com>
|
||||
Benjamin Barenblat <bbaren@google.com>
|
||||
Benjamin Black <b@b3k.us>
|
||||
@@ -451,7 +451,6 @@ Bryan Ford <brynosaurus@gmail.com>
|
||||
Bryan Heden <b.heden@gmail.com>
|
||||
Bulat Gaifullin <gaifullinbf@gmail.com>
|
||||
Burak Guven <bguven@gmail.com>
|
||||
Byoungchan Lee <daniel.l@hpcnt.com>
|
||||
Caine Tighe <arctanofyourface@gmail.com>
|
||||
Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
|
||||
Caleb Martinez <accounts@calebmartinez.com>
|
||||
@@ -487,7 +486,7 @@ Cedric Staub <cs@squareup.com>
|
||||
Cezar Sá Espinola <cezarsa@gmail.com>
|
||||
Chad Rosier <mrosier.qdt@qualcommdatacenter.com>
|
||||
ChaiShushan <chaishushan@gmail.com>
|
||||
Changkun Ou <hi@changkun.de> <hi@changkun.us>
|
||||
Changkun Ou <hi@changkun.us>
|
||||
Channing Kimble-Brown <channing@golang.org>
|
||||
Chao Xu <xuchao@google.com>
|
||||
Chaoqun Han <hanssccv@gmail.com>
|
||||
@@ -1792,7 +1791,7 @@ Matt Jibson <matt.jibson@gmail.com>
|
||||
Matt Joiner <anacrolix@gmail.com>
|
||||
Matt Jones <mrjones@google.com>
|
||||
Matt Juran <thepciet@gmail.com>
|
||||
Matt Layher <mdlayher@gmail.com> <mdlayher@planetscale.com>
|
||||
Matt Layher <mdlayher@gmail.com>
|
||||
Matt Masurka <masurka@google.com>
|
||||
Matt Pearring <broskies@google.com>
|
||||
Matt Reiferson <mreiferson@gmail.com>
|
||||
@@ -2746,7 +2745,6 @@ Weichao Tang <tevic.tt@gmail.com>
|
||||
Weilu Jia <optix2000@gmail.com>
|
||||
Weixie Cui <cuiweixie@gmail.com> <523516579@qq.com>
|
||||
Wembley G. Leach, Jr <wembley.gl@gmail.com>
|
||||
Wen Yang <yangwen.yw@gmail.com>
|
||||
Wenlei (Frank) He <wlhe@google.com>
|
||||
Wenzel Lowe <lowewenzel@gmail.com>
|
||||
Wil Selwood <wselwood@gmail.com>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# dev.boringcrypto branch
|
||||
|
||||
This branch is no more. `GOEXPERIMENT=boringcrypto` on the standard branch does the job now.
|
||||
|
||||
Previous notice:
|
||||
|
||||
We have been working inside Google on a fork of Go that uses
|
||||
BoringCrypto (the core of [BoringSSL][]) for various crypto
|
||||
primitives, in furtherance of some [work related to FIPS 140-2][sp].
|
||||
We have heard that some external users of Go would be interested in
|
||||
this code as well, so this branch holds the patches to make Go use
|
||||
BoringCrypto.
|
||||
|
||||
[BoringSSL]: https://boringssl.googlesource.com/boringssl/
|
||||
[sp]: https://csrc.nist.gov/CSRC/media/projects/cryptographic-module-validation-program/documents/security-policies/140sp3678.pdf
|
||||
|
||||
Unlike typical dev branches, we do not intend any eventual merge of
|
||||
this code into the master branch. Instead we intend to maintain in
|
||||
this branch the latest release plus BoringCrypto patches.
|
||||
|
||||
To be clear, we are not making any statements or representations about
|
||||
the suitability of this code in relation to the FIPS 140-2 standard.
|
||||
Interested users will have to evaluate for themselves whether the code
|
||||
is useful for their own purposes.
|
||||
10
README.md
10
README.md
@@ -16,26 +16,26 @@ BSD-style license found in the LICENSE file.
|
||||
|
||||
#### Binary Distributions
|
||||
|
||||
Official binary distributions are available at https://go.dev/dl/.
|
||||
Official binary distributions are available at https://golang.org/dl/.
|
||||
|
||||
After downloading a binary release, visit https://go.dev/doc/install
|
||||
After downloading a binary release, visit https://golang.org/doc/install
|
||||
for installation instructions.
|
||||
|
||||
#### Install From Source
|
||||
|
||||
If a binary distribution is not available for your combination of
|
||||
operating system and architecture, visit
|
||||
https://go.dev/doc/install/source
|
||||
https://golang.org/doc/install/source
|
||||
for source installation instructions.
|
||||
|
||||
### Contributing
|
||||
|
||||
Go is the work of thousands of contributors. We appreciate your help!
|
||||
|
||||
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
|
||||
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.
|
||||
|
||||
Note that the Go project uses the issue tracker for bug reports and
|
||||
proposals only. See https://go.dev/wiki/Questions for a list of
|
||||
proposals only. See https://golang.org/wiki/Questions for a list of
|
||||
places to ask questions about the Go language.
|
||||
|
||||
[rf]: https://reneefrench.blogspot.com/
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We support the past two Go releases (for example, Go 1.17.x and Go 1.18.x when Go 1.18.x is the latest stable release).
|
||||
We support the past two Go releases (for example, Go 1.12.x and Go 1.13.x).
|
||||
|
||||
See https://go.dev/wiki/Go-Release-Cycle and in particular the
|
||||
[Release Maintenance](https://go.dev/wiki/Go-Release-Cycle#release-maintenance)
|
||||
See https://golang.org/wiki/Go-Release-Cycle and in particular the
|
||||
[Release Maintenance](https://github.com/golang/go/wiki/Go-Release-Cycle#release-maintenance)
|
||||
part of that page.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
See https://go.dev/security for how to report a vulnerability.
|
||||
See https://golang.org/security for how to report a vulnerability.
|
||||
|
||||
16
api/README
16
api/README
@@ -8,16 +8,6 @@ shipped. Each file adds new lines but does not remove any.
|
||||
except.txt lists features that may disappear without breaking true
|
||||
compatibility.
|
||||
|
||||
Starting with go1.19.txt, each API feature line must end in "#nnnnn"
|
||||
giving the GitHub issue number of the proposal issue that accepted
|
||||
the new API. This helps with our end-of-cycle audit of new APIs.
|
||||
The same requirement applies to next/* (described below), which will
|
||||
become a go1.XX.txt for XX >= 19.
|
||||
|
||||
The next/ directory contains the only files intended to be mutated.
|
||||
Each file in that directory contains a list of features that may be added
|
||||
to the next release of Go. The files in this directory only affect the
|
||||
warning output from the go api tool. Each file should be named
|
||||
nnnnn.txt, after the issue number for the accepted proposal.
|
||||
(The #nnnnn suffix must also appear at the end of each line in the file;
|
||||
that will be preserved when next/*.txt is concatenated into go1.XX.txt.)
|
||||
next.txt is the only file intended to be mutated. It's a list of
|
||||
features that may be added to the next version. It only affects
|
||||
warning output from the go api tool.
|
||||
|
||||
@@ -505,5 +505,3 @@ pkg unicode, const Version = "6.3.0"
|
||||
pkg unicode, const Version = "7.0.0"
|
||||
pkg unicode, const Version = "8.0.0"
|
||||
pkg unicode, const Version = "9.0.0"
|
||||
pkg html/template, method (*Template) Funcs(FuncMap) *Template
|
||||
pkg html/template, type FuncMap map[string]interface{}
|
||||
|
||||
@@ -371,7 +371,7 @@ pkg debug/elf, const ELFCLASSNONE = 0
|
||||
pkg debug/elf, const ELFDATA2LSB = 1
|
||||
pkg debug/elf, const ELFDATA2MSB = 2
|
||||
pkg debug/elf, const ELFDATANONE = 0
|
||||
pkg debug/elf, const ELFMAG = "\x7fELF"
|
||||
pkg debug/elf, const ELFMAG = "\u007fELF"
|
||||
pkg debug/elf, const ELFOSABI_86OPEN = 5
|
||||
pkg debug/elf, const ELFOSABI_AIX = 7
|
||||
pkg debug/elf, const ELFOSABI_ARM = 97
|
||||
|
||||
0
api/next.txt
Normal file
0
api/next.txt
Normal file
@@ -1,3 +0,0 @@
|
||||
pkg net/http, type MaxBytesError struct #30715
|
||||
pkg net/http, type MaxBytesError struct, Limit int64 #30715
|
||||
pkg net/http, method (*MaxBytesError) Error() string #30715
|
||||
@@ -1 +0,0 @@
|
||||
pkg crypto/x509, method (*CertPool) Clone() *CertPool #35044
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg hash/maphash, func Bytes(Seed, []uint8) uint64 #42710
|
||||
pkg hash/maphash, func String(Seed, string) uint64 #42710
|
||||
@@ -1 +0,0 @@
|
||||
pkg encoding/xml, method (*Decoder) InputPos() (int, int) #45628
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg flag, func TextVar(encoding.TextUnmarshaler, string, encoding.TextMarshaler, string) #45754
|
||||
pkg flag, method (*FlagSet) TextVar(encoding.TextUnmarshaler, string, encoding.TextMarshaler, string) #45754
|
||||
@@ -1 +0,0 @@
|
||||
pkg crypto/x509, method (*CertPool) Equal(*CertPool) bool #46057
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg net/url, type URL struct, OmitHost bool #46059
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg html/template, method (*Template) Funcs(template.FuncMap) *Template #46121
|
||||
pkg html/template, type FuncMap = template.FuncMap #46121
|
||||
@@ -1,105 +0,0 @@
|
||||
pkg debug/elf, const EM_LOONGARCH = 258 #46229
|
||||
pkg debug/elf, const EM_LOONGARCH Machine #46229
|
||||
pkg debug/elf, const R_LARCH_32 = 1 #46229
|
||||
pkg debug/elf, const R_LARCH_32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_64 = 2 #46229
|
||||
pkg debug/elf, const R_LARCH_64 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_ADD16 = 48 #46229
|
||||
pkg debug/elf, const R_LARCH_ADD16 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_ADD24 = 49 #46229
|
||||
pkg debug/elf, const R_LARCH_ADD24 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_ADD32 = 50 #46229
|
||||
pkg debug/elf, const R_LARCH_ADD32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_ADD64 = 51 #46229
|
||||
pkg debug/elf, const R_LARCH_ADD64 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_ADD8 = 47 #46229
|
||||
pkg debug/elf, const R_LARCH_ADD8 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_COPY = 4 #46229
|
||||
pkg debug/elf, const R_LARCH_COPY R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_IRELATIVE = 12 #46229
|
||||
pkg debug/elf, const R_LARCH_IRELATIVE R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_JUMP_SLOT = 5 #46229
|
||||
pkg debug/elf, const R_LARCH_JUMP_SLOT R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_MARK_LA = 20 #46229
|
||||
pkg debug/elf, const R_LARCH_MARK_LA R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_MARK_PCREL = 21 #46229
|
||||
pkg debug/elf, const R_LARCH_MARK_PCREL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_NONE = 0 #46229
|
||||
pkg debug/elf, const R_LARCH_NONE R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_RELATIVE = 3 #46229
|
||||
pkg debug/elf, const R_LARCH_RELATIVE R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_ADD = 35 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_ADD R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_AND = 36 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_AND R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_ASSERT = 30 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_ASSERT R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_IF_ELSE = 37 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_IF_ELSE R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_NOT = 31 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_NOT R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_0_10_10_16_S2 = 45 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_0_10_10_16_S2 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_0_5_10_16_S2 = 44 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_0_5_10_16_S2 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_12 = 40 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_12 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_16 = 41 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_16 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_16_S2 = 42 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_16_S2 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_5 = 38 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_10_5 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_5_20 = 43 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_S_5_20 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_U = 46 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_U R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_U_10_12 = 39 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_POP_32_U_10_12 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_ABSOLUTE = 23 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_ABSOLUTE R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_DUP = 24 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_DUP R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_GPREL = 25 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_GPREL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_PCREL = 22 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_PCREL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_PLT_PCREL = 29 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_PLT_PCREL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_GD = 28 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_GD R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_GOT = 27 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_GOT R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_TPREL = 26 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_PUSH_TLS_TPREL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SL = 33 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SL R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SR = 34 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SR R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SUB = 32 #46229
|
||||
pkg debug/elf, const R_LARCH_SOP_SUB R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SUB16 = 53 #46229
|
||||
pkg debug/elf, const R_LARCH_SUB16 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SUB24 = 54 #46229
|
||||
pkg debug/elf, const R_LARCH_SUB24 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SUB32 = 55 #46229
|
||||
pkg debug/elf, const R_LARCH_SUB32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SUB64 = 56 #46229
|
||||
pkg debug/elf, const R_LARCH_SUB64 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_SUB8 = 52 #46229
|
||||
pkg debug/elf, const R_LARCH_SUB8 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPMOD32 = 6 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPMOD32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPMOD64 = 7 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPMOD64 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPREL32 = 8 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPREL32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPREL64 = 9 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_DTPREL64 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_TPREL32 = 10 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_TPREL32 R_LARCH #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_TPREL64 = 11 #46229
|
||||
pkg debug/elf, const R_LARCH_TLS_TPREL64 R_LARCH #46229
|
||||
pkg debug/elf, method (R_LARCH) GoString() string #46229
|
||||
pkg debug/elf, method (R_LARCH) String() string #46229
|
||||
pkg debug/elf, type R_LARCH int #46229
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg net/url, func JoinPath(string, ...string) (string, error) #47005
|
||||
pkg net/url, method (*URL) JoinPath(...string) *URL #47005
|
||||
@@ -1 +0,0 @@
|
||||
pkg sort, func Find(int, func(int) int) (int, bool) #50340
|
||||
@@ -1 +0,0 @@
|
||||
pkg os/exec, method (*Cmd) Environ() []string #50599
|
||||
@@ -1,5 +0,0 @@
|
||||
pkg encoding/binary, type AppendByteOrder interface { AppendUint16, AppendUint32, AppendUint64, String } #50601
|
||||
pkg encoding/binary, type AppendByteOrder interface, AppendUint16([]uint8, uint16) []uint8 #50601
|
||||
pkg encoding/binary, type AppendByteOrder interface, AppendUint32([]uint8, uint32) []uint8 #50601
|
||||
pkg encoding/binary, type AppendByteOrder interface, AppendUint64([]uint8, uint64) []uint8 #50601
|
||||
pkg encoding/binary, type AppendByteOrder interface, String() string #50601
|
||||
@@ -1,9 +0,0 @@
|
||||
pkg crypto/x509, func ParseRevocationList([]uint8) (*RevocationList, error) #50674
|
||||
pkg crypto/x509, method (*RevocationList) CheckSignatureFrom(*Certificate) error #50674
|
||||
pkg crypto/x509, type RevocationList struct, AuthorityKeyId []uint8 #50674
|
||||
pkg crypto/x509, type RevocationList struct, Extensions []pkix.Extension #50674
|
||||
pkg crypto/x509, type RevocationList struct, Issuer pkix.Name #50674
|
||||
pkg crypto/x509, type RevocationList struct, Raw []uint8 #50674
|
||||
pkg crypto/x509, type RevocationList struct, RawIssuer []uint8 #50674
|
||||
pkg crypto/x509, type RevocationList struct, RawTBSRevocationList []uint8 #50674
|
||||
pkg crypto/x509, type RevocationList struct, Signature []uint8 #50674
|
||||
@@ -1,61 +0,0 @@
|
||||
pkg go/doc, method (*Package) HTML(string) []uint8 #51082
|
||||
pkg go/doc, method (*Package) Markdown(string) []uint8 #51082
|
||||
pkg go/doc, method (*Package) Parser() *comment.Parser #51082
|
||||
pkg go/doc, method (*Package) Printer() *comment.Printer #51082
|
||||
pkg go/doc, method (*Package) Synopsis(string) string #51082
|
||||
pkg go/doc, method (*Package) Text(string) []uint8 #51082
|
||||
pkg go/doc/comment, func DefaultLookupPackage(string) (string, bool) #51082
|
||||
pkg go/doc/comment, method (*DocLink) DefaultURL(string) string #51082
|
||||
pkg go/doc/comment, method (*Heading) DefaultID() string #51082
|
||||
pkg go/doc/comment, method (*List) BlankBefore() bool #51082
|
||||
pkg go/doc/comment, method (*List) BlankBetween() bool #51082
|
||||
pkg go/doc/comment, method (*Parser) Parse(string) *Doc #51082
|
||||
pkg go/doc/comment, method (*Printer) Comment(*Doc) []uint8 #51082
|
||||
pkg go/doc/comment, method (*Printer) HTML(*Doc) []uint8 #51082
|
||||
pkg go/doc/comment, method (*Printer) Markdown(*Doc) []uint8 #51082
|
||||
pkg go/doc/comment, method (*Printer) Text(*Doc) []uint8 #51082
|
||||
pkg go/doc/comment, type Block interface, unexported methods #51082
|
||||
pkg go/doc/comment, type Code struct #51082
|
||||
pkg go/doc/comment, type Code struct, Text string #51082
|
||||
pkg go/doc/comment, type Doc struct #51082
|
||||
pkg go/doc/comment, type Doc struct, Content []Block #51082
|
||||
pkg go/doc/comment, type Doc struct, Links []*LinkDef #51082
|
||||
pkg go/doc/comment, type DocLink struct #51082
|
||||
pkg go/doc/comment, type DocLink struct, ImportPath string #51082
|
||||
pkg go/doc/comment, type DocLink struct, Name string #51082
|
||||
pkg go/doc/comment, type DocLink struct, Recv string #51082
|
||||
pkg go/doc/comment, type DocLink struct, Text []Text #51082
|
||||
pkg go/doc/comment, type Heading struct #51082
|
||||
pkg go/doc/comment, type Heading struct, Text []Text #51082
|
||||
pkg go/doc/comment, type Italic string #51082
|
||||
pkg go/doc/comment, type Link struct #51082
|
||||
pkg go/doc/comment, type Link struct, Auto bool #51082
|
||||
pkg go/doc/comment, type Link struct, Text []Text #51082
|
||||
pkg go/doc/comment, type Link struct, URL string #51082
|
||||
pkg go/doc/comment, type LinkDef struct #51082
|
||||
pkg go/doc/comment, type LinkDef struct, Text string #51082
|
||||
pkg go/doc/comment, type LinkDef struct, URL string #51082
|
||||
pkg go/doc/comment, type LinkDef struct, Used bool #51082
|
||||
pkg go/doc/comment, type List struct #51082
|
||||
pkg go/doc/comment, type List struct, ForceBlankBefore bool #51082
|
||||
pkg go/doc/comment, type List struct, ForceBlankBetween bool #51082
|
||||
pkg go/doc/comment, type List struct, Items []*ListItem #51082
|
||||
pkg go/doc/comment, type ListItem struct #51082
|
||||
pkg go/doc/comment, type ListItem struct, Content []Block #51082
|
||||
pkg go/doc/comment, type ListItem struct, Number string #51082
|
||||
pkg go/doc/comment, type Paragraph struct #51082
|
||||
pkg go/doc/comment, type Paragraph struct, Text []Text #51082
|
||||
pkg go/doc/comment, type Parser struct #51082
|
||||
pkg go/doc/comment, type Parser struct, LookupPackage func(string) (string, bool) #51082
|
||||
pkg go/doc/comment, type Parser struct, LookupSym func(string, string) bool #51082
|
||||
pkg go/doc/comment, type Parser struct, Words map[string]string #51082
|
||||
pkg go/doc/comment, type Plain string #51082
|
||||
pkg go/doc/comment, type Printer struct #51082
|
||||
pkg go/doc/comment, type Printer struct, DocLinkBaseURL string #51082
|
||||
pkg go/doc/comment, type Printer struct, DocLinkURL func(*DocLink) string #51082
|
||||
pkg go/doc/comment, type Printer struct, HeadingID func(*Heading) string #51082
|
||||
pkg go/doc/comment, type Printer struct, HeadingLevel int #51082
|
||||
pkg go/doc/comment, type Printer struct, TextCodePrefix string #51082
|
||||
pkg go/doc/comment, type Printer struct, TextPrefix string #51082
|
||||
pkg go/doc/comment, type Printer struct, TextWidth int #51082
|
||||
pkg go/doc/comment, type Text interface, unexported methods #51082
|
||||
@@ -1 +0,0 @@
|
||||
pkg time, method (Duration) Abs() Duration #51414
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg encoding/binary, func AppendUvarint([]uint8, uint64) []uint8 #51644
|
||||
pkg encoding/binary, func AppendVarint([]uint8, int64) []uint8 #51644
|
||||
@@ -1,2 +0,0 @@
|
||||
pkg regexp/syntax, const ErrNestingDepth = "expression nests too deeply" #51684
|
||||
pkg regexp/syntax, const ErrNestingDepth ErrorCode #51684
|
||||
@@ -1,36 +0,0 @@
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_ANY = 2 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_ANY ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_ASSOCIATIVE ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_EXACT_MATCH = 4 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_EXACT_MATCH ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_LARGEST = 6 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_LARGEST ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_NODUPLICATES = 1 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_NODUPLICATES ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_SAME_SIZE = 3 #51686
|
||||
pkg debug/pe, const IMAGE_COMDAT_SELECT_SAME_SIZE ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_CODE = 32 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_CODE ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_INITIALIZED_DATA = 64 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_INITIALIZED_DATA ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_UNINITIALIZED_DATA = 128 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_CNT_UNINITIALIZED_DATA ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_LNK_COMDAT = 4096 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_LNK_COMDAT ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_DISCARDABLE = 33554432 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_DISCARDABLE ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_EXECUTE = 536870912 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_EXECUTE ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_READ = 1073741824 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_READ ideal-int #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_WRITE = 2147483648 #51686
|
||||
pkg debug/pe, const IMAGE_SCN_MEM_WRITE ideal-int #51686
|
||||
pkg debug/pe, method (*File) COFFSymbolReadSectionDefAux(int) (*COFFSymbolAuxFormat5, error) #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, Checksum uint32 #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, NumLineNumbers uint16 #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, NumRelocs uint16 #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, SecNum uint16 #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, Selection uint8 #51686
|
||||
pkg debug/pe, type COFFSymbolAuxFormat5 struct, Size uint32 #51686
|
||||
@@ -1,2 +1,2 @@
|
||||
branch: dev.boringcrypto
|
||||
branch: release-branch.go1.18
|
||||
parent-branch: master
|
||||
|
||||
1338
doc/go1.18.html
Normal file
1338
doc/go1.18.html
Normal file
File diff suppressed because it is too large
Load Diff
179
doc/go1.19.html
179
doc/go1.19.html
@@ -1,179 +0,0 @@
|
||||
<!--{
|
||||
"Title": "Go 1.19 Release Notes",
|
||||
"Path": "/doc/go1.19"
|
||||
}-->
|
||||
<!--
|
||||
NOTE: In this document and others in this directory, the convention is to
|
||||
set fixed-width phrases with non-fixed-width spaces, as in
|
||||
<code>hello</code> <code>world</code>.
|
||||
Do not send CLs removing the interior tags from such phrases.
|
||||
-->
|
||||
<style>
|
||||
main ul li { margin: 0.5em 0; }
|
||||
</style>
|
||||
<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.19</h2>
|
||||
<p>
|
||||
<strong>
|
||||
Go 1.19 is not yet released. These are work-in-progress
|
||||
release notes. Go 1.19 is expected to be released in August 2022.
|
||||
</strong>
|
||||
</p>
|
||||
<h2 id="language">Changes to the language</h2>
|
||||
<p>
|
||||
TODO: complete this section
|
||||
</p>
|
||||
<h2 id="ports">Ports</h2>
|
||||
<p>
|
||||
TODO: complete this section, or delete if not needed
|
||||
</p>
|
||||
<h2 id="tools">Tools</h2>
|
||||
<p>
|
||||
TODO: complete this section, or delete if not needed
|
||||
</p>
|
||||
<h3 id="go-command">Go command</h3>
|
||||
<p>
|
||||
TODO: complete this section.
|
||||
</p>
|
||||
|
||||
<!-- https://go.dev/issue/51461 -->
|
||||
<p>
|
||||
The <code>-trimpath</code> flag, if set, is now included in the build settings
|
||||
stamped into Go binaries by <code>go</code> <code>build</code>, and can be
|
||||
examined using
|
||||
<a href="https://pkg.go.dev/cmd/go#hdr-Print_Go_version"><code>go</code> <code>version</code> <code>-m</code></a>
|
||||
or <a href="https://pkg.go.dev/runtime/debug#ReadBuildInfo"><code>debug.ReadBuildInfo</code></a>.
|
||||
</p>
|
||||
<p>
|
||||
<code>go</code> <code>generate</code> now sets the <code>GOROOT</code>
|
||||
environment variable explicitly in the generator's environment, so that
|
||||
generators can locate the correct <code>GOROOT</code> even if built
|
||||
with <code>-trimpath</code>.
|
||||
</p>
|
||||
|
||||
<h4 id="go-unix">New <code>unix</code> build constraint</h4>
|
||||
|
||||
<p><!-- CL 389934 -->
|
||||
The build constraint <code>unix</code> is now recognized
|
||||
in <code>//go:build</code> lines. The constraint is satisfied
|
||||
if the target operating system, also known as <code>GOOS</code>, is
|
||||
a Unix or Unix-like system. For the 1.19 release it is satisfied
|
||||
if <code>GOOS</code> is one of
|
||||
<code>aix</code>, <code>android</code>, <code>darwin</code>,
|
||||
<code>dragonfly</code>, <code>freebsd</code>, <code>hurd</code>,
|
||||
<code>illumos</code>, <code>ios</code>, <code>linux</code>,
|
||||
<code>netbsd</code>, <code>openbsd</code>, or <code>solaris</code>.
|
||||
In future releases the <code>unix</code> constraint may match
|
||||
additional newly supported operating systems.
|
||||
</p>
|
||||
|
||||
<h2 id="runtime">Runtime</h2>
|
||||
<p>
|
||||
TODO: complete this section, or delete if not needed
|
||||
</p>
|
||||
<h2 id="compiler">Compiler</h2>
|
||||
<p>
|
||||
TODO: complete this section, or delete if not needed
|
||||
</p>
|
||||
<h2 id="linker">Linker</h2>
|
||||
<p>
|
||||
TODO: complete this section, or delete if not needed
|
||||
</p>
|
||||
<h2 id="library">Core library</h2>
|
||||
<p>
|
||||
TODO: complete this section
|
||||
</p>
|
||||
<h3 id="minor_library_changes">Minor changes to the library</h3>
|
||||
<p>
|
||||
As always, there are various minor changes and updates to the library,
|
||||
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
|
||||
in mind.
|
||||
</p>
|
||||
<p>
|
||||
TODO: complete this section
|
||||
</p>
|
||||
|
||||
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 400974 -->
|
||||
The <code>tls10default</code> <code>GODEBUG</code> option has been
|
||||
removed. It is still possible to enable TLS 1.0 client-side by setting
|
||||
<code>Config.MinVersion</code>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- crypto/tls -->
|
||||
|
||||
<dl id="image/draw"><dt><a href="/pkg/image/draw/">image/draw</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 396795 -->
|
||||
<code>Draw</code> with the <code>Src</code> operator preserves
|
||||
non-premultiplied-alpha colors when destination and source images are
|
||||
both <code>*image.NRGBA</code> (or both <code>*image.NRGBA64</code>).
|
||||
This reverts a behavior change accidentally introduced by a Go 1.18
|
||||
library optimization, to match the behavior in Go 1.17 and earlier.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- image/draw -->
|
||||
|
||||
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 386016 -->
|
||||
The pure Go resolver will now use EDNS(0) to include a suggested
|
||||
maximum reply packet length, permitting reply packets to contain
|
||||
up to 1232 bytes (the previous maximum was 512).
|
||||
In the unlikely event that this causes problems with a local DNS
|
||||
resolver, setting the environment variable
|
||||
<code>GODEBUG=netdns=cgo</code> to use the cgo-based resolver
|
||||
should work.
|
||||
Please report any such problems on <a href="/issue/new">the
|
||||
issue tracker</a>.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 396877 -->
|
||||
When a net package function or method returns an "I/O timeout"
|
||||
error, the error will now satisfy <code>errors.Is(err,
|
||||
context.DeadlineExceeded)</code>. When a net package function
|
||||
returns an "operation was canceled" error, the error will now
|
||||
satisfy <code>errors.Is(err, context.Canceled)</code>.
|
||||
These changes are intended to make it easier for code to test
|
||||
for cases in which a context cancelation or timeout causes a net
|
||||
package function or method to return an error, while preserving
|
||||
backward compatibility for error messages.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- net -->
|
||||
|
||||
<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
|
||||
<dd><!-- https://go.dev/issue/50599 -->
|
||||
<p>
|
||||
An <code>exec.Cmd</code> with a non-empty <code>Dir</code> and a
|
||||
nil <code>Env</code> now implicitly sets the <code>PWD</code> environment
|
||||
variable for the subprocess to match <code>Dir</code>.
|
||||
</p>
|
||||
<p>
|
||||
The new method <code>(*exec.Cmd).Environ</code> reports the
|
||||
environment that would be used to run the command, including the
|
||||
aforementioned <code>PWD</code> variable.
|
||||
</p>
|
||||
</dd>
|
||||
</dl> <!-- os/exec -->
|
||||
|
||||
<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
|
||||
<dd>
|
||||
<p><!-- https://go.dev/issue/51461 -->
|
||||
The <code>GOROOT</code> function now returns the empty string
|
||||
(instead of <code>"go"</code>) when the binary was built with
|
||||
the <code>-trimpath</code> flag set and the <code>GOROOT</code>
|
||||
variable is not set in the process environment.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- runtime -->
|
||||
|
||||
<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 397255 -->
|
||||
<a href="/pkg/strconv/#strconv.Quote"><code>strconv.Quote</code></a>
|
||||
and related functions now quote the rune 007F as <code>\x7f</code>,
|
||||
not <code>\u007f</code>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl><!-- strconv -->
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of April 19, 2022",
|
||||
"Subtitle": "Version of March 10, 2022",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
@@ -529,7 +529,6 @@ escaped_char = `\` ( "a" | "b" | "f" | "n" | "r" | "t" | "v" | `\` | "'" | `
|
||||
'aa' // illegal: too many characters
|
||||
'\xa' // illegal: too few hexadecimal digits
|
||||
'\0' // illegal: too few octal digits
|
||||
'\400' // illegal: octal value over 255
|
||||
'\uDFFF' // illegal: surrogate half
|
||||
'\U00110000' // illegal: invalid Unicode code point
|
||||
</pre>
|
||||
@@ -1278,8 +1277,7 @@ then the <code>File</code> interface is implemented by both <code>S1</code> and
|
||||
<p>
|
||||
Every type that is a member of the type set of an interface implements that interface.
|
||||
Any given type may implement several distinct interfaces.
|
||||
For instance, all types implement the <i>empty interface</i> which stands for the set
|
||||
of all (non-interface) types:
|
||||
For instance, all types implement the <i>empty interface</i> which stands for the set of all types:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -1381,7 +1379,7 @@ definition of an interface's type set as follows:
|
||||
of its interface elements.
|
||||
</li>
|
||||
|
||||
<li>The type set of a method specification is the set of all non-interface types
|
||||
<li>The type set of a method specification is the set of types
|
||||
whose method sets include that method.
|
||||
</li>
|
||||
|
||||
@@ -1390,7 +1388,7 @@ definition of an interface's type set as follows:
|
||||
</li>
|
||||
|
||||
<li>The type set of a term of the form <code>~T</code>
|
||||
is the set of all types whose underlying type is <code>T</code>.
|
||||
is the set of types whose underlying type is <code>T</code>.
|
||||
</li>
|
||||
|
||||
<li>The type set of a <i>union</i> of terms
|
||||
@@ -1399,15 +1397,6 @@ definition of an interface's type set as follows:
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The quantification "the set of all non-interface types" refers not just to all (non-interface)
|
||||
types declared in the program at hand, but all possible types in all possible programs, and
|
||||
hence is infinite.
|
||||
Similarly, given the set of all non-interface types that implement a particular method, the
|
||||
intersection of the method sets of those types will contain exactly that method, even if all
|
||||
types in the program at hand always pair that method with another method.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By construction, an interface's type set never contains an interface type.
|
||||
</p>
|
||||
@@ -1465,8 +1454,7 @@ type Float interface {
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The type <code>T</code> in a term of the form <code>T</code> or <code>~T</code> cannot
|
||||
be a <a href="#Type_parameter_declarations">type parameter</a>, and the type sets of all
|
||||
In a union, a term cannot be a <a href="#Type_parameter_declarations">type parameter</a>, and the type sets of all
|
||||
non-interface terms must be pairwise disjoint (the pairwise intersection of the type sets must be empty).
|
||||
Given a type parameter <code>P</code>:
|
||||
</p>
|
||||
@@ -1474,7 +1462,7 @@ Given a type parameter <code>P</code>:
|
||||
<pre>
|
||||
interface {
|
||||
P // illegal: P is a type parameter
|
||||
int | ~P // illegal: P is a type parameter
|
||||
int | P // illegal: P is a type parameter
|
||||
~int | MyInt // illegal: the type sets for ~int and MyInt are not disjoint (~int includes MyInt)
|
||||
float32 | Float // overlapping type sets but Float is an interface
|
||||
}
|
||||
@@ -1890,7 +1878,7 @@ A4, func(int, float64) *[]string, and A5
|
||||
B0 and C0
|
||||
D0[int, string] and E0
|
||||
[]int and []int
|
||||
struct{ a, b *B5 } and struct{ a, b *B5 }
|
||||
struct{ a, b *T5 } and struct{ a, b *T5 }
|
||||
func(x int, y float64) *[]string, func(int, float64) (result *[]string), and A5
|
||||
</pre>
|
||||
|
||||
@@ -4207,7 +4195,7 @@ type parameter list type arguments after substitution
|
||||
<p>
|
||||
For a generic function, type arguments may be provided explicitly, or they
|
||||
may be partially or completely <a href="#Type_inference">inferred</a>.
|
||||
A generic function that is <i>not</i> <a href="#Calls">called</a> requires a
|
||||
A generic function that is is <i>not</i> <a href="#Calls">called</a> requires a
|
||||
type argument list for instantiation; if the list is partial, all
|
||||
remaining type arguments must be inferrable.
|
||||
A generic function that is called may provide a (possibly partial) type
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
# README.md
|
||||
|
||||
This directory holds build scripts for unofficial, unsupported
|
||||
distributions of Go+BoringCrypto.
|
||||
|
||||
## Version strings
|
||||
|
||||
The distribution name for a Go+BoringCrypto release has the form `<GoVersion>b<BoringCryptoVersion>`,
|
||||
where `<GoVersion>` is the Go version the release is based on, and `<BoringCryptoVersion>` is
|
||||
an integer that increments each time there is a new release with different BoringCrypto bits.
|
||||
The `<BoringCryptoVersion>` is stored in the `VERSION` file in this directory.
|
||||
|
||||
For example, the first release is based on Go 1.8.3 is `go1.8.3b1`.
|
||||
If the BoringCrypto bits are updated, the next would be `go1.8.3b2`.
|
||||
If, after that, Go 1.9 is released and the same BoringCrypto code added to it,
|
||||
that would result in `go1.9b2`. There would likely not be a `go1.9b1`,
|
||||
since that would indicate Go 1.9 with the older BoringCrypto code.
|
||||
|
||||
## Releases
|
||||
|
||||
The `build.release` script prepares a binary release and publishes it in Google Cloud Storage
|
||||
at `gs://go-boringcrypto/`, making it available for download at
|
||||
`https://go-boringcrypto.storage.googleapis.com/<FILE>`.
|
||||
The script records each published release in the `RELEASES` file in this directory.
|
||||
|
||||
The `build.docker` script, which must be run after `build.release`, prepares a Docker image
|
||||
and publishes it on Google Artifact Registry.
|
||||
`go1.17.2b7` is published as `us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:1.17.2b7`.
|
||||
|
||||
## Release process
|
||||
|
||||
Development is done on the dev.boringcrypto branch, which tracks
|
||||
master. Releases are cut from dev.boringcrypto.go1.X branches,
|
||||
which are BoringCrypto backported to the Go 1.X release branches.
|
||||
To issue new BoringCrypto releases based on Go 1.X:
|
||||
|
||||
1. If the BoringCrypto bits have been updated, increment the
|
||||
number in `VERSION`, send that change out as a CL for review,
|
||||
get it committed to dev.boringcrypto, and run `git sync`.
|
||||
|
||||
2. Change to the dev.boringcrypto.go1.X branch and cherry-pick
|
||||
all BoringCrypto updates, including the update of the
|
||||
`VERSION` file. If desired, merge release-branch.go1.X into
|
||||
dev.boringcrypto.go1.X. Mail them out and get them committed.
|
||||
|
||||
3. **Back on the dev.boringcrypto branch**, run `git fetch`,
|
||||
`make.bash` and then `build.release dev.boringcrypto.go1.X`.
|
||||
The script will determine the base Go version and the
|
||||
BoringCrypto version, build a release, and upload it.
|
||||
|
||||
4. Run `build.docker`, which will build and upload a Docker image
|
||||
from the latest release.
|
||||
|
||||
5. Send out a CL with the updated `RELEASES` file and get it
|
||||
committed to dev.boringcrypto.
|
||||
|
||||
## Building from Docker
|
||||
|
||||
A Dockerfile that starts with `FROM golang:1.17.2` can switch
|
||||
to `FROM us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:1.17.2b7`
|
||||
and should need no other modifications.
|
||||
|
||||
## Building from Bazel
|
||||
|
||||
Starting from [bazelbuild/rules_go](https://github.com/bazelbuild/rules_go)
|
||||
tag 0.7.1, simply download the BoringCrypto-enabled Go SDK using
|
||||
`go_download_sdk()` before calling `go_register_toolchains()`.
|
||||
|
||||
For example, to use Go 1.9.3 with BoringCrypto on Linux, use the following lines
|
||||
in `WORKSPACE`:
|
||||
```python
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_download_sdk", "go_register_toolchains")
|
||||
|
||||
go_rules_dependencies()
|
||||
|
||||
go_download_sdk(
|
||||
name = "go_sdk",
|
||||
sdks = {
|
||||
"linux_amd64": ("go1.9.3b4.linux-amd64.tar.gz", "db1997b2454a2f27669b849d2d2cafb247a55128d53da678f06cb409310d6660"),
|
||||
},
|
||||
urls = ["https://storage.googleapis.com/go-boringcrypto/{}"],
|
||||
)
|
||||
|
||||
go_register_toolchains()
|
||||
```
|
||||
|
||||
**Note**: you must *not* enable `pure` mode, since cgo must be enabled. To
|
||||
ensure that binaries are linked with BoringCrypto, you can set `pure = "off"` on
|
||||
all relevant `go_binary` rules.
|
||||
|
||||
## Caveat
|
||||
|
||||
BoringCrypto is used for a given build only in limited circumstances:
|
||||
|
||||
- The build must be GOOS=linux, GOARCH=amd64.
|
||||
- The build must have cgo enabled.
|
||||
- The android build tag must not be specified.
|
||||
- The cmd_go_bootstrap build tag must not be specified.
|
||||
|
||||
The version string reported by `runtime.Version` does not indicate that BoringCrypto
|
||||
was actually used for the build. For example, linux/386 and non-cgo linux/amd64 binaries
|
||||
will report a version of `go1.8.3b2` but not be using BoringCrypto.
|
||||
|
||||
To check whether a given binary is using BoringCrypto, run `go tool nm` on it and check
|
||||
that it has symbols named `*_Cfunc__goboringcrypto_*`.
|
||||
|
||||
The program [rsc.io/goversion](https://godoc.org/rsc.io/goversion) will report the
|
||||
crypto implementation used by a given binary when invoked with the `-crypto` flag.
|
||||
@@ -1,213 +0,0 @@
|
||||
# This file lists published Go+BoringCrypto releases.
|
||||
# Each line describes a single release: <version> <git commit> <target> <URL> <sha256sum>
|
||||
go1.9rc2b2 91753387bdf7 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9rc2b2.linux-amd64.tar.gz 59355a45e6970e8013060851ddb3f079afe8db52e90db520a0826a13f1b5ae5b
|
||||
go1.8.3b3 f6ff81bac156 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.8.3b3.linux-amd64.tar.gz 6287ad971cd268bb2684fb8b1275dea928ad527823062bc057e73036c419e7af
|
||||
go1.9rc2b4 c339bc4e07a6 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9rc2b4.linux-amd64.tar.gz a8f677d48dc93920065fca4dca1a55bf7110aba132489c47e25d26d55c67eb32
|
||||
go1.9b4 e6ad24cde71e linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9b4.linux-amd64.tar.gz 6592e36a05df8e7c59812328a3a4bfa6c4eed72132fc31245951c3ade3ef2a8a
|
||||
go1.9b4 e6ad24cde71e src https://go-boringcrypto.storage.googleapis.com/go1.9b4.src.tar.gz c85f31dc743fee0e8ce0c6ffc286e27c1f51b66c9b923afafb43cdc378a41091
|
||||
go1.8.3b4 42cb4dcdb59a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.8.3b4.linux-amd64.tar.gz 4011c86e6175925e1c63dc7c19a51f825be53bbe7b08260918e5107b0fbd4f85
|
||||
go1.8.3b4 42cb4dcdb59a src https://go-boringcrypto.storage.googleapis.com/go1.8.3b4.src.tar.gz 2531ca8918aa024aed8f4a6c9e5c3b25bc8777623f1efa66aec7214601d474e4
|
||||
go1.9.2b4 cda3c6f91d7c linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9.2b4.linux-amd64.tar.gz 7c5e9a033ddc3ab36646e3bac7fd16962742710c70c18122e44a9ab56cdd3cf7
|
||||
go1.9.2b4 cda3c6f91d7c src https://go-boringcrypto.storage.googleapis.com/go1.9.2b4.src.tar.gz 38a2260b64a6a5ab20f8972d08b4765bad116721356433f39aebd29c7598218c
|
||||
go1.9.3b4 f4e5ebdf35c8 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9.3b4.linux-amd64.tar.gz db1997b2454a2f27669b849d2d2cafb247a55128d53da678f06cb409310d6660
|
||||
go1.9.3b4 f4e5ebdf35c8 src https://go-boringcrypto.storage.googleapis.com/go1.9.3b4.src.tar.gz 7485e1fc53a9fab9cf34f71de74d69f4c50f9d11a449647de40ee04b59bf8a5b
|
||||
go1.9.7b4 0bad1bef406e linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.9.7b4.linux-amd64.tar.gz 9e33a0deb8fed3bd7fa3d122bb5143be9e0a974a422ab4ddac5e765fa1310a6f
|
||||
go1.9.7b4 0bad1bef406e src https://go-boringcrypto.storage.googleapis.com/go1.9.7b4.src.tar.gz ad9fb6e22a27382c468467ecade4937f725b33818852f1c1da0d09b471e7486c
|
||||
go1.10.3b4 35ba5284935c linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.10.3b4.linux-amd64.tar.gz 6754729d78a375bd1debd980b1e3e7fd49198a980d0bbd8f39e89569aa001942
|
||||
go1.10.3b4 35ba5284935c src https://go-boringcrypto.storage.googleapis.com/go1.10.3b4.src.tar.gz f3e75c60a835c11b97e30429b63917ceb31f799b2ba7e2001d99db908fb8e28f
|
||||
go1.10.4b4 2e2a04a605b6 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.10.4b4.linux-amd64.tar.gz 17c275ff448686fe1908ecbea5d11ad6f4f7caa288d1786b756439703b12b8b2
|
||||
go1.10.4b4 2e2a04a605b6 src https://go-boringcrypto.storage.googleapis.com/go1.10.4b4.src.tar.gz f9cc38e194edabebf338fb74c22f597dc847560618d5d7d4d6cdc28139efa772
|
||||
go1.11b4 685dc1638240 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11b4.linux-amd64.tar.gz d53417b2071af0104fbc15a957000bccdcb5bbc094df0401f67d51968f7f2e4e
|
||||
go1.11b4 685dc1638240 src https://go-boringcrypto.storage.googleapis.com/go1.11b4.src.tar.gz 39896f0decd6721e81324cb2bb19540706ca97152c6800a6c8ad15a4e4162184
|
||||
go1.11.2b4 35cf0d9f6bbd linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.2b4.linux-amd64.tar.gz a9ceb6d0b4413d81ccc94c6460f60ca0c4f36b5dcbf659e1be582cd40c0edfbd
|
||||
go1.11.2b4 35cf0d9f6bbd src https://go-boringcrypto.storage.googleapis.com/go1.11.2b4.src.tar.gz 8e12a8df1428f00239dc67dd438a81f72c9925982e90b6899f66270971bddc1c
|
||||
go1.10.7b4 8b246fe0f595 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.10.7b4.linux-amd64.tar.gz 31917ab96004b9b482399b46928f5c10cdadefed5fda6f4de262efe2c3c7533e
|
||||
go1.10.7b4 8b246fe0f595 src https://go-boringcrypto.storage.googleapis.com/go1.10.7b4.src.tar.gz 323a184c77e3a377f5ed993b04946ee7b1a8e3350aba2894c0944f1e313636f1
|
||||
go1.11.4b4 572c4bce6792 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.4b4.linux-amd64.tar.gz e708ef7ecaf17a3e8e6deceadfa167cc1162f710f97ea4bc124d3837d6e2eaa1
|
||||
go1.11.4b4 572c4bce6792 src https://go-boringcrypto.storage.googleapis.com/go1.11.4b4.src.tar.gz ea963b80e218a34470e14e6e997fe06b8c5bf3f9c9bb0c801f7d8ef63b9bcb73
|
||||
go1.10.8b4 4b76b996cb0a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.10.8b4.linux-amd64.tar.gz 6d7d3323030851b595ba7ed66931c352b63de6dfe1ab3e6d6243987765d09819
|
||||
go1.10.8b4 4b76b996cb0a src https://go-boringcrypto.storage.googleapis.com/go1.10.8b4.src.tar.gz c1f5df50a4be3d0cb3aed7b80728f2b23c18deff0383636274742a38c145f939
|
||||
go1.11.5b4 3fb9dafacc45 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.5b4.linux-amd64.tar.gz 9b5b2972b452da9ba6bba65bab18fb9e8fbda31b5c489275710e5429d76f568c
|
||||
go1.11.5b4 3fb9dafacc45 src https://go-boringcrypto.storage.googleapis.com/go1.11.5b4.src.tar.gz 1c5801e2af25c9299d9fd94c64f9ec11fd35777c45d5d0f398c0a9884b1cfbbf
|
||||
go1.12.1b4 88e20e81a61f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.1b4.linux-amd64.tar.gz b71886e0d65e5efea2e0a3cbd0c3cd0daf84c437078e755ecde25f4ac0bbed2f
|
||||
go1.12.1b4 88e20e81a61f src https://go-boringcrypto.storage.googleapis.com/go1.12.1b4.src.tar.gz d44be1396eb2854b5d9c4d8e8ed0cf9fea1e9dc5a02d8f53b41ba571951a329f
|
||||
go1.11.6b4 7be8a5843a9b linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.6b4.linux-amd64.tar.gz b704f61b8979e64a46da8884c90cd2b0e2d54e802d55e5f56d7c93752334c197
|
||||
go1.11.6b4 7be8a5843a9b src https://go-boringcrypto.storage.googleapis.com/go1.11.6b4.src.tar.gz a56b45e24b61ad7b3c90dfd906cd22426a4de9e2e697b4c9ef07a2af047bcb0d
|
||||
go1.12.5b4 ad495d31d908 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.5b4.linux-amd64.tar.gz df0e64958cf90f27a65b2175eb80bc34a601136eed8e5559bed2a9e349e33707
|
||||
go1.12.5b4 ad495d31d908 src https://go-boringcrypto.storage.googleapis.com/go1.12.5b4.src.tar.gz 054d482896a77ae2d7d24c7adf08da5a4401b938871e61a5cdabc735c54cea9f
|
||||
go1.11.11b4 346babe6a67f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.11b4.linux-amd64.tar.gz c4dd44fa00f491b3d2ea808af8a6c234f915adb27c014512d725bafc4784d75f
|
||||
go1.11.11b4 346babe6a67f src https://go-boringcrypto.storage.googleapis.com/go1.11.11b4.src.tar.gz 57a724a72f0ba8620cbb48288f39c86ed513c241509ddf73231f4c8cd2a983ac
|
||||
go1.12.6b4 6b86b09ad4d3 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.6b4.linux-amd64.tar.gz eebc2e7f37555760adb361985b861d0cd34f9401cf7456d8d2f2f3082a60eee1
|
||||
go1.12.6b4 6b86b09ad4d3 src https://go-boringcrypto.storage.googleapis.com/go1.12.6b4.src.tar.gz 0e6e9aaf2c72a7e61280ce1e77b2ea24f01a59f4c1e6f0aa72b753206724fd3a
|
||||
go1.11.12b4 845e947ae34f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.12b4.linux-amd64.tar.gz 91808261fc357855fba920df01a933d6104e907793014317de00b92802d494d9
|
||||
go1.11.12b4 845e947ae34f src https://go-boringcrypto.storage.googleapis.com/go1.11.12b4.src.tar.gz 7b64d9e56ea627138d87c7533df8f9932a79ff900f150a8d8e6a3edc2d0066ec
|
||||
go1.12.7b4 bd126d0ad256 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.7b4.linux-amd64.tar.gz 7f0c73cd397bccad48ab4df4188d3651c25bf33102275848c6e67b882e11f680
|
||||
go1.12.7b4 bd126d0ad256 src https://go-boringcrypto.storage.googleapis.com/go1.12.7b4.src.tar.gz 0c48d7b81ef2b948980011fad1d176d6b10636a4016e3aed7438d86e046d816b
|
||||
go1.11.13b4 4f8e7223f936 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.11.13b4.linux-amd64.tar.gz eeb232577065732f5d57a4c77b7d73aa60231ee6fd6496daf7558993e92e403f
|
||||
go1.11.13b4 4f8e7223f936 src https://go-boringcrypto.storage.googleapis.com/go1.11.13b4.src.tar.gz 107da8846803a0a735766ca0947de6cd15cd23d8c584002f06e7ac5f81ecb114
|
||||
go1.12.8b4 55186ba70c1a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.8b4.linux-amd64.tar.gz 63f278abfc1e98546bc0ffc87f000d9aae2b06c0700212cb55ffd17d059fb8e1
|
||||
go1.12.8b4 55186ba70c1a src https://go-boringcrypto.storage.googleapis.com/go1.12.8b4.src.tar.gz c12b1d56ba4e0572f85a08681e05c66293ad53f04b11ce74c688d78fcb882061
|
||||
go1.12.9b4 ee88e5b118b5 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.9b4.linux-amd64.tar.gz d90989cba1db647b795400a9520eab2fa30f8dea50f4189b18d53f757a4bac44
|
||||
go1.12.9b4 ee88e5b118b5 src https://go-boringcrypto.storage.googleapis.com/go1.12.9b4.src.tar.gz 9d4efed8e13fa5ebdadd4fc22f9e35e67bfb34322570c83a15a0879472412e13
|
||||
go1.13b4 28e8a0c21e00 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13b4.linux-amd64.tar.gz 4a909f34bc487badb5ec11646c471ae690393d3f7835b8fbef8466d04ee23cba
|
||||
go1.13b4 28e8a0c21e00 src https://go-boringcrypto.storage.googleapis.com/go1.13b4.src.tar.gz 3c2dbe1bfcd7299b5be4b75529425c0a67b8d6b76f81f993b84ae0d173934257
|
||||
go1.12.10b4 5827153a1db7 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.10b4.linux-amd64.tar.gz 20963fde89fd20eebee9d89003e52702f0379fdb04a68754f9fadf2c302166e3
|
||||
go1.12.10b4 5827153a1db7 src https://go-boringcrypto.storage.googleapis.com/go1.12.10b4.src.tar.gz f5cfe73cfeaaa67619ff4a4bbc587e622d63a6aaa7145253e6583bd59072b323
|
||||
go1.13.1b4 2da1832ad494 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.1b4.linux-amd64.tar.gz 70be1bae05feb67d0560f39767e80707343d96554c5a611fbb93b04ce5913693
|
||||
go1.13.1b4 2da1832ad494 src https://go-boringcrypto.storage.googleapis.com/go1.13.1b4.src.tar.gz cf94520325f376ecaf420b7d25756cdecbed52510a1a079eca67c2c86c3cf39b
|
||||
go1.12.11b4 c5a4ae8c8c1b linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.11b4.linux-amd64.tar.gz a2d90aa130d45b36dd94a7e70accc94e2585eb45823fb7b07ae182ac8bc4a8ca
|
||||
go1.12.11b4 c5a4ae8c8c1b src https://go-boringcrypto.storage.googleapis.com/go1.12.11b4.src.tar.gz c334b70c9af0380fb9d397e89af1e2e2ac03380b5cc7c3327f56536c2f68bf8d
|
||||
go1.13.2b4 6a1c22797f9c linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.2b4.linux-amd64.tar.gz 888c1f6331862af388e730fab4926aa1cb2d4ffc5417e32f9e6d2af7953f0e29
|
||||
go1.13.2b4 6a1c22797f9c src https://go-boringcrypto.storage.googleapis.com/go1.13.2b4.src.tar.gz fc44c7713fcd84fe0587594ae5ee1a1d318a0da18b1156e1f9645c6ffa0335bc
|
||||
go1.12.12b4 cab2e4707a42 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.12b4.linux-amd64.tar.gz 983e996e8f60c78a400fed0edfd16c1718d704e15389c48b4a8b2d835c0d00f2
|
||||
go1.12.12b4 cab2e4707a42 src https://go-boringcrypto.storage.googleapis.com/go1.12.12b4.src.tar.gz 2d653a74c14cde1e414ac558e0bdd182ccbe1198bbff8cd22c8e423552d5e24d
|
||||
go1.13.3b4 cba6efa89376 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.3b4.linux-amd64.tar.gz 9ba0b7696f14dc7ecc912aae6587491853637fab30c4c005339fe36751bfd185
|
||||
go1.13.3b4 cba6efa89376 src https://go-boringcrypto.storage.googleapis.com/go1.13.3b4.src.tar.gz ba83d7e18fa49dc6e4319806e7b5cdee5eb046eb8e9fb38f3034378c4f80944a
|
||||
go1.12.13b4 5d9d84d037da linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.13b4.linux-amd64.tar.gz af3e0d2b9996c632b010da6700b7b8ec52bd3065b3facc478709209a854664eb
|
||||
go1.12.13b4 5d9d84d037da src https://go-boringcrypto.storage.googleapis.com/go1.12.13b4.src.tar.gz d1bae336ea076a0b2bfc984477f4a216a475e134068227e6d9b44faf239bcfb8
|
||||
go1.13.4b4 fa3f24e5c294 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.4b4.linux-amd64.tar.gz 23579d1bea65b2510e507bb0698ec66777bd34674c91dfe617ed130728791dc7
|
||||
go1.13.4b4 fa3f24e5c294 src https://go-boringcrypto.storage.googleapis.com/go1.13.4b4.src.tar.gz 8d82df5b4332acd5a274ac029ee5b5ff073b2a4247e2325610986221858b819d
|
||||
go1.12.16b4 f74e68136cf1 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.16b4.linux-amd64.tar.gz fd70cee8ca9438f99cc71b3586b11a03a36239a5bccbf1c4d06e7206b88bd77d
|
||||
go1.12.16b4 f74e68136cf1 src https://go-boringcrypto.storage.googleapis.com/go1.12.16b4.src.tar.gz 2ae0823cefc34f280d4f4ba0d665ff247ba1429cb43198d10e3bc316d3f29a8d
|
||||
go1.13.7b4 71468339f763 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.7b4.linux-amd64.tar.gz 85945502ad43f506902927f69b514b34a85a20e2bd1020cce87c551645194aa3
|
||||
go1.13.7b4 71468339f763 src https://go-boringcrypto.storage.googleapis.com/go1.13.7b4.src.tar.gz d30fa252de75763adb5886125e19e8bab68dbe8dbad33b0faf09a6be98b12d96
|
||||
go1.12.17b4 9e5b1367cb45 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.12.17b4.linux-amd64.tar.gz ee3a72dc1cfd8a34f32aaa5ddb05076fcb39434fd1bd25aa318234f72b462e31
|
||||
go1.12.17b4 9e5b1367cb45 src https://go-boringcrypto.storage.googleapis.com/go1.12.17b4.src.tar.gz ffb653ec8f4cc33e1e7c308d89c695f322a76f3107e0fc8c639affc6148261bf
|
||||
go1.13.8b4 fdf5e5b5905f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.8b4.linux-amd64.tar.gz eac505df92aa6d6b76041f4b485d230f839159b8567c96d7980a06ef476ab3df
|
||||
go1.13.8b4 fdf5e5b5905f src https://go-boringcrypto.storage.googleapis.com/go1.13.8b4.src.tar.gz 1aa28fe37a704e94bb34e23578fd07ebbc6a025e9be9b45a898967b84405c41b
|
||||
go1.14b4 99da8fa53467 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14b4.linux-amd64.tar.gz a617e03a6c8813c53b813b865a2e185e12dbfaa76c703c1c48e57ad89651556b
|
||||
go1.14b4 99da8fa53467 src https://go-boringcrypto.storage.googleapis.com/go1.14b4.src.tar.gz ee292639b24923f519f1f0fe1ceaeca8d46feb8c15cf88e228346398c5848380
|
||||
go1.13.9b4 bb8a1014a32c linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.9b4.linux-amd64.tar.gz 565e1a3c62dfc2586471b6ae189ada053a86fc51d88d2eac883a03731071bf77
|
||||
go1.13.9b4 bb8a1014a32c src https://go-boringcrypto.storage.googleapis.com/go1.13.9b4.src.tar.gz 536f0549e7bbdad32270a17d8a282667560b6da2d27a5e3580714338e70185ad
|
||||
go1.14.1b4 e784c3f4d925 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.1b4.linux-amd64.tar.gz 6570991396d531fb628e4c01d697eeee395104147d406aec5a8ba00a213ef63f
|
||||
go1.14.1b4 e784c3f4d925 src https://go-boringcrypto.storage.googleapis.com/go1.14.1b4.src.tar.gz 2c267c3114fa4683f51c281d216d3754b38d5d08144c3acc318cf37165b1b2da
|
||||
go1.13.10b4 b129f40bb33f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.10b4.linux-amd64.tar.gz a511b2e6ee7b71ca1411d6e4bb07ec33bb5b6974fd1dded77e00520d24d9d000
|
||||
go1.13.10b4 b129f40bb33f src https://go-boringcrypto.storage.googleapis.com/go1.13.10b4.src.tar.gz 5dfa44eea19b0be0c9c394fbbf89b2a14f84380a9d7b87e21eacba3ba030c44b
|
||||
go1.14.2b4 2b0d842f4b24 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.2b4.linux-amd64.tar.gz 82449a7ce57733c0cd3fa7feac89214706ff2b04e387b62619b8e2b8b388ffd9
|
||||
go1.14.2b4 2b0d842f4b24 src https://go-boringcrypto.storage.googleapis.com/go1.14.2b4.src.tar.gz bfcb44fa329d6a2eb5c4ef58bfa114d65b078bf69a361bb77e3ea52ec8975d14
|
||||
go1.13.12b4 488ca930b24a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.12b4.linux-amd64.tar.gz 63193aa2290af5d65d2d6bbddcd11d835d437a4e835954d605863f5b27a7661d
|
||||
go1.13.12b4 488ca930b24a src https://go-boringcrypto.storage.googleapis.com/go1.13.12b4.src.tar.gz 5b0aefb44ba2a08fedb5be0144810bc47559d7d8a6e61638c09dd261706d650e
|
||||
go1.14.4b4 fcdb6aa6ee5d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.4b4.linux-amd64.tar.gz 682f2167b3d619690b1385196776822b1d2c497607f67e2d19d92faf2bea0b4a
|
||||
go1.14.4b4 fcdb6aa6ee5d src https://go-boringcrypto.storage.googleapis.com/go1.14.4b4.src.tar.gz 2fb759023360f0d42ba434f0409da2460ff4386cab062557f97fe15122b4b4cd
|
||||
go1.13.14b4 852ccd9de7d1 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.14b4.linux-amd64.tar.gz 49c67d3a67fac60e18a264555392aa5925126a75ef0ba152ec315cc874eccb43
|
||||
go1.13.14b4 852ccd9de7d1 src https://go-boringcrypto.storage.googleapis.com/go1.13.14b4.src.tar.gz 7b7dfc62286a07d438370b09f38845acae99c592c6e147722b8f3c098ab8756a
|
||||
go1.14.6b4 8f53ffb15fd5 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.6b4.linux-amd64.tar.gz 953322287806a42d4a73e096aea45511a51a0a323086e98119edcb0dae866c9d
|
||||
go1.14.6b4 8f53ffb15fd5 src https://go-boringcrypto.storage.googleapis.com/go1.14.6b4.src.tar.gz 75fea7a60da4ca225473b500b2d5ce7c302ca7d22eedfdbd3444cd01e6b9f392
|
||||
go1.15b5 a15df605fc4a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15b5.linux-amd64.tar.gz ebcb2212bdb645a16ffc05a1d9b77c94553ed19a6ccbbc73e4868c64777eb70a
|
||||
go1.15b5 a15df605fc4a src https://go-boringcrypto.storage.googleapis.com/go1.15b5.src.tar.gz 7107665853228b2c18f56fec73e217fa3494ccf52c609be839cf6945d501c0f0
|
||||
go1.13.15b4 5622128a77b4 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.13.15b4.linux-amd64.tar.gz 8b45ec0e578dc0a0bc483c2d12c08fee5adbfb39f0854fbe9d45f7d628ed1697
|
||||
go1.13.15b4 5622128a77b4 src https://go-boringcrypto.storage.googleapis.com/go1.13.15b4.src.tar.gz 21eab29a61a43078cd8bcdbbbb4c82ca049a7e2e211aca0c95f6a306e288db4f
|
||||
go1.14.9b4 62cd3338eed7 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.9b4.linux-amd64.tar.gz c81946294cbefa7a3abdf47733c720c3454418d6881c137a2e28f18ea40977aa
|
||||
go1.14.9b4 62cd3338eed7 src https://go-boringcrypto.storage.googleapis.com/go1.14.9b4.src.tar.gz e9c13c4daa10f6aac80b703f61f7e931af92e92146c8b140ae79e20e4af6bccd
|
||||
go1.15.2b5 dbc5602d1839 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.2b5.linux-amd64.tar.gz 30c04d854fc8990017ee8c180c1407a4f26c016e3a4134161bbf41c9d16452e3
|
||||
go1.15.2b5 dbc5602d1839 src https://go-boringcrypto.storage.googleapis.com/go1.15.2b5.src.tar.gz 67432c0b0a02aa6cc0c49ab285f1c6935a16dadfebd77dfabca7e31907240bc9
|
||||
go1.14.10b4 b5fc12785be4 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.10b4.linux-amd64.tar.gz d3aa38fb5108b43b155c21529190e73789df6ca0b37feafd43438aefe42f936e
|
||||
go1.14.10b4 b5fc12785be4 src https://go-boringcrypto.storage.googleapis.com/go1.14.10b4.src.tar.gz daf7603babc49935efdea5befb2ecad823771523a84d1ba6c0e8c10fac982d59
|
||||
go1.15.3b5 ed9dc25d693c linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.3b5.linux-amd64.tar.gz 34ec7ec094f5e9349f1612b5f6d8f014b3a7b37b6986aeedcd0fe7cf2dc76a62
|
||||
go1.15.3b5 ed9dc25d693c src https://go-boringcrypto.storage.googleapis.com/go1.15.3b5.src.tar.gz bc37727287366aabb47594717cebd0a759147d8b2eb4cd3a45a19317af199fe9
|
||||
go1.14.12b4 21ba30ad409a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.12b4.linux-amd64.tar.gz 7f9fb67a3c59fff24e3c51fa2a7435f4195cfb33844c9c2def27c162cc23604b
|
||||
go1.14.12b4 21ba30ad409a src https://go-boringcrypto.storage.googleapis.com/go1.14.12b4.src.tar.gz 948d7a77a4a890a7258102bcc7b63890f238061dfb6a4c06033660e727e87fcf
|
||||
go1.15.5b5 11087322f85d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.5b5.linux-amd64.tar.gz 9c97488137f1f560b3fff0d8a2a9c45d2de8790fb8952a42b46cc4633528fc48
|
||||
go1.15.5b5 11087322f85d src https://go-boringcrypto.storage.googleapis.com/go1.15.5b5.src.tar.gz ee933cb1a4b591794dbcce99740032506af25ee202765dcc6979feb5abc114fc
|
||||
go1.14.13b4 2bb8e5a94e8a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.13b4.linux-amd64.tar.gz 8fb6e1cefe5535ab704e1b4e26725095dcca0060490842a54dd93e7cd8b206cd
|
||||
go1.14.13b4 2bb8e5a94e8a src https://go-boringcrypto.storage.googleapis.com/go1.14.13b4.src.tar.gz 02e0c4871d12813aee1019bf189b77ccec99dab3a1d5b95ce6abdf85b1810703
|
||||
go1.15.6b5 f78276931172 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.6b5.linux-amd64.tar.gz 245c500f7da70fb2abd1a6021436ed48e2b97dbbdb394a759b0601dc69cf4e77
|
||||
go1.15.6b5 f78276931172 src https://go-boringcrypto.storage.googleapis.com/go1.15.6b5.src.tar.gz 6576a29d019405b14fdc98883fed33c766de2028fbbd3a743a241275275cc7e5
|
||||
go1.14.14b4 9cf003256bc3 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.14b4.linux-amd64.tar.gz 7df65366d26a13c5be16f87f64e832e86db3b8b9ca1b5c6385e0e20bf79dc82f
|
||||
go1.14.14b4 9cf003256bc3 src https://go-boringcrypto.storage.googleapis.com/go1.14.14b4.src.tar.gz aaeda57e2b68ac72783c7aacded814ec660a91c1010c3139156c8e7def86f145
|
||||
go1.15.7b5 79ea7a16d7e3 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.7b5.linux-amd64.tar.gz cb08962897e3802cda96f4ee915ed20fbde7d5d85e688759ef523d2e6ae44851
|
||||
go1.15.7b5 79ea7a16d7e3 src https://go-boringcrypto.storage.googleapis.com/go1.15.7b5.src.tar.gz aa7cb4beff82881cbff4a66e9e07a4004e49384a8fcc95204db9b2f48c12a235
|
||||
go1.15.8b5 2a0dd053ecfa linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.8b5.linux-amd64.tar.gz 9d897bf42a962b064cfc9bed182c18ade0a3f5857d6a075d93b73ca8fe3b1f3a
|
||||
go1.15.8b5 2a0dd053ecfa src https://go-boringcrypto.storage.googleapis.com/go1.15.8b5.src.tar.gz 57964e7762ab03f0ad17bc787585b1709decccf095b7f7d2e9fca61a71e09010
|
||||
go1.14.15b4 47419f9cac61 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.14.15b4.linux-amd64.tar.gz 82ba7297d26afcdade439de5621bdcb16e5261877f204aa60d03b5e07223a5c8
|
||||
go1.14.15b4 47419f9cac61 src https://go-boringcrypto.storage.googleapis.com/go1.14.15b4.src.tar.gz bf77b15f1d905753648db2d91e39c3a740b67b03dfff511aa25a360a78f9742a
|
||||
go1.16b7 67a0be0b437e linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16b7.linux-amd64.tar.gz 56d4e41d55baece6b98bc66bdf772b0eb17518dd287f27c533225cd154ee0a38
|
||||
go1.16b7 67a0be0b437e src https://go-boringcrypto.storage.googleapis.com/go1.16b7.src.tar.gz 7d063cf1cbd252da8b2db54947e5f2f1402ac792e1ea6de76e05ab233f5badbd
|
||||
go1.15.9b5 055f1da6e6b9 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.9b5.linux-amd64.tar.gz 8e44de7d9d36d68e01c0454841f1becb93d4932bb16a623ed6d4de15ecba1239
|
||||
go1.15.9b5 055f1da6e6b9 src https://go-boringcrypto.storage.googleapis.com/go1.15.9b5.src.tar.gz dba0290da6ae46df8d68c6d027b7d6b4775d6dcf8ff9f3cb8a26dbd5b757e696
|
||||
go1.16.1b7 b9bd851b1452 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.1b7.linux-amd64.tar.gz 963f6a4fb8c5ff7668fb17ba52c3d905466058266556844aee79139f7e3c9521
|
||||
go1.16.1b7 b9bd851b1452 src https://go-boringcrypto.storage.googleapis.com/go1.16.1b7.src.tar.gz 8e6849010ae5f3280fea0f6fa6e5b07831ac6e6524a636fab41c0e4f77b529ba
|
||||
go1.15.10b5 229a39e34717 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.10b5.linux-amd64.tar.gz 7533b0307fd995deb9ef68d67899582c336a3c62387d19d03d10202129e9fad3
|
||||
go1.15.10b5 229a39e34717 src https://go-boringcrypto.storage.googleapis.com/go1.15.10b5.src.tar.gz adbaff96b2392a9ab5a20d15fec959983861ec6e554c3c9cd14aec586a0928b3
|
||||
go1.16.2b7 6d5f0ffc93e5 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.2b7.linux-amd64.tar.gz 2871d90630706eba9d3bd2838ec1c0a367c78c2c4f40e74ed75c294e2c5aa358
|
||||
go1.16.2b7 6d5f0ffc93e5 src https://go-boringcrypto.storage.googleapis.com/go1.16.2b7.src.tar.gz 8991c28e30bdd9b34076c2871ab69aac7f306dba08d202aa7301f3adb54ad9f3
|
||||
go1.15.11b5 be25192f119e linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.11b5.linux-amd64.tar.gz c5aa34a83631b3736bc1ab37027bc4fc22eca2353035586a6255be7e29251f43
|
||||
go1.15.11b5 be25192f119e src https://go-boringcrypto.storage.googleapis.com/go1.15.11b5.src.tar.gz 05408824d64ac8ebb6c1d895017e605d45a2c4ebee28995136fe12f4833652d2
|
||||
go1.16.3b7 fcee6b930a01 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.3b7.linux-amd64.tar.gz afe15efce3c1fecc60994d7ba0d41daaa029fa5810c98737121dde7b38a5e2ac
|
||||
go1.16.3b7 fcee6b930a01 src https://go-boringcrypto.storage.googleapis.com/go1.16.3b7.src.tar.gz 5c86175ed86e6ae3826eb827cc51bdda770f22ffaf3258b11135a268153b5057
|
||||
go1.16.4b7 25aff96f4b49 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.4b7.linux-amd64.tar.gz de60f0620f46b1872813f72646fdece76be94f43c1abe84b69033c26f823a31f
|
||||
go1.16.4b7 25aff96f4b49 src https://go-boringcrypto.storage.googleapis.com/go1.16.4b7.src.tar.gz 5b537cf5598bc968764885f4d1f9820578d05d104a6cd7107bb3e443217f4983
|
||||
go1.15.12b5 03a15201e7e0 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.12b5.linux-amd64.tar.gz 9fadc65da7df036bfe702b3f9980e2ca2b184f13d09e8094244f58a866a2f6ee
|
||||
go1.15.12b5 03a15201e7e0 src https://go-boringcrypto.storage.googleapis.com/go1.15.12b5.src.tar.gz 81ec958d893f4ecf90111d09ceb79b36492266a39d1918a22e80443e1d399561
|
||||
go1.16.5b7 e4feea2ce841 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.5b7.linux-amd64.tar.gz 2085b246d7d6908f504d0f33c655c31c3ec6e1ae3d13a020ba58abcf1b6ea7a4
|
||||
go1.16.5b7 e4feea2ce841 src https://go-boringcrypto.storage.googleapis.com/go1.16.5b7.src.tar.gz cfe6cc16eb205d61414338c2b42fa2c4278831785b29e6b79712669418852ef4
|
||||
go1.15.13b5 9647f89f2ac2 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.13b5.linux-amd64.tar.gz 1ad1edeaf3b6bc7696978d4137f55c0b38b8d796a607b89f7f010004aaef60a6
|
||||
go1.15.13b5 9647f89f2ac2 src https://go-boringcrypto.storage.googleapis.com/go1.15.13b5.src.tar.gz 6cc9c5d23947a9dccc0e1afdff5d433398b09df1c5170596a826aac326ece457
|
||||
go1.15.14b5 ddf078e08dc6 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.14b5.linux-amd64.tar.gz 8c4dbdc91e36f3d1db7f14b234973bfcb3b685fe4a6cb2e326ba9cf73a4260c2
|
||||
go1.15.14b5 ddf078e08dc6 src https://go-boringcrypto.storage.googleapis.com/go1.15.14b5.src.tar.gz 0022b68f04a5d8553cfd838d3fe226f18e7095194300b2be4fc49a689daf0e1b
|
||||
go1.16.6b7 6a6b41a8441e linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.6b7.linux-amd64.tar.gz f7f33064643ce0ab8ac1cede100e7eee8509a970178f5be961d9fba331226067
|
||||
go1.16.6b7 6a6b41a8441e src https://go-boringcrypto.storage.googleapis.com/go1.16.6b7.src.tar.gz a1079dd2df6aad3bad584c4187dab98a264075b56b1d257ba27d956340ff7bbf
|
||||
go1.15.15b5 dd96ded6c86b linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.15.15b5.linux-amd64.tar.gz 719d818f70c6eb1e753910fe21624832cf3f719540f22f89863e959ff68c0001
|
||||
go1.15.15b5 dd96ded6c86b src https://go-boringcrypto.storage.googleapis.com/go1.15.15b5.src.tar.gz af2d44c8eef02e093c077c085fbe6964af0ca715f95f4bcea0809fa211cc4ded
|
||||
go1.16.7b7 0d02a0d966b6 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.7b7.linux-amd64.tar.gz d4ca2906640edd9299d12d8204aae0d848b497b79b92424d8705ae748e16f3c5
|
||||
go1.16.7b7 0d02a0d966b6 src https://go-boringcrypto.storage.googleapis.com/go1.16.7b7.src.tar.gz f65503abf459ba1d2f77d4d023fcebd19c62e7c34d3ffd0f1aebb598ffa153d9
|
||||
go1.16.9b7 35d5cd0dcfb9 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.9b7.linux-amd64.tar.gz 6659e3ea17474000d2ac2f4a887a4bac26ab8cf6a0b0779cbd41464a7de23645
|
||||
go1.16.9b7 35d5cd0dcfb9 src https://go-boringcrypto.storage.googleapis.com/go1.16.9b7.src.tar.gz 81a40da773e33230276446955f9ddc85c8ca121432d56842edad49212975a9bc
|
||||
go1.17.2b7 5f1867dc1e67 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.2b7.linux-amd64.tar.gz 60fd88def54b81e489ba2d2d80e5df32150ef1a62c0ece3ff869862141824c81
|
||||
go1.17.2b7 5f1867dc1e67 src https://go-boringcrypto.storage.googleapis.com/go1.17.2b7.src.tar.gz b00e746a053d5e70e27151b9461e5e3413c53bb88bc60e0db107a99284614d17
|
||||
go1.16.10b7 06a4b2790c5b linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.10b7.linux-amd64.tar.gz 9720316c7d91fa0b6a31678745ad68c52c92e4027751602449fb2309c0c3f1de
|
||||
go1.16.10b7 06a4b2790c5b src https://go-boringcrypto.storage.googleapis.com/go1.16.10b7.src.tar.gz 742e1e904d82cd7a17fade53ab9001f5f88b7a3ee9358c587811762fc07cdaa3
|
||||
go1.17.3b7 5a371e30afcb linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.3b7.linux-amd64.tar.gz a5216d1e7401c734b3e29e8aad3c8608f094ae7d37b55e8815211e25922e4d19
|
||||
go1.17.3b7 5a371e30afcb src https://go-boringcrypto.storage.googleapis.com/go1.17.3b7.src.tar.gz 858595a95faf4c730ebe3d40ecba1705b79f7bc2a996fd044cb30da8d9c57534
|
||||
go1.17.4b7 95e6359f6a5d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.4b7.linux-amd64.tar.gz aa4a69709a08c7d83a6417f978a9e5f32207c0e9da82d39cceff7d9cdf657e59
|
||||
go1.17.4b7 95e6359f6a5d src https://go-boringcrypto.storage.googleapis.com/go1.17.4b7.src.tar.gz 0151f947e1da7a9cec63b06276b9ed4b92d2e5113ae254ebbdb9191b65c711f6
|
||||
go1.16.11b7 c884bd9ef2f1 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.11b7.linux-amd64.tar.gz 8edd1e42a88df0dbb99f1e1487149a856155f24711e19c17ba0f08d76254e2ca
|
||||
go1.16.11b7 c884bd9ef2f1 src https://go-boringcrypto.storage.googleapis.com/go1.16.11b7.src.tar.gz a50f8362af1e44011b342657cac80d817868c6d0f40a6d235c45abc81c16fb92
|
||||
go1.16.12b7 adecd3ffbec7 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.12b7.linux-amd64.tar.gz fd43c36e9bc926634c13e0dc3547046c55f3b5a2448473d8fb51c344ea726542
|
||||
go1.16.12b7 adecd3ffbec7 src https://go-boringcrypto.storage.googleapis.com/go1.16.12b7.src.tar.gz 891e21c67738b63b645ace56fbd3874ff9e8583865ee7907543ae43373411d64
|
||||
go1.17.5b7 dc52cfcd39cd linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.5b7.linux-amd64.tar.gz 92407bbc855fd05c5252a2ee2d4fcb6eb077cf64fd0d70da53ba7914c22ec1d7
|
||||
go1.17.5b7 dc52cfcd39cd src https://go-boringcrypto.storage.googleapis.com/go1.17.5b7.src.tar.gz 4c508aecce1b56e34a4e32605086994606c72010b7caedce7681c1019781c93e
|
||||
go1.16.13b7 bb93480d0093 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.13b7.linux-amd64.tar.gz cd98a2ea753edc9d0206b14b2d40d269ddaee1dea7bc59b91cb8a11fc575f738
|
||||
go1.16.13b7 bb93480d0093 src https://go-boringcrypto.storage.googleapis.com/go1.16.13b7.src.tar.gz e9f8f5f6769fed35924b364f2e1df8ad2fc491569189761047cec14ca5922ee1
|
||||
go1.17.6b7 cfad1ff84c45 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.6b7.linux-amd64.tar.gz 5b55a001fb80f9baaed621c2469977b9c9afe13b9afc6fd5712057856ab86f5d
|
||||
go1.17.6b7 cfad1ff84c45 src https://go-boringcrypto.storage.googleapis.com/go1.17.6b7.src.tar.gz 5178f595dea6d618f7cdf6b9e2346a1a28430b4d547996b766fcd5b34379ca2f
|
||||
go1.17.7b7 172559d22b5d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.7b7.linux-amd64.tar.gz a69bf0516affb8678873ba40c4ddbc8e3b01bfa8460f5c5f356dd53049d54322
|
||||
go1.17.7b7 172559d22b5d src https://go-boringcrypto.storage.googleapis.com/go1.17.7b7.src.tar.gz eff84edf4f676c691ac21747277e15777789be32dcaa53a0779737b280351453
|
||||
go1.16.14b7 e90b835f3071 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.14b7.linux-amd64.tar.gz 5024e1231d33b9dfffdd7821132dd32eccd42e7415f25618dc8c7304b335edd9
|
||||
go1.16.14b7 e90b835f3071 src https://go-boringcrypto.storage.googleapis.com/go1.16.14b7.src.tar.gz caef2ef601bcc588e6bcb511087c9620200723a4c74191b725fbda94c3be884b
|
||||
go1.17.8b7 4ea866a9969f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.8b7.linux-amd64.tar.gz 4a1fa2c8d77309e1ef5bafe7e80e75c06e70c0ae1212d9f3d95485017155491d
|
||||
go1.17.8b7 4ea866a9969f src https://go-boringcrypto.storage.googleapis.com/go1.17.8b7.src.tar.gz e42ac342c315d33c47434299a24f33137e7099f278ee6669404c4d7e49e17bcf
|
||||
go1.16.15b7 649671b08fbd linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.16.15b7.linux-amd64.tar.gz 4d62f517786266019c721c35330e23da123eb184eadb5a79379fe81d31d856db
|
||||
go1.16.15b7 649671b08fbd src https://go-boringcrypto.storage.googleapis.com/go1.16.15b7.src.tar.gz 54fc7f2ec0b72b0aaf7726eb5f7f57885252ef46c2c1ca238090cc57850e3ef7
|
||||
go1.18b7 0622ea4d9068 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18b7.linux-amd64.tar.gz baa33bc66b8df97a3c5a328637b85f04d5629f139dc2df946c09ab7214510c61
|
||||
go1.18b7 0622ea4d9068 src https://go-boringcrypto.storage.googleapis.com/go1.18b7.src.tar.gz 6028ffee59903934a3182d45ee3e0c1c9f47fb98f05d9bbb2fabb4771db60792
|
||||
go1.18.1b7 d003f0850a7d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.1b7.linux-amd64.tar.gz a5b3985341de6ca54f6a8e13e9ae695f0ee202207e25f082c3895a8fc6f89f64
|
||||
go1.18.1b7 d003f0850a7d src https://go-boringcrypto.storage.googleapis.com/go1.18.1b7.src.tar.gz c7f91549b3a197e4a08f64e07546855ca8f82d597f60fd23c7ad2f082640a9fe
|
||||
go1.17.9b7 ed86dfc4e441 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.9b7.linux-amd64.tar.gz 9469d1b4c10f59c921c4666c52baba5f6ca63b1cce0eca95e03b5713ef27577c
|
||||
go1.17.9b7 ed86dfc4e441 src https://go-boringcrypto.storage.googleapis.com/go1.17.9b7.src.tar.gz 5d6bfe543a9a2bf6d8749973c771e40127b8020a769ecc5fb41d0dbd7deae9a6
|
||||
go1.18.2b7 dcdb19874ff3 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.2b7.linux-amd64.tar.gz a53566eebe8e128695ddbd52c080502a0daca1c9f1b893cada9349259ed27e99
|
||||
go1.18.2b7 dcdb19874ff3 src https://go-boringcrypto.storage.googleapis.com/go1.18.2b7.src.tar.gz 3c3ce00cd39cdd2ae9afddd7581c6f8b14f8e96e2bb56b9cb4fec8ff02db63b0
|
||||
go1.17.10b7 6b07de790c08 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.10b7.linux-amd64.tar.gz 3c506a86b1e3e4fcffd6a875e5d47ca23f0a346c1bd6e6163e67dbb96eeec1d5
|
||||
go1.17.10b7 6b07de790c08 src https://go-boringcrypto.storage.googleapis.com/go1.17.10b7.src.tar.gz 9d5914842ea1b36edc2ceb6cfa7d3a79bea450c8b397e86bfae7c73944208f03
|
||||
go1.18.3b7 a69db81af596 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.3b7.linux-amd64.tar.gz 1c13ddfb539141298ee32d26b95345cacdcd245c29fb6bc63acb59f9ba41f519
|
||||
go1.18.3b7 a69db81af596 src https://go-boringcrypto.storage.googleapis.com/go1.18.3b7.src.tar.gz d8123121c491569c698ef713001a2193f13d9a8111a1ba7b2b0d4a2e9bf863db
|
||||
go1.17.11b7 4658e6e324a8 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.11b7.linux-amd64.tar.gz 104a5b10037e7a2646b0458519bf6efe85c6d203ae9f32ede7ed24d4e87f7b2d
|
||||
go1.17.11b7 4658e6e324a8 src https://go-boringcrypto.storage.googleapis.com/go1.17.11b7.src.tar.gz 85a6d4249e38decdaad0cffe784cbe249199e38a18db1c247097a5f91f5d9c10
|
||||
go1.18.4b7 913e3713bed3 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.4b7.linux-amd64.tar.gz 24be93f9718bfb4b7703fe959a69c61e103a0149dda693406cd681f7e00cf6fb
|
||||
go1.18.4b7 913e3713bed3 src https://go-boringcrypto.storage.googleapis.com/go1.18.4b7.src.tar.gz 572ce2d917c06ca87ccd3e51e02e0ad4a09eb0ad283cc762176d11d7cd4777af
|
||||
go1.17.12b7 7d5078e3bf2d linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.12b7.linux-amd64.tar.gz f1a075501f89d1b726a0a71611019679c77944e6ab253991aad79df73859d20a
|
||||
go1.17.12b7 7d5078e3bf2d src https://go-boringcrypto.storage.googleapis.com/go1.17.12b7.src.tar.gz aa7e6eccf8d8ee1fd270eb5acba58b6416ad97decae32ca7eee03193a70defa6
|
||||
go1.18.5b7 270c7b73de4a linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.5b7.linux-amd64.tar.gz 104479cff67e4c749304d95dd5b5e0d065a65780ec03b6378a28432c01504e88
|
||||
go1.18.5b7 270c7b73de4a src https://go-boringcrypto.storage.googleapis.com/go1.18.5b7.src.tar.gz 75f5021bd9b61f837fdd516cc4ec51556c519c7155a2e99ecfb4efeca8655aa7
|
||||
go1.17.13b7 349da2d42d31 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.17.13b7.linux-amd64.tar.gz 489151867b1454ea17d8a02bebb443121623c63585a15c2640e043c432c2d1ef
|
||||
go1.17.13b7 349da2d42d31 src https://go-boringcrypto.storage.googleapis.com/go1.17.13b7.src.tar.gz 8c86eede1718d45a8f934df2b158eb30b5d323255e5ff8885c81319f973f464e
|
||||
go1.18.6b7 5fe109f32326 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.6b7.linux-amd64.tar.gz a81c54b6dfd0750998be758a54ae46ecd5f1442c303c5146e844568c02acb47f
|
||||
go1.18.6b7 5fe109f32326 src https://go-boringcrypto.storage.googleapis.com/go1.18.6b7.src.tar.gz 0afc7b1edb8b7570ba05bc30b112804280b1cc5750e1a3dc8500be5c8b8ba06f
|
||||
go1.18.7b7 e3d1f0e7da63 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.7b7.linux-amd64.tar.gz 96694715f7d8122670a5e919b122470817041077e0f98ffd2c2643df5824ee82
|
||||
go1.18.7b7 e3d1f0e7da63 src https://go-boringcrypto.storage.googleapis.com/go1.18.7b7.src.tar.gz c62ba13f792f64f31381d34a7d6b14aec0b04363eb67085b999d1d6e51a94136
|
||||
go1.18.8b7 94108e21ab6f linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.8b7.linux-amd64.tar.gz 9df1f697273b29a5f8b23e5ed2bfd187237d886c2ebac360f457537c7b17dcd8
|
||||
go1.18.8b7 94108e21ab6f src https://go-boringcrypto.storage.googleapis.com/go1.18.8b7.src.tar.gz c3028846650b42cf77c1c0d540791eaa1283c8e60e2a87e28ae43658ffdc262a
|
||||
go1.18.9b7 fc1ed37e824b linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.9b7.linux-amd64.tar.gz 65f15218ed55697de24d4f58f43ed3c1ff35eb59462aab8002554cc479bf573c
|
||||
go1.18.9b7 fc1ed37e824b src https://go-boringcrypto.storage.googleapis.com/go1.18.9b7.src.tar.gz 45b1ed1d3f63d1fa86c6f26329f11912c1dbfb1fa4fd39cf0eabc84e29f86cd7
|
||||
go1.18.10b7 7058c2cb4132 linux-amd64 https://go-boringcrypto.storage.googleapis.com/go1.18.10b7.linux-amd64.tar.gz 17897c0f3716c8bc8ad3db9a41b7b35820b9d43cff3982193808f9af13e7dae5
|
||||
go1.18.10b7 7058c2cb4132 src https://go-boringcrypto.storage.googleapis.com/go1.18.10b7.src.tar.gz 4ced930d738cb30f4c4b28b7281d1e2e397eda2353b4c8f7c6de82ef589acc0b
|
||||
@@ -1 +0,0 @@
|
||||
8
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2017 The Go Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
# build.docker builds and publishes a Docker image for
|
||||
# a given Go+BoringCrypto release.
|
||||
|
||||
set -e
|
||||
|
||||
# With no arguments, use the most recent linux-amd64 release in the RELEASES file.
|
||||
case "$#" in
|
||||
0)
|
||||
version=$(grep linux-amd64 RELEASES | tail -1 | awk '{print $1}');;
|
||||
1)
|
||||
version="$1";;
|
||||
*)
|
||||
echo 'usage: build.docker [version]' >&2
|
||||
exit 2
|
||||
esac
|
||||
|
||||
url="$(grep "^$version .* linux-amd64 " RELEASES | awk '{print $4}')"
|
||||
sha256="$(grep "^$version .* linux-amd64 " RELEASES | awk '{print $5}')"
|
||||
if [ "$sha256" = "" ]; then
|
||||
echo "cannot find $version in RELEASES file" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Build a temporary directory with a Dockerfile.
|
||||
dir=$(mktemp -d)
|
||||
trap "rm -rf $dir" EXIT
|
||||
|
||||
if echo "$url" | grep '!' >/dev/null; then
|
||||
# ! is sed delimiter below. Should never happen.
|
||||
echo "URL contains an exclamation mark!" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
dversion=$(echo "$version" | sed 's/^go//')
|
||||
sed "s!UUU!$url!; s/SSS/$sha256/; s/VVV/$dversion/" dockerfile.in >$dir/Dockerfile
|
||||
|
||||
dpkg=us-docker.pkg.dev/google.com/api-project-999119582588/go-boringcrypto/golang:$dversion
|
||||
|
||||
docker build --pull -t $dpkg $dir
|
||||
docker run $dpkg go version
|
||||
docker run $dpkg go tool nm /usr/local/go/bin/go >$dir/nm
|
||||
if ! grep crypto/internal/boring/sig.BoringCrypto $dir/nm >/dev/null; then
|
||||
echo 'built docker image but did NOT find sig.BoringCrypto in go command!' >&2
|
||||
exit 2
|
||||
fi
|
||||
if egrep 'crypto/sha256\.\(\*digest\)' $dir/nm >/dev/null; then
|
||||
echo 'built docker image but DID find sha256.(*digest) in go command unexpectedly!' >&2
|
||||
exit 2
|
||||
fi
|
||||
docker push $dpkg
|
||||
|
||||
echo
|
||||
echo published as $dpkg
|
||||
@@ -1,102 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2017 The Go Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
# build.release builds and publishes a new Go+BoringCrypto release.
|
||||
# After running this script, the change to the RELEASES file should be
|
||||
# sent out for review and committed to the repository (but the release
|
||||
# is already done, so there's not much to review).
|
||||
|
||||
set -e
|
||||
|
||||
case "$#" in
|
||||
0)
|
||||
rev=HEAD;;
|
||||
1)
|
||||
rev="$1";;
|
||||
*)
|
||||
echo 'usage: build.release [git-rev]' >&2
|
||||
exit 2
|
||||
esac
|
||||
|
||||
# Determine commit to use.
|
||||
commit=$(git rev-parse "$rev" | awk '{print substr($1, 1, 12)}')
|
||||
if [ "$commit" = "" ]; then
|
||||
echo 'cannot find commit in git history' >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Determine base Go release from tags.
|
||||
base=$(git log --decorate=short --oneline "$rev" | grep 'tag: go' | sed 1q | sed 's/[),].*//; s/.*tag: //')
|
||||
if [ "$base" = "" ]; then
|
||||
echo "cannot find go release tag in git history for $rev" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Determine boring crypto version from file.
|
||||
boring=$(git show "$commit:misc/boring/VERSION")
|
||||
if [ "$boring" = "" ]; then
|
||||
echo "missing BORINGVERSION file in $commit" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Make sure we're not redefining a published release.
|
||||
version="${base}b${boring}"
|
||||
if grep "^$version " RELEASES >/dev/null; then
|
||||
echo "found $version in RELEASES - not rereleasing" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Show what's going on, while the release builds.
|
||||
# Good time for user to type ^C if something is wrong.
|
||||
echo >&2
|
||||
echo "building $version from $commit" >&2
|
||||
echo >&2
|
||||
git log -n1 "$commit" >&2
|
||||
echo >&2
|
||||
|
||||
# Build the release tool in a temporary directory.
|
||||
dir=$(mktemp -d)
|
||||
trap "rm -rf $dir" EXIT
|
||||
GOBIN="$dir" go install golang.org/x/build/cmd/release@latest
|
||||
|
||||
# Build the release.
|
||||
sha() {
|
||||
if hash sha256sum 2>/dev/null; then
|
||||
sha256sum "$@"
|
||||
else
|
||||
shasum -a 256 "$@"
|
||||
fi
|
||||
}
|
||||
shortgo=$(echo "$base" | perl -pe 's/(go\d+\.\d+)(\.\d+|rc\d+)/$1/')
|
||||
$dir/release -target linux-amd64 -rev "$commit" -version "$version" -skip_long_tests
|
||||
$dir/release -target src -rev "$commit" -version "$version"
|
||||
output="$version.linux-amd64.tar.gz"
|
||||
ls -l "$output"
|
||||
sha256=$(sha "$output" | awk '{print $1}')
|
||||
outputsrc="$version.src.tar.gz"
|
||||
ls -l "$outputsrc"
|
||||
sha256src=$(sha "$outputsrc" | awk '{print $1}')
|
||||
|
||||
trap "rm -f /tmp/go.release.$$ /tmp/go.nm.$$" EXIT
|
||||
tar -xzf "$output" -O go/bin/go >/tmp/go.release.$$
|
||||
go tool nm /tmp/go.release.$$ >/tmp/go.nm.$$
|
||||
if ! grep crypto/internal/boring/sig.BoringCrypto /tmp/go.nm.$$ >/dev/null; then
|
||||
echo 'built release but did NOT find sig.BoringCrypto in go command!' >&2
|
||||
exit 2
|
||||
fi
|
||||
if egrep 'crypto/sha256\.\(\*digest\)' /tmp/go.nm.$$ >/dev/null; then
|
||||
echo 'built release but DID find sha256.(*digest) in go command unexpectedly!' >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Publish the release.
|
||||
gsutil cp "$output" gs://go-boringcrypto/
|
||||
url="https://go-boringcrypto.storage.googleapis.com/$output"
|
||||
gsutil cp "$outputsrc" gs://go-boringcrypto/
|
||||
urlsrc="https://go-boringcrypto.storage.googleapis.com/$outputsrc"
|
||||
|
||||
# Record that it was published.
|
||||
echo "$version $commit linux-amd64 $url $sha256" >>RELEASES
|
||||
echo "$version $commit src $urlsrc $sha256src" >>RELEASES
|
||||
@@ -1,31 +0,0 @@
|
||||
# Template for Dockerfile, used in build.docker script.
|
||||
# Based on https://github.com/docker-library/golang/blob/7e3d99a803/1.13/buster/Dockerfile
|
||||
FROM buildpack-deps:buster-scm
|
||||
|
||||
# gcc for cgo
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
g++ \
|
||||
gcc \
|
||||
libc6-dev \
|
||||
make \
|
||||
pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV GOLANG_VERSION VVV
|
||||
|
||||
RUN set -eux; \
|
||||
\
|
||||
url="UUU"; \
|
||||
wget -O go.tgz "$url"; \
|
||||
echo "SSS go.tgz" | sha256sum -c -; \
|
||||
tar -C /usr/local -xzf go.tgz; \
|
||||
rm go.tgz; \
|
||||
\
|
||||
export PATH="/usr/local/go/bin:$PATH"; \
|
||||
go version
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
||||
|
||||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
||||
WORKDIR $GOPATH
|
||||
@@ -1,34 +0,0 @@
|
||||
#! /bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "usage: merge.sh <target branch> <source revision>"
|
||||
echo ""
|
||||
echo "example: merge.sh dev.boringcrypto master"
|
||||
echo " merge.sh dev.boringcrypto.go1.10 go1.10.7"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TARGET="$1"
|
||||
SOURCE="$2"
|
||||
WORKTREE="$(mktemp -d)"
|
||||
BRANCH="boring/merge-$TARGET-$(date +%Y%m%d%H%M%S)"
|
||||
|
||||
git fetch
|
||||
git worktree add --track -b "$BRANCH" "$WORKTREE" "origin/$TARGET"
|
||||
|
||||
cd "$WORKTREE"
|
||||
export GIT_GOFMT_HOOK=off
|
||||
git merge --no-commit --no-stat "$SOURCE" || echo "Ignoring conflict..."
|
||||
[[ -f VERSION ]] && git rm -f VERSION
|
||||
git checkout --ours codereview.cfg && git add codereview.cfg
|
||||
git commit -m "all: merge $SOURCE into $TARGET"
|
||||
|
||||
if ! git log --format=%B -n 1 | grep "\[$TARGET\] "; then
|
||||
echo "The commit does not seem to be targeting the BoringCrypto branch."
|
||||
echo "(Or you are missing the git-codereview hooks.)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git codereview mail -trybot HEAD
|
||||
cd - && git worktree remove "$WORKTREE"
|
||||
@@ -1,34 +0,0 @@
|
||||
#! /bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "usage: <target branch> [<target branch> ...]"
|
||||
echo ""
|
||||
echo "example: release.sh dev.boringcrypto.go1.11 dev.boringcrypto.go1.12"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check that the Docker daemon is available.
|
||||
docker ps > /dev/null
|
||||
|
||||
WORKTREE="$(mktemp -d)"
|
||||
BRANCH="boring/release-$(date +%Y%m%d%H%M%S)"
|
||||
|
||||
git fetch
|
||||
git worktree add --track -b "$BRANCH" "$WORKTREE" origin/dev.boringcrypto
|
||||
|
||||
cd "$WORKTREE/src"
|
||||
GOEXPERIMENT=boringcrypto ./make.bash
|
||||
|
||||
cd ../misc/boring
|
||||
for branch in "$@"; do
|
||||
./build.release "origin/$branch"
|
||||
./build.docker
|
||||
done
|
||||
|
||||
git add RELEASES
|
||||
git commit -m "misc/boring: add new releases to RELEASES file"
|
||||
git codereview mail
|
||||
|
||||
rm *.tar.gz
|
||||
cd - && git worktree remove "$WORKTREE"
|
||||
@@ -333,9 +333,10 @@ func (z *Int) Abs(x *Int) *Int {
|
||||
|
||||
// CmpInt compares x and y. The result is
|
||||
//
|
||||
// -1 if x < y
|
||||
// 0 if x == y
|
||||
// +1 if x > y
|
||||
// -1 if x < y
|
||||
// 0 if x == y
|
||||
// +1 if x > y
|
||||
//
|
||||
func CmpInt(x, y *Int) int {
|
||||
x.doinit()
|
||||
y.doinit()
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include "_cgo_export.h"
|
||||
|
||||
void
|
||||
@@ -30,10 +31,32 @@ IntoC(void)
|
||||
BackIntoGo();
|
||||
}
|
||||
|
||||
void
|
||||
Issue1560InC(void)
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
long long
|
||||
mysleep(int seconds) {
|
||||
long long st = GetTickCount();
|
||||
Sleep(1000 * seconds);
|
||||
return st;
|
||||
}
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
long long
|
||||
mysleep(int seconds) {
|
||||
long long st;
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
st = tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
sleep(seconds);
|
||||
return st;
|
||||
}
|
||||
#endif
|
||||
|
||||
long long
|
||||
twoSleep(int n)
|
||||
{
|
||||
Issue1560FromC();
|
||||
BackgroundSleep(n);
|
||||
return mysleep(n);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -11,7 +11,6 @@ import "testing"
|
||||
// These wrappers are here for gotest to find.
|
||||
|
||||
func Test1328(t *testing.T) { test1328(t) }
|
||||
func Test1560(t *testing.T) { test1560(t) }
|
||||
func Test1635(t *testing.T) { test1635(t) }
|
||||
func Test3250(t *testing.T) { test3250(t) }
|
||||
func Test3729(t *testing.T) { test3729(t) }
|
||||
@@ -90,6 +89,7 @@ func TestLibgcc(t *testing.T) { testLibgcc(t) }
|
||||
func TestMultipleAssign(t *testing.T) { testMultipleAssign(t) }
|
||||
func TestNaming(t *testing.T) { testNaming(t) }
|
||||
func TestPanicFromC(t *testing.T) { testPanicFromC(t) }
|
||||
func TestParallelSleep(t *testing.T) { testParallelSleep(t) }
|
||||
func TestPrintf(t *testing.T) { testPrintf(t) }
|
||||
func TestReturnAfterGrow(t *testing.T) { testReturnAfterGrow(t) }
|
||||
func TestReturnAfterGrowFromGo(t *testing.T) { testReturnAfterGrowFromGo(t) }
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -29,7 +30,8 @@ extern void doAdd(int, int);
|
||||
void IntoC(void);
|
||||
|
||||
// issue 1560
|
||||
extern void Issue1560InC(void);
|
||||
// mysleep returns the absolute start time in ms.
|
||||
long long mysleep(int seconds);
|
||||
|
||||
// twoSleep returns the absolute start time of the first sleep
|
||||
// in ms.
|
||||
@@ -181,40 +183,35 @@ func test1328(t *testing.T) {
|
||||
}
|
||||
|
||||
// issue 1560
|
||||
// Test that C functions and Go functions run in parallel.
|
||||
|
||||
var (
|
||||
issue1560 int32
|
||||
var sleepDone = make(chan int64)
|
||||
|
||||
issue1560Ch = make(chan bool, 2)
|
||||
)
|
||||
|
||||
//export Issue1560FromC
|
||||
func Issue1560FromC() {
|
||||
for atomic.LoadInt32(&issue1560) != 1 {
|
||||
runtime.Gosched()
|
||||
// parallelSleep returns the absolute difference between the start time
|
||||
// of the two sleeps.
|
||||
func parallelSleep(n int) int64 {
|
||||
t := int64(C.twoSleep(C.int(n))) - <-sleepDone
|
||||
if t < 0 {
|
||||
return -t
|
||||
}
|
||||
atomic.AddInt32(&issue1560, 1)
|
||||
for atomic.LoadInt32(&issue1560) != 3 {
|
||||
runtime.Gosched()
|
||||
}
|
||||
issue1560Ch <- true
|
||||
return t
|
||||
}
|
||||
|
||||
func Issue1560FromGo() {
|
||||
atomic.AddInt32(&issue1560, 1)
|
||||
for atomic.LoadInt32(&issue1560) != 2 {
|
||||
runtime.Gosched()
|
||||
}
|
||||
atomic.AddInt32(&issue1560, 1)
|
||||
issue1560Ch <- true
|
||||
//export BackgroundSleep
|
||||
func BackgroundSleep(n int32) {
|
||||
go func() {
|
||||
sleepDone <- int64(C.mysleep(C.int(n)))
|
||||
}()
|
||||
}
|
||||
|
||||
func test1560(t *testing.T) {
|
||||
go Issue1560FromGo()
|
||||
go C.Issue1560InC()
|
||||
<-issue1560Ch
|
||||
<-issue1560Ch
|
||||
func testParallelSleep(t *testing.T) {
|
||||
sleepSec := 1
|
||||
dt := time.Duration(parallelSleep(sleepSec)) * time.Millisecond
|
||||
t.Logf("difference in start time for two sleep(%d) is %v", sleepSec, dt)
|
||||
// bug used to run sleeps in serial, producing a 2*sleepSec-second delay.
|
||||
// we detect if the start times of those sleeps are > 0.5*sleepSec-second.
|
||||
if dt >= time.Duration(sleepSec)*time.Second/2 {
|
||||
t.Fatalf("parallel %d-second sleeps slept for %f seconds", sleepSec, dt.Seconds())
|
||||
}
|
||||
}
|
||||
|
||||
// issue 2462
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
package cshared_test
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"debug/elf"
|
||||
"debug/pe"
|
||||
@@ -839,51 +838,3 @@ func TestGo2C2Go(t *testing.T) {
|
||||
run(t, goenv, "go", "build", "-o", bin, "./go2c2go/m2")
|
||||
runExe(t, runenv, bin)
|
||||
}
|
||||
|
||||
func TestIssue36233(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Test that the export header uses GoComplex64 and GoComplex128
|
||||
// for complex types.
|
||||
|
||||
tmpdir, err := os.MkdirTemp("", "cshared-TestIssue36233")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(tmpdir)
|
||||
|
||||
const exportHeader = "issue36233.h"
|
||||
|
||||
run(t, nil, "go", "tool", "cgo", "-exportheader", exportHeader, "-objdir", tmpdir, "./issue36233/issue36233.go")
|
||||
data, err := os.ReadFile(exportHeader)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
funcs := []struct{ name, signature string }{
|
||||
{"exportComplex64", "GoComplex64 exportComplex64(GoComplex64 v)"},
|
||||
{"exportComplex128", "GoComplex128 exportComplex128(GoComplex128 v)"},
|
||||
{"exportComplexfloat", "GoComplex64 exportComplexfloat(GoComplex64 v)"},
|
||||
{"exportComplexdouble", "GoComplex128 exportComplexdouble(GoComplex128 v)"},
|
||||
}
|
||||
|
||||
scanner := bufio.NewScanner(bytes.NewReader(data))
|
||||
var found int
|
||||
for scanner.Scan() {
|
||||
b := scanner.Bytes()
|
||||
for _, fn := range funcs {
|
||||
if bytes.Contains(b, []byte(fn.name)) {
|
||||
found++
|
||||
if !bytes.Contains(b, []byte(fn.signature)) {
|
||||
t.Errorf("function signature mismatch; got %q, want %q", b, fn.signature)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if err = scanner.Err(); err != nil {
|
||||
t.Errorf("scanner encountered error: %v", err)
|
||||
}
|
||||
if found != len(funcs) {
|
||||
t.Error("missing functions")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
package main
|
||||
|
||||
// #include <complex.h>
|
||||
import "C"
|
||||
|
||||
//export exportComplex64
|
||||
func exportComplex64(v complex64) complex64 {
|
||||
return v
|
||||
}
|
||||
|
||||
//export exportComplex128
|
||||
func exportComplex128(v complex128) complex128 {
|
||||
return v
|
||||
}
|
||||
|
||||
//export exportComplexfloat
|
||||
func exportComplexfloat(v C.complexfloat) C.complexfloat {
|
||||
return v
|
||||
}
|
||||
|
||||
//export exportComplexdouble
|
||||
func exportComplexdouble(v C.complexdouble) C.complexdouble {
|
||||
return v
|
||||
}
|
||||
|
||||
func main() {}
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -59,32 +58,9 @@ func TestGoDefs(t *testing.T) {
|
||||
t.Fatalf("%s: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
|
||||
}
|
||||
|
||||
fn := fp + "_defs.go"
|
||||
if err := os.WriteFile(filepath.Join(dir, fn), out, 0644); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(dir, fp+"_defs.go"), out, 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Verify that command line arguments are not rewritten in the generated comment,
|
||||
// see go.dev/issue/52063
|
||||
hasGeneratedByComment := false
|
||||
for _, line := range strings.Split(strings.TrimSpace(string(out)), "\n") {
|
||||
cgoExe := "cgo"
|
||||
if runtime.GOOS == "windows" {
|
||||
cgoExe = "cgo.exe"
|
||||
}
|
||||
if !strings.HasPrefix(line, "// "+cgoExe+" -godefs") {
|
||||
continue
|
||||
}
|
||||
if want := "// " + cgoExe + " " + strings.Join(cmd.Args[3:], " "); line != want {
|
||||
t.Errorf("%s: got generated comment %q, want %q", fn, line, want)
|
||||
}
|
||||
hasGeneratedByComment = true
|
||||
break
|
||||
}
|
||||
|
||||
if !hasGeneratedByComment {
|
||||
t.Errorf("%s: comment with generating cgo -godefs command not found", fn)
|
||||
}
|
||||
}
|
||||
|
||||
main, err := os.ReadFile(filepath.Join("testdata", "main.go"))
|
||||
|
||||
@@ -41,9 +41,6 @@ func TestASAN(t *testing.T) {
|
||||
{src: "asan4_fail.go", memoryAccessError: "use-after-poison", errorLocation: "asan4_fail.go:13"},
|
||||
{src: "asan5_fail.go", memoryAccessError: "use-after-poison", errorLocation: "asan5_fail.go:18"},
|
||||
{src: "asan_useAfterReturn.go"},
|
||||
{src: "asan_unsafe_fail1.go", memoryAccessError: "use-after-poison", errorLocation: "asan_unsafe_fail1.go:25"},
|
||||
{src: "asan_unsafe_fail2.go", memoryAccessError: "use-after-poison", errorLocation: "asan_unsafe_fail2.go:25"},
|
||||
{src: "asan_unsafe_fail3.go", memoryAccessError: "use-after-poison", errorLocation: "asan_unsafe_fail3.go:18"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := 1
|
||||
b := 2
|
||||
c := add(a, b)
|
||||
d := a + b
|
||||
fmt.Println(c, d)
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func add(a1, b1 int) int {
|
||||
// The arguments.
|
||||
// When -asan is enabled, unsafe.Pointer(&a1) conversion is escaping.
|
||||
var p *int = (*int)(unsafe.Add(unsafe.Pointer(&a1), 1*unsafe.Sizeof(int(1))))
|
||||
*p = 10 // BOOM
|
||||
return a1 + b1
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := 1
|
||||
b := 2
|
||||
c := add(a, b)
|
||||
d := a + b
|
||||
fmt.Println(c, d)
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func add(a1, b1 int) (ret int) {
|
||||
// The return value
|
||||
// When -asan is enabled, the unsafe.Pointer(&ret) conversion is escaping.
|
||||
var p *int = (*int)(unsafe.Add(unsafe.Pointer(&ret), 1*unsafe.Sizeof(int(1))))
|
||||
*p = 123 // BOOM
|
||||
ret = a1 + b1
|
||||
return
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := 1
|
||||
b := 2
|
||||
// The local variables.
|
||||
// When -asan is enabled, the unsafe.Pointer(&a) conversion is escaping.
|
||||
var p *int = (*int)(unsafe.Add(unsafe.Pointer(&a), 1*unsafe.Sizeof(int(1))))
|
||||
*p = 20 // BOOM
|
||||
d := a + b
|
||||
fmt.Println(d)
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func runWithEnv(t *testing.T, msg string, env []string, args ...string) {
|
||||
func goCmd(t *testing.T, args ...string) string {
|
||||
newargs := []string{args[0]}
|
||||
if *testX && args[0] != "env" {
|
||||
newargs = append(newargs, "-x", "-ldflags=-v")
|
||||
newargs = append(newargs, "-x")
|
||||
}
|
||||
newargs = append(newargs, args[1:]...)
|
||||
c := exec.Command("go", newargs...)
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
// binary.
|
||||
//
|
||||
// This script requires that three environment variables be set:
|
||||
//
|
||||
// GOIOS_DEV_ID: The codesigning developer id or certificate identifier
|
||||
// GOIOS_APP_ID: The provisioning app id prefix. Must support wildcard app ids.
|
||||
// GOIOS_TEAM_ID: The team id that owns the app id prefix.
|
||||
//
|
||||
// GOIOS_DEV_ID: The codesigning developer id or certificate identifier
|
||||
// GOIOS_APP_ID: The provisioning app id prefix. Must support wildcard app ids.
|
||||
// GOIOS_TEAM_ID: The team id that owns the app id prefix.
|
||||
// $GOROOT/misc/ios contains a script, detect.go, that attempts to autodetect these.
|
||||
package main
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ The file was generated by catapult's `vulcanize_trace_viewer` command.
|
||||
$ git clone https://chromium.googlesource.com/catapult
|
||||
$ cd catapult
|
||||
$ ./tracing/bin/vulcanize_trace_viewer --config=full
|
||||
$ cp tracing/bin/trace_viewer_full.html $GOROOT/src/cmd/trace/static/trace_viewer_full.html
|
||||
$ cp tracing/bin/trace_viewer_full.html $GOROOT/misc/trace/trace_viewer_full.html
|
||||
```
|
||||
|
||||
We are supposed to use --config=lean (produces smaller html),
|
||||
@@ -31,7 +31,7 @@ to import the `trace_viewer_full.html`.
|
||||
This is copied from the catapult repo.
|
||||
|
||||
```
|
||||
$ cp third_party/polymer/components/webcomponentsjs/webcomponents.min.js $GOROOT/src/cmd/trace/static/webcomponents.min.js
|
||||
$ cp third_party/polymer/components/webcomponentsjs/webcomponents.min.js $GOROOT/misc/trace/webcomponents.min.js
|
||||
```
|
||||
|
||||
## Licenses
|
||||
@@ -221,11 +221,9 @@ func (s sparseEntry) endOffset() int64 { return s.Offset + s.Length }
|
||||
// that the file has no data in it, which is rather odd.
|
||||
//
|
||||
// As an example, if the underlying raw file contains the 10-byte data:
|
||||
//
|
||||
// var compactFile = "abcdefgh"
|
||||
//
|
||||
// And the sparse map has the following entries:
|
||||
//
|
||||
// var spd sparseDatas = []sparseEntry{
|
||||
// {Offset: 2, Length: 5}, // Data fragment for 2..6
|
||||
// {Offset: 18, Length: 3}, // Data fragment for 18..20
|
||||
@@ -237,7 +235,6 @@ func (s sparseEntry) endOffset() int64 { return s.Offset + s.Length }
|
||||
// }
|
||||
//
|
||||
// Then the content of the resulting sparse file with a Header.Size of 25 is:
|
||||
//
|
||||
// var sparseFile = "\x00"*2 + "abcde" + "\x00"*11 + "fgh" + "\x00"*4
|
||||
type (
|
||||
sparseDatas []sparseEntry
|
||||
@@ -296,9 +293,9 @@ func alignSparseEntries(src []sparseEntry, size int64) []sparseEntry {
|
||||
// The input must have been already validated.
|
||||
//
|
||||
// This function mutates src and returns a normalized map where:
|
||||
// - adjacent fragments are coalesced together
|
||||
// - only the last fragment may be empty
|
||||
// - the endOffset of the last fragment is the total size
|
||||
// * adjacent fragments are coalesced together
|
||||
// * only the last fragment may be empty
|
||||
// * the endOffset of the last fragment is the total size
|
||||
func invertSparseEntries(src []sparseEntry, size int64) []sparseEntry {
|
||||
dst := src[:0]
|
||||
var pre sparseEntry
|
||||
|
||||
@@ -336,9 +336,9 @@ func parsePAX(r io.Reader) (map[string]string, error) {
|
||||
// header in case further processing is required.
|
||||
//
|
||||
// The err will be set to io.EOF only when one of the following occurs:
|
||||
// - Exactly 0 bytes are read and EOF is hit.
|
||||
// - Exactly 1 block of zeros is read and EOF is hit.
|
||||
// - At least 2 blocks of zeros are read.
|
||||
// * Exactly 0 bytes are read and EOF is hit.
|
||||
// * Exactly 1 block of zeros is read and EOF is hit.
|
||||
// * At least 2 blocks of zeros are read.
|
||||
func (tr *Reader) readHeader() (*Header, *block, error) {
|
||||
// Two blocks of zero bytes marks the end of the archive.
|
||||
if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build unix
|
||||
//go:build aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris
|
||||
|
||||
package tar
|
||||
|
||||
|
||||
@@ -306,7 +306,6 @@ func formatPAXRecord(k, v string) (string, error) {
|
||||
|
||||
// validPAXRecord reports whether the key-value pair is valid where each
|
||||
// record is formatted as:
|
||||
//
|
||||
// "%d %s=%s\n" % (size, key, value)
|
||||
//
|
||||
// Keys and values should be UTF-8, but the number of bad writers out there
|
||||
|
||||
@@ -229,9 +229,6 @@ func (r *checksumReader) Read(b []byte) (n int, err error) {
|
||||
n, err = r.rc.Read(b)
|
||||
r.hash.Write(b[:n])
|
||||
r.nread += uint64(n)
|
||||
if r.nread > r.f.UncompressedSize64 {
|
||||
return 0, ErrFormat
|
||||
}
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -865,6 +865,7 @@ func returnRecursiveZip() (r io.ReaderAt, size int64) {
|
||||
//
|
||||
// It's here in hex for the same reason as rZipBytes above: to avoid
|
||||
// problems with on-disk virus scanners or other zip processors.
|
||||
//
|
||||
func biggestZipBytes() []byte {
|
||||
s := `
|
||||
0000000 50 4b 03 04 14 00 08 00 08 00 00 00 00 00 00 00
|
||||
@@ -1407,30 +1408,3 @@ func TestCVE202141772(t *testing.T) {
|
||||
t.Errorf("Inconsistent name in info entry: %v", name)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnderSize(t *testing.T) {
|
||||
z, err := OpenReader("testdata/readme.zip")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer z.Close()
|
||||
|
||||
for _, f := range z.File {
|
||||
f.UncompressedSize64 = 1
|
||||
}
|
||||
|
||||
for _, f := range z.File {
|
||||
t.Run(f.Name, func(t *testing.T) {
|
||||
rd, err := f.Open()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer rd.Close()
|
||||
|
||||
_, err = io.Copy(io.Discard, rd)
|
||||
if err != ErrFormat {
|
||||
t.Fatalf("Error mismatch\n\tGot: %v\n\tWant: %v", err, ErrFormat)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ if [ "$BOOTSTRAP_FORMAT" = "mintgz" ]; then
|
||||
echo "Preparing to generate build system's ${OUTGZ}; cleaning ..."
|
||||
rm -rf bin/gofmt
|
||||
rm -rf src/runtime/race/race_*.syso
|
||||
rm -rf api test doc misc/cgo/test
|
||||
rm -rf api test doc misc/cgo/test misc/trace
|
||||
rm -rf pkg/tool/*_*/{addr2line,api,cgo,cover,doc,fix,nm,objdump,pack,pprof,test2json,trace,vet}
|
||||
rm -rf pkg/*_*/{image,database,cmd}
|
||||
rm -rf $(find . -type d -name testdata)
|
||||
|
||||
@@ -731,28 +731,13 @@ func (b *Writer) WriteRune(r rune) (size int, err error) {
|
||||
// If the count is less than len(s), it also returns an error explaining
|
||||
// why the write is short.
|
||||
func (b *Writer) WriteString(s string) (int, error) {
|
||||
var sw io.StringWriter
|
||||
tryStringWriter := true
|
||||
|
||||
nn := 0
|
||||
for len(s) > b.Available() && b.err == nil {
|
||||
var n int
|
||||
if b.Buffered() == 0 && sw == nil && tryStringWriter {
|
||||
// Check at most once whether b.wr is a StringWriter.
|
||||
sw, tryStringWriter = b.wr.(io.StringWriter)
|
||||
}
|
||||
if b.Buffered() == 0 && tryStringWriter {
|
||||
// Large write, empty buffer, and the underlying writer supports
|
||||
// WriteString: forward the write to the underlying StringWriter.
|
||||
// This avoids an extra copy.
|
||||
n, b.err = sw.WriteString(s)
|
||||
} else {
|
||||
n = copy(b.buf[b.n:], s)
|
||||
b.n += n
|
||||
b.Flush()
|
||||
}
|
||||
n := copy(b.buf[b.n:], s)
|
||||
b.n += n
|
||||
nn += n
|
||||
s = s[n:]
|
||||
b.Flush()
|
||||
}
|
||||
if b.err != nil {
|
||||
return nn, b.err
|
||||
|
||||
@@ -762,67 +762,6 @@ func TestWriteString(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWriteStringStringWriter(t *testing.T) {
|
||||
const BufSize = 8
|
||||
{
|
||||
tw := &teststringwriter{}
|
||||
b := NewWriterSize(tw, BufSize)
|
||||
b.WriteString("1234")
|
||||
tw.check(t, "", "")
|
||||
b.WriteString("56789012") // longer than BufSize
|
||||
tw.check(t, "12345678", "") // but not enough (after filling the partially-filled buffer)
|
||||
b.Flush()
|
||||
tw.check(t, "123456789012", "")
|
||||
}
|
||||
{
|
||||
tw := &teststringwriter{}
|
||||
b := NewWriterSize(tw, BufSize)
|
||||
b.WriteString("123456789") // long string, empty buffer:
|
||||
tw.check(t, "", "123456789") // use WriteString
|
||||
}
|
||||
{
|
||||
tw := &teststringwriter{}
|
||||
b := NewWriterSize(tw, BufSize)
|
||||
b.WriteString("abc")
|
||||
tw.check(t, "", "")
|
||||
b.WriteString("123456789012345") // long string, non-empty buffer
|
||||
tw.check(t, "abc12345", "6789012345") // use Write and then WriteString since the remaining part is still longer than BufSize
|
||||
}
|
||||
{
|
||||
tw := &teststringwriter{}
|
||||
b := NewWriterSize(tw, BufSize)
|
||||
b.Write([]byte("abc")) // same as above, but use Write instead of WriteString
|
||||
tw.check(t, "", "")
|
||||
b.WriteString("123456789012345")
|
||||
tw.check(t, "abc12345", "6789012345") // same as above
|
||||
}
|
||||
}
|
||||
|
||||
type teststringwriter struct {
|
||||
write string
|
||||
writeString string
|
||||
}
|
||||
|
||||
func (w *teststringwriter) Write(b []byte) (int, error) {
|
||||
w.write += string(b)
|
||||
return len(b), nil
|
||||
}
|
||||
|
||||
func (w *teststringwriter) WriteString(s string) (int, error) {
|
||||
w.writeString += s
|
||||
return len(s), nil
|
||||
}
|
||||
|
||||
func (w *teststringwriter) check(t *testing.T, write, writeString string) {
|
||||
t.Helper()
|
||||
if w.write != write {
|
||||
t.Errorf("write: expected %q, got %q", write, w.write)
|
||||
}
|
||||
if w.writeString != writeString {
|
||||
t.Errorf("writeString: expected %q, got %q", writeString, w.writeString)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBufferFull(t *testing.T) {
|
||||
const longString = "And now, hello, world! It is the time for all good men to come to the aid of their party"
|
||||
buf := NewReaderSize(strings.NewReader(longString), minReadBufferSize)
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
// advanced arbitrarily far past the last token. Programs that need more
|
||||
// control over error handling or large tokens, or must run sequential scans
|
||||
// on a reader, should use bufio.Reader instead.
|
||||
//
|
||||
type Scanner struct {
|
||||
r io.Reader // The reader provided by the client.
|
||||
split SplitFunc // The function to split the tokens.
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package builtin provides documentation for Go's predeclared identifiers.
|
||||
The items documented here are not actually in package builtin
|
||||
but their descriptions here allow godoc to present documentation
|
||||
for the language's special identifiers.
|
||||
Package builtin provides documentation for Go's predeclared identifiers.
|
||||
The items documented here are not actually in package builtin
|
||||
but their descriptions here allow godoc to present documentation
|
||||
for the language's special identifiers.
|
||||
*/
|
||||
package builtin
|
||||
|
||||
@@ -137,12 +137,9 @@ type ComplexType complex64
|
||||
// new elements. If it does not, a new underlying array will be allocated.
|
||||
// Append returns the updated slice. It is therefore necessary to store the
|
||||
// result of append, often in the variable holding the slice itself:
|
||||
//
|
||||
// slice = append(slice, elem1, elem2)
|
||||
// slice = append(slice, anotherSlice...)
|
||||
//
|
||||
// As a special case, it is legal to append a string to a byte slice, like this:
|
||||
//
|
||||
// slice = append([]byte("hello "), "world"...)
|
||||
func append(slice []Type, elems ...Type) []Type
|
||||
|
||||
@@ -159,28 +156,24 @@ func copy(dst, src []Type) int
|
||||
func delete(m map[Type]Type1, key Type)
|
||||
|
||||
// The len built-in function returns the length of v, according to its type:
|
||||
//
|
||||
// Array: the number of elements in v.
|
||||
// Pointer to array: the number of elements in *v (even if v is nil).
|
||||
// Slice, or map: the number of elements in v; if v is nil, len(v) is zero.
|
||||
// String: the number of bytes in v.
|
||||
// Channel: the number of elements queued (unread) in the channel buffer;
|
||||
// if v is nil, len(v) is zero.
|
||||
//
|
||||
// For some arguments, such as a string literal or a simple array expression, the
|
||||
// result can be a constant. See the Go language specification's "Length and
|
||||
// capacity" section for details.
|
||||
func len(v Type) int
|
||||
|
||||
// The cap built-in function returns the capacity of v, according to its type:
|
||||
//
|
||||
// Array: the number of elements in v (same as len(v)).
|
||||
// Pointer to array: the number of elements in *v (same as len(v)).
|
||||
// Slice: the maximum length the slice can reach when resliced;
|
||||
// if v is nil, cap(v) is zero.
|
||||
// Channel: the channel buffer capacity, in units of elements;
|
||||
// if v is nil, cap(v) is zero.
|
||||
//
|
||||
// For some arguments, such as a simple array expression, the result can be a
|
||||
// constant. See the Go language specification's "Length and capacity" section for
|
||||
// details.
|
||||
@@ -191,7 +184,6 @@ func cap(v Type) int
|
||||
// value. Unlike new, make's return type is the same as the type of its
|
||||
// argument, not a pointer to it. The specification of the result depends on
|
||||
// the type:
|
||||
//
|
||||
// Slice: The size specifies the length. The capacity of the slice is
|
||||
// equal to its length. A second integer argument may be provided to
|
||||
// specify a different capacity; it must be no smaller than the
|
||||
@@ -233,9 +225,7 @@ func imag(c ComplexType) FloatType
|
||||
// the last sent value is received. After the last value has been received
|
||||
// from a closed channel c, any receive from c will succeed without
|
||||
// blocking, returning the zero value for the channel element. The form
|
||||
//
|
||||
// x, ok := <-c
|
||||
//
|
||||
// will also set ok to false for a closed channel.
|
||||
func close(c chan<- Type)
|
||||
|
||||
|
||||
@@ -138,8 +138,10 @@ func (b *Buffer) grow(n int) int {
|
||||
} else if c > maxInt-c-n {
|
||||
panic(ErrTooLarge)
|
||||
} else {
|
||||
// Add b.off to account for b.buf[:b.off] being sliced off the front.
|
||||
b.buf = growSlice(b.buf[b.off:], b.off+n)
|
||||
// Not enough space anywhere, we need to allocate.
|
||||
buf := makeSlice(2*c + n)
|
||||
copy(buf, b.buf[b.off:])
|
||||
b.buf = buf
|
||||
}
|
||||
// Restore b.off and len(b.buf).
|
||||
b.off = 0
|
||||
@@ -215,31 +217,16 @@ func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// growSlice grows b by n, preserving the original content of b.
|
||||
// If the allocation fails, it panics with ErrTooLarge.
|
||||
func growSlice(b []byte, n int) []byte {
|
||||
// makeSlice allocates a slice of size n. If the allocation fails, it panics
|
||||
// with ErrTooLarge.
|
||||
func makeSlice(n int) []byte {
|
||||
// If the make fails, give a known error.
|
||||
defer func() {
|
||||
if recover() != nil {
|
||||
panic(ErrTooLarge)
|
||||
}
|
||||
}()
|
||||
// TODO(http://golang.org/issue/51462): We should rely on the append-make
|
||||
// pattern so that the compiler can call runtime.growslice. For example:
|
||||
// return append(b, make([]byte, n)...)
|
||||
// This avoids unnecessary zero-ing of the first len(b) bytes of the
|
||||
// allocated slice, but this pattern causes b to escape onto the heap.
|
||||
//
|
||||
// Instead use the append-make pattern with a nil slice to ensure that
|
||||
// we allocate buffers rounded up to the closest size class.
|
||||
c := len(b) + n // ensure enough space for n elements
|
||||
if c < 2*cap(b) {
|
||||
// The growth rate has historically always been 2x. In the future,
|
||||
// we could rely purely on append to determine the growth rate.
|
||||
c = 2 * cap(b)
|
||||
}
|
||||
b2 := append([]byte(nil), make([]byte, c)...)
|
||||
copy(b2, b)
|
||||
return b2[:len(b)]
|
||||
return make([]byte, n)
|
||||
}
|
||||
|
||||
// WriteTo writes data to w until the buffer is drained or an error occurs.
|
||||
|
||||
@@ -672,18 +672,3 @@ func BenchmarkBufferFullSmallReads(b *testing.B) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkBufferWriteBlock(b *testing.B) {
|
||||
block := make([]byte, 1024)
|
||||
for _, n := range []int{1 << 12, 1 << 16, 1 << 20} {
|
||||
b.Run(fmt.Sprintf("N%d", n), func(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
var bb Buffer
|
||||
for bb.Len() < n {
|
||||
bb.Write(block)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func Compare(a, b []byte) int {
|
||||
// explode splits s into a slice of UTF-8 sequences, one per Unicode code point (still slices of bytes),
|
||||
// up to a maximum of n byte slices. Invalid UTF-8 sequences are chopped into individual bytes.
|
||||
func explode(s []byte, n int) [][]byte {
|
||||
if n <= 0 || n > len(s) {
|
||||
if n <= 0 {
|
||||
n = len(s)
|
||||
}
|
||||
a := make([][]byte, n)
|
||||
@@ -348,9 +348,6 @@ func genSplit(s, sep []byte, sepSave, n int) [][]byte {
|
||||
if n < 0 {
|
||||
n = Count(s, sep) + 1
|
||||
}
|
||||
if n > len(s)+1 {
|
||||
n = len(s) + 1
|
||||
}
|
||||
|
||||
a := make([][]byte, n)
|
||||
n--
|
||||
@@ -372,10 +369,9 @@ func genSplit(s, sep []byte, sepSave, n int) [][]byte {
|
||||
// the subslices between those separators.
|
||||
// If sep is empty, SplitN splits after each UTF-8 sequence.
|
||||
// The count determines the number of subslices to return:
|
||||
//
|
||||
// n > 0: at most n subslices; the last subslice will be the unsplit remainder.
|
||||
// n == 0: the result is nil (zero subslices)
|
||||
// n < 0: all subslices
|
||||
// n > 0: at most n subslices; the last subslice will be the unsplit remainder.
|
||||
// n == 0: the result is nil (zero subslices)
|
||||
// n < 0: all subslices
|
||||
//
|
||||
// To split around the first instance of a separator, see Cut.
|
||||
func SplitN(s, sep []byte, n int) [][]byte { return genSplit(s, sep, 0, n) }
|
||||
@@ -384,10 +380,9 @@ func SplitN(s, sep []byte, n int) [][]byte { return genSplit(s, sep, 0, n) }
|
||||
// returns a slice of those subslices.
|
||||
// If sep is empty, SplitAfterN splits after each UTF-8 sequence.
|
||||
// The count determines the number of subslices to return:
|
||||
//
|
||||
// n > 0: at most n subslices; the last subslice will be the unsplit remainder.
|
||||
// n == 0: the result is nil (zero subslices)
|
||||
// n < 0: all subslices
|
||||
// n > 0: at most n subslices; the last subslice will be the unsplit remainder.
|
||||
// n == 0: the result is nil (zero subslices)
|
||||
// n < 0: all subslices
|
||||
func SplitAfterN(s, sep []byte, n int) [][]byte {
|
||||
return genSplit(s, sep, len(sep), n)
|
||||
}
|
||||
@@ -1144,7 +1139,7 @@ func ReplaceAll(s, old, new []byte) []byte {
|
||||
}
|
||||
|
||||
// EqualFold reports whether s and t, interpreted as UTF-8 strings,
|
||||
// are equal under simple Unicode case-folding, which is a more general
|
||||
// are equal under Unicode case-folding, which is a more general
|
||||
// form of case-insensitivity.
|
||||
func EqualFold(s, t []byte) bool {
|
||||
for len(s) != 0 && len(t) != 0 {
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
. "bytes"
|
||||
"fmt"
|
||||
"internal/testenv"
|
||||
"math"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"strings"
|
||||
@@ -724,7 +723,6 @@ var splittests = []SplitTest{
|
||||
{"1 2", " ", 3, []string{"1", "2"}},
|
||||
{"123", "", 2, []string{"1", "23"}},
|
||||
{"123", "", 17, []string{"1", "2", "3"}},
|
||||
{"bT", "T", math.MaxInt / 4, []string{"b", ""}},
|
||||
}
|
||||
|
||||
func TestSplit(t *testing.T) {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
// just enough to support pprof.
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// go tool addr2line binary
|
||||
//
|
||||
// Addr2line reads hexadecimal addresses, one per line and with optional 0x prefix,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Api computes the exported API of a set of Go packages.
|
||||
// Binary api computes the exported API of a set of Go packages.
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
@@ -34,24 +33,21 @@ func goCmd() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
exeSuffix = ".exe"
|
||||
}
|
||||
if goroot := build.Default.GOROOT; goroot != "" {
|
||||
path := filepath.Join(goroot, "bin", "go"+exeSuffix)
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
return path
|
||||
}
|
||||
path := filepath.Join(runtime.GOROOT(), "bin", "go"+exeSuffix)
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
return path
|
||||
}
|
||||
return "go"
|
||||
}
|
||||
|
||||
// Flags
|
||||
var (
|
||||
checkFiles = flag.String("c", "", "optional comma-separated filename(s) to check API against")
|
||||
requireApproval = flag.String("approval", "", "require approvals in comma-separated list of `files`")
|
||||
allowNew = flag.Bool("allow_new", true, "allow API additions")
|
||||
exceptFile = flag.String("except", "", "optional filename of packages that are allowed to change without triggering a failure in the tool")
|
||||
nextFiles = flag.String("next", "", "comma-separated list of `files` for upcoming API features for the next release. These files can be lazily maintained. They only affects the delta warnings from the -c file printed on success.")
|
||||
verbose = flag.Bool("v", false, "verbose debugging")
|
||||
forceCtx = flag.String("contexts", "", "optional comma-separated list of <goos>-<goarch>[-cgo] to override default contexts.")
|
||||
checkFile = flag.String("c", "", "optional comma-separated filename(s) to check API against")
|
||||
allowNew = flag.Bool("allow_new", true, "allow API additions")
|
||||
exceptFile = flag.String("except", "", "optional filename of packages that are allowed to change without triggering a failure in the tool")
|
||||
nextFile = flag.String("next", "", "optional filename of tentative upcoming API features for the next release. This file can be lazily maintained. It only affects the delta warnings from the -c file printed on success.")
|
||||
verbose = flag.Bool("v", false, "verbose debugging")
|
||||
forceCtx = flag.String("contexts", "", "optional comma-separated list of <goos>-<goarch>[-cgo] to override default contexts.")
|
||||
)
|
||||
|
||||
// contexts are the default contexts which are scanned, unless
|
||||
@@ -129,14 +125,10 @@ var internalPkg = regexp.MustCompile(`(^|/)internal($|/)`)
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if build.Default.GOROOT == "" {
|
||||
log.Fatalf("GOROOT not found. (If binary was built with -trimpath, $GOROOT must be set.)")
|
||||
}
|
||||
|
||||
if !strings.Contains(runtime.Version(), "weekly") && !strings.Contains(runtime.Version(), "devel") {
|
||||
if *nextFiles != "" {
|
||||
fmt.Printf("Go version is %q, ignoring -next %s\n", runtime.Version(), *nextFiles)
|
||||
*nextFiles = ""
|
||||
if *nextFile != "" {
|
||||
fmt.Printf("Go version is %q, ignoring -next %s\n", runtime.Version(), *nextFile)
|
||||
*nextFile = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +201,7 @@ func main() {
|
||||
bw := bufio.NewWriter(os.Stdout)
|
||||
defer bw.Flush()
|
||||
|
||||
if *checkFiles == "" {
|
||||
if *checkFile == "" {
|
||||
sort.Strings(features)
|
||||
for _, f := range features {
|
||||
fmt.Fprintln(bw, f)
|
||||
@@ -218,15 +210,10 @@ func main() {
|
||||
}
|
||||
|
||||
var required []string
|
||||
for _, file := range strings.Split(*checkFiles, ",") {
|
||||
for _, file := range strings.Split(*checkFile, ",") {
|
||||
required = append(required, fileFeatures(file)...)
|
||||
}
|
||||
var optional []string
|
||||
if *nextFiles != "" {
|
||||
for _, file := range strings.Split(*nextFiles, ",") {
|
||||
optional = append(optional, fileFeatures(file)...)
|
||||
}
|
||||
}
|
||||
optional := fileFeatures(*nextFile)
|
||||
exception := fileFeatures(*exceptFile)
|
||||
fail = !compareAPI(bw, features, required, optional, exception, *allowNew)
|
||||
}
|
||||
@@ -353,13 +340,6 @@ func fileFeatures(filename string) []string {
|
||||
if filename == "" {
|
||||
return nil
|
||||
}
|
||||
needApproval := false
|
||||
for _, name := range strings.Split(*requireApproval, ",") {
|
||||
if filename == name {
|
||||
needApproval = true
|
||||
break
|
||||
}
|
||||
}
|
||||
bs, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Fatalf("Error reading file %s: %v", filename, err)
|
||||
@@ -368,23 +348,11 @@ func fileFeatures(filename string) []string {
|
||||
s = aliasReplacer.Replace(s)
|
||||
lines := strings.Split(s, "\n")
|
||||
var nonblank []string
|
||||
for i, line := range lines {
|
||||
for _, line := range lines {
|
||||
line = strings.TrimSpace(line)
|
||||
if line == "" || strings.HasPrefix(line, "#") {
|
||||
continue
|
||||
if line != "" && !strings.HasPrefix(line, "#") {
|
||||
nonblank = append(nonblank, line)
|
||||
}
|
||||
if needApproval {
|
||||
feature, approval, ok := strings.Cut(line, "#")
|
||||
if !ok {
|
||||
log.Fatalf("%s:%d: missing proposal approval\n", filename, i+1)
|
||||
}
|
||||
_, err := strconv.Atoi(approval)
|
||||
if err != nil {
|
||||
log.Fatalf("%s:%d: malformed proposal approval #%s\n", filename, i+1, approval)
|
||||
}
|
||||
line = strings.TrimSpace(feature)
|
||||
}
|
||||
nonblank = append(nonblank, line)
|
||||
}
|
||||
return nonblank
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build boringcrypto
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func init() {
|
||||
fmt.Printf("SKIP with boringcrypto enabled\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/build"
|
||||
"internal/testenv"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
@@ -23,7 +22,6 @@ func TestMain(m *testing.M) {
|
||||
for _, c := range contexts {
|
||||
c.Compiler = build.Default.Compiler
|
||||
}
|
||||
build.Default.GOROOT = testenv.GOROOT(nil)
|
||||
|
||||
// Warm up the import cache in parallel.
|
||||
var wg sync.WaitGroup
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -42,65 +41,51 @@ func main() {
|
||||
if goroot == "" {
|
||||
log.Fatal("No $GOROOT set.")
|
||||
}
|
||||
if err := os.Chdir(filepath.Join(goroot, "api")); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
files, err := filepath.Glob("go1*.txt")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
next, err := filepath.Glob(filepath.Join("next", "*.txt"))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
cmd := exec.Command(goCmd(), "tool", "api",
|
||||
"-c", strings.Join(files, ","),
|
||||
"-approval", strings.Join(append(approvalNeeded(files), next...), ","),
|
||||
allowNew(),
|
||||
"-next", strings.Join(next, ","),
|
||||
"-except", "except.txt",
|
||||
)
|
||||
out, err := cmd.CombinedOutput()
|
||||
apiDir := filepath.Join(goroot, "api")
|
||||
out, err := exec.Command(goCmd(), "tool", "api",
|
||||
"-c", findAPIDirFiles(apiDir),
|
||||
allowNew(apiDir),
|
||||
"-next", filepath.Join(apiDir, "next.txt"),
|
||||
"-except", filepath.Join(apiDir, "except.txt")).CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatalf("Error running API checker: %v\n%s", err, out)
|
||||
}
|
||||
fmt.Print(string(out))
|
||||
}
|
||||
|
||||
func approvalNeeded(files []string) []string {
|
||||
var out []string
|
||||
for _, f := range files {
|
||||
name := filepath.Base(f)
|
||||
if name == "go1.txt" {
|
||||
continue
|
||||
}
|
||||
minor := strings.TrimSuffix(strings.TrimPrefix(name, "go1."), ".txt")
|
||||
n, err := strconv.Atoi(minor)
|
||||
if err != nil {
|
||||
log.Fatalf("unexpected api file: %v", f)
|
||||
}
|
||||
if n >= 19 { // approvals started being tracked in Go 1.19
|
||||
out = append(out, f)
|
||||
// findAPIDirFiles returns a comma-separated list of Go API files
|
||||
// (go1.txt, go1.1.txt, etc.) located in apiDir.
|
||||
func findAPIDirFiles(apiDir string) string {
|
||||
dir, err := os.Open(apiDir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer dir.Close()
|
||||
fs, err := dir.Readdirnames(-1)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var apiFiles []string
|
||||
for _, fn := range fs {
|
||||
if strings.HasPrefix(fn, "go1") {
|
||||
apiFiles = append(apiFiles, filepath.Join(apiDir, fn))
|
||||
}
|
||||
}
|
||||
return out
|
||||
return strings.Join(apiFiles, ",")
|
||||
}
|
||||
|
||||
// allowNew returns the -allow_new flag to use for the 'go tool api' invocation.
|
||||
func allowNew() string {
|
||||
// Experiment for Go 1.19: always require api file updates.
|
||||
return "-allow_new=false"
|
||||
|
||||
func allowNew(apiDir string) string {
|
||||
// Verify that the api/go1.n.txt for previous Go version exists.
|
||||
// It definitely should, otherwise it's a signal that the logic below may be outdated.
|
||||
if _, err := os.Stat(fmt.Sprintf("go1.%d.txt", goversion.Version-1)); err != nil {
|
||||
if _, err := os.Stat(filepath.Join(apiDir, fmt.Sprintf("go1.%d.txt", goversion.Version-1))); err != nil {
|
||||
log.Fatalln("Problem with api file for previous release:", err)
|
||||
}
|
||||
|
||||
// See whether the api/go1.n.txt for this Go version has been created.
|
||||
// (As of April 2021, it gets created during the release of the first Beta.)
|
||||
_, err := os.Stat(fmt.Sprintf("go1.%d.txt", goversion.Version))
|
||||
_, err := os.Stat(filepath.Join(apiDir, fmt.Sprintf("go1.%d.txt", goversion.Version)))
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
// It doesn't exist, so we're in development or before Beta 1.
|
||||
// At this stage, unmentioned API additions are deemed okay.
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Asm, typically invoked as “go tool asm”, assembles the source file into an object
|
||||
Asm, typically invoked as ``go tool asm'', assembles the source file into an object
|
||||
file named for the basename of the argument source file with a .o suffix. The
|
||||
object file can then be combined with other objects into a package archive.
|
||||
|
||||
# Command Line
|
||||
Command Line
|
||||
|
||||
Usage:
|
||||
|
||||
|
||||
@@ -278,7 +278,46 @@ func archArm64() *Arch {
|
||||
}
|
||||
|
||||
register["LR"] = arm64.REGLINK
|
||||
register["DAIFSet"] = arm64.REG_DAIFSet
|
||||
register["DAIFClr"] = arm64.REG_DAIFClr
|
||||
register["PLDL1KEEP"] = arm64.REG_PLDL1KEEP
|
||||
register["PLDL1STRM"] = arm64.REG_PLDL1STRM
|
||||
register["PLDL2KEEP"] = arm64.REG_PLDL2KEEP
|
||||
register["PLDL2STRM"] = arm64.REG_PLDL2STRM
|
||||
register["PLDL3KEEP"] = arm64.REG_PLDL3KEEP
|
||||
register["PLDL3STRM"] = arm64.REG_PLDL3STRM
|
||||
register["PLIL1KEEP"] = arm64.REG_PLIL1KEEP
|
||||
register["PLIL1STRM"] = arm64.REG_PLIL1STRM
|
||||
register["PLIL2KEEP"] = arm64.REG_PLIL2KEEP
|
||||
register["PLIL2STRM"] = arm64.REG_PLIL2STRM
|
||||
register["PLIL3KEEP"] = arm64.REG_PLIL3KEEP
|
||||
register["PLIL3STRM"] = arm64.REG_PLIL3STRM
|
||||
register["PSTL1KEEP"] = arm64.REG_PSTL1KEEP
|
||||
register["PSTL1STRM"] = arm64.REG_PSTL1STRM
|
||||
register["PSTL2KEEP"] = arm64.REG_PSTL2KEEP
|
||||
register["PSTL2STRM"] = arm64.REG_PSTL2STRM
|
||||
register["PSTL3KEEP"] = arm64.REG_PSTL3KEEP
|
||||
register["PSTL3STRM"] = arm64.REG_PSTL3STRM
|
||||
|
||||
// Conditional operators, like EQ, NE, etc.
|
||||
register["EQ"] = arm64.COND_EQ
|
||||
register["NE"] = arm64.COND_NE
|
||||
register["HS"] = arm64.COND_HS
|
||||
register["CS"] = arm64.COND_HS
|
||||
register["LO"] = arm64.COND_LO
|
||||
register["CC"] = arm64.COND_LO
|
||||
register["MI"] = arm64.COND_MI
|
||||
register["PL"] = arm64.COND_PL
|
||||
register["VS"] = arm64.COND_VS
|
||||
register["VC"] = arm64.COND_VC
|
||||
register["HI"] = arm64.COND_HI
|
||||
register["LS"] = arm64.COND_LS
|
||||
register["GE"] = arm64.COND_GE
|
||||
register["LT"] = arm64.COND_LT
|
||||
register["GT"] = arm64.COND_GT
|
||||
register["LE"] = arm64.COND_LE
|
||||
register["AL"] = arm64.COND_AL
|
||||
register["NV"] = arm64.COND_NV
|
||||
// Pseudo-registers.
|
||||
register["SB"] = RSB
|
||||
register["FP"] = RFP
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"cmd/internal/obj"
|
||||
"cmd/internal/obj/arm64"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var arm64LS = map[string]uint8{
|
||||
@@ -53,35 +52,7 @@ func jumpArm64(word string) bool {
|
||||
return arm64Jump[word]
|
||||
}
|
||||
|
||||
var arm64SpecialOperand map[string]arm64.SpecialOperand
|
||||
|
||||
// GetARM64SpecialOperand returns the internal representation of a special operand.
|
||||
func GetARM64SpecialOperand(name string) arm64.SpecialOperand {
|
||||
if arm64SpecialOperand == nil {
|
||||
// Generate the mapping automatically when the first time the function is called.
|
||||
arm64SpecialOperand = map[string]arm64.SpecialOperand{}
|
||||
for opd := arm64.SPOP_BEGIN; opd < arm64.SPOP_END; opd++ {
|
||||
s := fmt.Sprintf("%s", opd)
|
||||
arm64SpecialOperand[s] = opd
|
||||
}
|
||||
|
||||
// Handle some special cases.
|
||||
specialMapping := map[string]arm64.SpecialOperand{
|
||||
// The internal representation of CS(CC) and HS(LO) are the same.
|
||||
"CS": arm64.SPOP_HS,
|
||||
"CC": arm64.SPOP_LO,
|
||||
}
|
||||
for s, opd := range specialMapping {
|
||||
arm64SpecialOperand[s] = opd
|
||||
}
|
||||
}
|
||||
if opd, ok := arm64SpecialOperand[name]; ok {
|
||||
return opd
|
||||
}
|
||||
return arm64.SPOP_END
|
||||
}
|
||||
|
||||
// IsARM64CMP reports whether the op (as defined by an arm64.A* constant) is
|
||||
// IsARM64CMP reports whether the op (as defined by an arm.A* constant) is
|
||||
// one of the comparison instructions that require special handling.
|
||||
func IsARM64CMP(op obj.As) bool {
|
||||
switch op {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func jumpPPC64(word string) bool {
|
||||
switch word {
|
||||
case "BC", "BCL", "BEQ", "BGE", "BGT", "BL", "BLE", "BLT", "BNE", "BR", "BVC", "BVS", "BDNZ", "BDZ", "CALL", "JMP":
|
||||
case "BC", "BCL", "BEQ", "BGE", "BGT", "BL", "BLE", "BLT", "BNE", "BR", "BVC", "BVS", "CALL", "JMP":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"cmd/asm/internal/flags"
|
||||
"cmd/asm/internal/lex"
|
||||
"cmd/internal/obj"
|
||||
"cmd/internal/obj/arm64"
|
||||
"cmd/internal/obj/x86"
|
||||
"cmd/internal/src"
|
||||
"cmd/internal/sys"
|
||||
@@ -162,7 +161,7 @@ func (p *Parser) nextToken() lex.ScanToken {
|
||||
|
||||
// line consumes a single assembly line from p.lex of the form
|
||||
//
|
||||
// {label:} WORD[.cond] [ arg {, arg} ] (';' | '\n')
|
||||
// {label:} WORD[.cond] [ arg {, arg} ] (';' | '\n')
|
||||
//
|
||||
// It adds any labels to p.pendingLabels and returns the word, cond,
|
||||
// operand list, and true. If there is an error or EOF, it returns
|
||||
@@ -390,19 +389,8 @@ func (p *Parser) operand(a *obj.Addr) {
|
||||
tok := p.next()
|
||||
name := tok.String()
|
||||
if tok.ScanToken == scanner.Ident && !p.atStartOfRegister(name) {
|
||||
switch p.arch.Family {
|
||||
case sys.ARM64:
|
||||
// arm64 special operands.
|
||||
if opd := arch.GetARM64SpecialOperand(name); opd != arm64.SPOP_END {
|
||||
a.Type = obj.TYPE_SPECIAL
|
||||
a.Offset = int64(opd)
|
||||
break
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
// We have a symbol. Parse $sym±offset(symkind)
|
||||
p.symbolReference(a, name, prefix)
|
||||
}
|
||||
// We have a symbol. Parse $sym±offset(symkind)
|
||||
p.symbolReference(a, name, prefix)
|
||||
// fmt.Printf("SYM %s\n", obj.Dconv(&emptyProg, 0, a))
|
||||
if p.peek() == scanner.EOF {
|
||||
return
|
||||
@@ -855,6 +843,7 @@ func (p *Parser) setPseudoRegister(addr *obj.Addr, reg string, isStatic bool, pr
|
||||
//
|
||||
// Anything else beginning with "<" logs an error if issueError is
|
||||
// true, otherwise returns (false, obj.ABI0).
|
||||
//
|
||||
func (p *Parser) symRefAttrs(name string, issueError bool) (bool, obj.ABI) {
|
||||
abi := obj.ABI0
|
||||
isStatic := false
|
||||
@@ -891,7 +880,7 @@ func (p *Parser) symRefAttrs(name string, issueError bool) (bool, obj.ABI) {
|
||||
// constrained form of the operand syntax that's always SB-based,
|
||||
// non-static, and has at most a simple integer offset:
|
||||
//
|
||||
// [$|*]sym[<abi>][+Int](SB)
|
||||
// [$|*]sym[<abi>][+Int](SB)
|
||||
func (p *Parser) funcAddress() (string, obj.ABI, bool) {
|
||||
switch p.peek() {
|
||||
case '$', '*':
|
||||
@@ -1041,13 +1030,9 @@ func (p *Parser) registerIndirect(a *obj.Addr, prefix rune) {
|
||||
//
|
||||
// For 386/AMD64 register list specifies 4VNNIW-style multi-source operand.
|
||||
// For range of 4 elements, Intel manual uses "+3" notation, for example:
|
||||
//
|
||||
// VP4DPWSSDS zmm1{k1}{z}, zmm2+3, m128
|
||||
//
|
||||
// Given asm line:
|
||||
//
|
||||
// VP4DPWSSDS Z5, [Z10-Z13], (AX)
|
||||
//
|
||||
// zmm2 is Z10, and Z13 is the only valid value for it (Z10+3).
|
||||
// Only simple ranges are accepted, like [Z0-Z3].
|
||||
//
|
||||
|
||||
119
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
119
src/cmd/asm/internal/asm/testdata/arm64.s
vendored
@@ -241,10 +241,6 @@ TEXT foo(SB), DUPOK|NOSPLIT, $-8
|
||||
FADDS F2, F3, F4 // 6428221e
|
||||
FADDD F1, F2 // 4228611e
|
||||
VDUP V19.S[0], V17.S4 // 7106044e
|
||||
VTRN1 V3.D2, V2.D2, V20.D2 // 5428c34e
|
||||
VTRN2 V3.D2, V2.D2, V21.D2 // 5568c34e
|
||||
VTRN1 V5.D2, V4.D2, V22.D2 // 9628c54e
|
||||
VTRN2 V5.D2, V4.D2, V23.D2 // 9768c54e
|
||||
|
||||
|
||||
// special
|
||||
@@ -628,8 +624,7 @@ again:
|
||||
CSELW LT, R2, R3, R4 // 44b0831a
|
||||
CSINC GT, R1, ZR, R3 // 23c49f9a
|
||||
CSNEG MI, R1, R2, R3 // 234482da
|
||||
CSINV CS, R1, R2, R3 // CSINV HS, R1, R2, R3 // 232082da
|
||||
CSINV HS, R1, R2, R3 // 232082da
|
||||
CSINV CS, R1, R2, R3 // CSINV HS, R1, R2, R3 // 232082da
|
||||
CSINVW MI, R2, ZR, R2 // 42409f5a
|
||||
CINC EQ, R4, R9 // 8914849a
|
||||
CINCW PL, R2, ZR // 5f44821a
|
||||
@@ -1628,116 +1623,4 @@ again:
|
||||
MSR R13, ZCR_EL1 // 0d1218d5
|
||||
MRS ZCR_EL1, R23 // 171238d5
|
||||
MSR R17, ZCR_EL1 // 111218d5
|
||||
SYS $32768, R1 // 018008d5
|
||||
SYS $32768 // 1f8008d5
|
||||
|
||||
// TLBI instruction
|
||||
TLBI VMALLE1IS // 1f8308d5
|
||||
TLBI VMALLE1 // 1f8708d5
|
||||
TLBI ALLE2IS // 1f830cd5
|
||||
TLBI ALLE1IS // 9f830cd5
|
||||
TLBI VMALLS12E1IS // df830cd5
|
||||
TLBI ALLE2 // 1f870cd5
|
||||
TLBI ALLE1 // 9f870cd5
|
||||
TLBI VMALLS12E1 // df870cd5
|
||||
TLBI ALLE3IS // 1f830ed5
|
||||
TLBI ALLE3 // 1f870ed5
|
||||
TLBI VMALLE1OS // 1f8108d5
|
||||
TLBI ALLE2OS // 1f810cd5
|
||||
TLBI ALLE1OS // 9f810cd5
|
||||
TLBI VMALLS12E1OS // df810cd5
|
||||
TLBI ALLE3OS // 1f810ed5
|
||||
TLBI VAE1IS, R0 // 208308d5
|
||||
TLBI ASIDE1IS, R1 // 418308d5
|
||||
TLBI VAAE1IS, R2 // 628308d5
|
||||
TLBI VALE1IS, R3 // a38308d5
|
||||
TLBI VAALE1IS, R4 // e48308d5
|
||||
TLBI VAE1, R5 // 258708d5
|
||||
TLBI ASIDE1, R6 // 468708d5
|
||||
TLBI VAAE1, R7 // 678708d5
|
||||
TLBI VALE1, R8 // a88708d5
|
||||
TLBI VAALE1, R9 // e98708d5
|
||||
TLBI IPAS2E1IS, R10 // 2a800cd5
|
||||
TLBI IPAS2LE1IS, R11 // ab800cd5
|
||||
TLBI VAE2IS, R12 // 2c830cd5
|
||||
TLBI VALE2IS, R13 // ad830cd5
|
||||
TLBI IPAS2E1, R14 // 2e840cd5
|
||||
TLBI IPAS2LE1, R15 // af840cd5
|
||||
TLBI VAE2, R16 // 30870cd5
|
||||
TLBI VALE2, R17 // b1870cd5
|
||||
TLBI VAE3IS, ZR // 3f830ed5
|
||||
TLBI VALE3IS, R19 // b3830ed5
|
||||
TLBI VAE3, R20 // 34870ed5
|
||||
TLBI VALE3, R21 // b5870ed5
|
||||
TLBI VAE1OS, R22 // 368108d5
|
||||
TLBI ASIDE1OS, R23 // 578108d5
|
||||
TLBI VAAE1OS, R24 // 788108d5
|
||||
TLBI VALE1OS, R25 // b98108d5
|
||||
TLBI VAALE1OS, R26 // fa8108d5
|
||||
TLBI RVAE1IS, R27 // 3b8208d5
|
||||
TLBI RVAAE1IS, ZR // 7f8208d5
|
||||
TLBI RVALE1IS, R29 // bd8208d5
|
||||
TLBI RVAALE1IS, R30 // fe8208d5
|
||||
TLBI RVAE1OS, ZR // 3f8508d5
|
||||
TLBI RVAAE1OS, R0 // 608508d5
|
||||
TLBI RVALE1OS, R1 // a18508d5
|
||||
TLBI RVAALE1OS, R2 // e28508d5
|
||||
TLBI RVAE1, R3 // 238608d5
|
||||
TLBI RVAAE1, R4 // 648608d5
|
||||
TLBI RVALE1, R5 // a58608d5
|
||||
TLBI RVAALE1, R6 // e68608d5
|
||||
TLBI RIPAS2E1IS, R7 // 47800cd5
|
||||
TLBI RIPAS2LE1IS, R8 // c8800cd5
|
||||
TLBI VAE2OS, R9 // 29810cd5
|
||||
TLBI VALE2OS, R10 // aa810cd5
|
||||
TLBI RVAE2IS, R11 // 2b820cd5
|
||||
TLBI RVALE2IS, R12 // ac820cd5
|
||||
TLBI IPAS2E1OS, R13 // 0d840cd5
|
||||
TLBI RIPAS2E1, R14 // 4e840cd5
|
||||
TLBI RIPAS2E1OS, R15 // 6f840cd5
|
||||
TLBI IPAS2LE1OS, R16 // 90840cd5
|
||||
TLBI RIPAS2LE1, R17 // d1840cd5
|
||||
TLBI RIPAS2LE1OS, ZR // ff840cd5
|
||||
TLBI RVAE2OS, R19 // 33850cd5
|
||||
TLBI RVALE2OS, R20 // b4850cd5
|
||||
TLBI RVAE2, R21 // 35860cd5
|
||||
TLBI RVALE2, R22 // b6860cd5
|
||||
TLBI VAE3OS, R23 // 37810ed5
|
||||
TLBI VALE3OS, R24 // b8810ed5
|
||||
TLBI RVAE3IS, R25 // 39820ed5
|
||||
TLBI RVALE3IS, R26 // ba820ed5
|
||||
TLBI RVAE3OS, R27 // 3b850ed5
|
||||
TLBI RVALE3OS, ZR // bf850ed5
|
||||
TLBI RVAE3, R29 // 3d860ed5
|
||||
TLBI RVALE3, R30 // be860ed5
|
||||
|
||||
// DC instruction
|
||||
DC IVAC, R0 // 207608d5
|
||||
DC ISW, R1 // 417608d5
|
||||
DC CSW, R2 // 427a08d5
|
||||
DC CISW, R3 // 437e08d5
|
||||
DC ZVA, R4 // 24740bd5
|
||||
DC CVAC, R5 // 257a0bd5
|
||||
DC CVAU, R6 // 267b0bd5
|
||||
DC CIVAC, R7 // 277e0bd5
|
||||
DC IGVAC, R8 // 687608d5
|
||||
DC IGSW, R9 // 897608d5
|
||||
DC IGDVAC, R10 // aa7608d5
|
||||
DC IGDSW, R11 // cb7608d5
|
||||
DC CGSW, R12 // 8c7a08d5
|
||||
DC CGDSW, R13 // cd7a08d5
|
||||
DC CIGSW, R14 // 8e7e08d5
|
||||
DC CIGDSW, R15 // cf7e08d5
|
||||
DC GVA, R16 // 70740bd5
|
||||
DC GZVA, R17 // 91740bd5
|
||||
DC CGVAC, ZR // 7f7a0bd5
|
||||
DC CGDVAC, R19 // b37a0bd5
|
||||
DC CGVAP, R20 // 747c0bd5
|
||||
DC CGDVAP, R21 // b57c0bd5
|
||||
DC CGVADP, R22 // 767d0bd5
|
||||
DC CGDVADP, R23 // b77d0bd5
|
||||
DC CIGVAC, R24 // 787e0bd5
|
||||
DC CIGDVAC, R25 // b97e0bd5
|
||||
DC CVAP, R26 // 3a7c0bd5
|
||||
DC CVADP, R27 // 3b7d0bd5
|
||||
END
|
||||
|
||||
4
src/cmd/asm/internal/asm/testdata/arm64enc.s
vendored
4
src/cmd/asm/internal/asm/testdata/arm64enc.s
vendored
@@ -134,7 +134,7 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$-8
|
||||
CSINV LO, R2, R11, R14 // 4e308bda
|
||||
CSNEGW HS, R16, R29, R10 // 0a269d5a
|
||||
CSNEG NE, R21, R19, R11 // ab1693da
|
||||
DC IVAC, R1 // 217608d5
|
||||
//TODO DC
|
||||
DCPS1 $11378 // 418ea5d4
|
||||
DCPS2 $10699 // 6239a5d4
|
||||
DCPS3 $24415 // e3ebabd4
|
||||
@@ -397,7 +397,7 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$-8
|
||||
SXTH R17, R25 // 393e4093
|
||||
SXTW R0, R27 // 1b7c4093
|
||||
SYSL $285440, R12 // 0c5b2cd5
|
||||
TLBI VAE1IS, R1 // 218308d5
|
||||
//TODO TLBI
|
||||
TSTW $0x80000007, R9 // TSTW $2147483655, R9 // 3f0d0172
|
||||
TST $0xfffffff0, LR // TST $4294967280, R30 // df6f7cf2
|
||||
TSTW R10@>21, R2 // 5f54ca6a
|
||||
|
||||
14
src/cmd/asm/internal/asm/testdata/arm64error.s
vendored
14
src/cmd/asm/internal/asm/testdata/arm64error.s
vendored
@@ -417,8 +417,8 @@ TEXT errors(SB),$0
|
||||
CASPD (R2, R4), (R2), (R8, R9) // ERROR "source register pair must be contiguous"
|
||||
CASPD (R2, R3), (R2), (R8, R10) // ERROR "destination register pair must be contiguous"
|
||||
ADD R1>>2, RSP, R3 // ERROR "illegal combination"
|
||||
ADDS R2<<3, R3, RSP // ERROR "illegal destination register"
|
||||
CMP R1<<5, RSP // ERROR "shift amount out of range 0 to 4"
|
||||
ADDS R2<<3, R3, RSP // ERROR "unexpected SP reference"
|
||||
CMP R1<<5, RSP // ERROR "the left shift amount out of range 0 to 4"
|
||||
MOVD.P y+8(FP), R1 // ERROR "illegal combination"
|
||||
MOVD.W x-8(SP), R1 // ERROR "illegal combination"
|
||||
LDP.P x+8(FP), (R0, R1) // ERROR "illegal combination"
|
||||
@@ -432,14 +432,4 @@ TEXT errors(SB),$0
|
||||
STP (R26, R27), 700(R2) // ERROR "cannot use REGTMP as source"
|
||||
MOVK $0, R10 // ERROR "zero shifts cannot be handled correctly"
|
||||
MOVK $(0<<32), R10 // ERROR "zero shifts cannot be handled correctly"
|
||||
TLBI PLDL1KEEP // ERROR "illegal argument"
|
||||
TLBI VMALLE1IS, R0 // ERROR "extraneous register at operand 2"
|
||||
TLBI ALLE3OS, ZR // ERROR "extraneous register at operand 2"
|
||||
TLBI VAE1IS // ERROR "missing register at operand 2"
|
||||
TLBI RVALE3 // ERROR "missing register at operand 2"
|
||||
DC PLDL1KEEP // ERROR "illegal argument"
|
||||
DC VMALLE1IS // ERROR "illegal argument"
|
||||
DC VAE1IS // ERROR "illegal argument"
|
||||
DC VAE1IS, R0 // ERROR "illegal argument"
|
||||
DC IVAC // ERROR "missing register at operand 2"
|
||||
RET
|
||||
|
||||
28
src/cmd/asm/internal/asm/testdata/ppc64.s
vendored
28
src/cmd/asm/internal/asm/testdata/ppc64.s
vendored
@@ -751,23 +751,17 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
|
||||
MOVD XER, R3 // 7c6102a6
|
||||
MOVFL CR3, CR1 // 4c8c0000
|
||||
|
||||
MOVW CR0, R1 // 7c380026
|
||||
MOVW CR7, R1 // 7c301026
|
||||
MOVW CR, R1 // 7c200026
|
||||
MOVW CR0, R1 // 7c380026
|
||||
MOVW CR7, R1 // 7c301026
|
||||
MOVW CR, R1 // 7c200026
|
||||
|
||||
MOVW R1, CR // 7c2ff120
|
||||
MOVFL R1, CR // 7c2ff120
|
||||
MOVW R1, CR2 // 7c320120
|
||||
MOVFL R1, CR2 // 7c320120
|
||||
MOVFL R1, $255 // 7c2ff120
|
||||
MOVFL R1, $1 // 7c301120
|
||||
MOVFL R1, $128 // 7c380120
|
||||
MOVFL R1, $3 // 7c203120
|
||||
|
||||
// Verify supported bdnz/bdz encodings.
|
||||
BC 16,0,0(PC) // BC $16,R0,0(PC) // 42000000
|
||||
BDNZ 0(PC) // 42000000
|
||||
BDZ 0(PC) // 42400000
|
||||
BC 18,0,0(PC) // BC $18,R0,0(PC) // 42400000
|
||||
MOVW R1, CR // 7c2ff120
|
||||
MOVFL R1, CR // 7c2ff120
|
||||
MOVW R1, CR2 // 7c320120
|
||||
MOVFL R1, CR2 // 7c320120
|
||||
MOVFL R1, $255 // 7c2ff120
|
||||
MOVFL R1, $1 // 7c301120
|
||||
MOVFL R1, $128 // 7c380120
|
||||
MOVFL R1, $3 // 7c203120
|
||||
|
||||
RET
|
||||
|
||||
13
src/cmd/asm/internal/asm/testdata/riscv64.s
vendored
13
src/cmd/asm/internal/asm/testdata/riscv64.s
vendored
@@ -145,19 +145,6 @@ start:
|
||||
SRLW X5, X6, X7 // bb535300
|
||||
SUBW X5, X6, X7 // bb035340
|
||||
SRAW X5, X6, X7 // bb535340
|
||||
ADDIW $1, X6 // 1b031300
|
||||
SLLIW $1, X6 // 1b131300
|
||||
SRLIW $1, X6 // 1b531300
|
||||
SRAIW $1, X6 // 1b531340
|
||||
ADDW X5, X7 // bb835300
|
||||
SLLW X5, X7 // bb935300
|
||||
SRLW X5, X7 // bbd35300
|
||||
SUBW X5, X7 // bb835340
|
||||
SRAW X5, X7 // bbd35340
|
||||
ADDW $1, X6 // 1b031300
|
||||
SLLW $1, X6 // 1b131300
|
||||
SRLW $1, X6 // 1b531300
|
||||
SRAW $1, X6 // 1b531340
|
||||
|
||||
// 5.3: Load and Store Instructions (RV64I)
|
||||
LD (X5), X6 // 03b30200
|
||||
|
||||
@@ -22,9 +22,5 @@ TEXT errors(SB),$0
|
||||
MOVBU X5, (X6) // ERROR "unsupported unsigned store"
|
||||
MOVHU X5, (X6) // ERROR "unsupported unsigned store"
|
||||
MOVWU X5, (X6) // ERROR "unsupported unsigned store"
|
||||
MOVF F0, F1, F2 // ERROR "illegal MOV instruction"
|
||||
MOVD F0, F1, F2 // ERROR "illegal MOV instruction"
|
||||
MOV X10, X11, X12 // ERROR "illegal MOV instruction"
|
||||
MOVW X10, X11, X12 // ERROR "illegal MOV instruction"
|
||||
|
||||
RET
|
||||
|
||||
@@ -30,7 +30,6 @@ var (
|
||||
|
||||
var DebugFlags struct {
|
||||
MayMoreStack string `help:"call named function before all stack growth checks"`
|
||||
PCTab string `help:"print named pc-value table\nOne of: pctospadj, pctofile, pctoline, pctoinline, pctopcdata"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -50,7 +50,7 @@ func predefine(defines flags.MultiFlag) map[string]*Macro {
|
||||
// Set macros for GOEXPERIMENTs so we can easily switch
|
||||
// runtime assembly code based on them.
|
||||
if *flags.CompilingRuntime {
|
||||
for _, exp := range buildcfg.Experiment.Enabled() {
|
||||
for _, exp := range buildcfg.EnabledExperiments() {
|
||||
// Define macro.
|
||||
name := "GOEXPERIMENT_" + exp
|
||||
macros[name] = &Macro{
|
||||
|
||||
@@ -109,7 +109,7 @@ func (t *Tokenizer) Next() ScanToken {
|
||||
}
|
||||
text := s.TokenText()
|
||||
t.line += strings.Count(text, "\n")
|
||||
// TODO: Use constraint.IsGoBuild once #44505 fixed.
|
||||
// TODO: Use constraint.IsGoBuild once it exists.
|
||||
if strings.HasPrefix(text, "//go:build") {
|
||||
t.tok = BuildComment
|
||||
break
|
||||
|
||||
@@ -43,7 +43,6 @@ func main() {
|
||||
ctxt.Flag_linkshared = *flags.Linkshared
|
||||
ctxt.Flag_shared = *flags.Shared || *flags.Dynlink
|
||||
ctxt.Flag_maymorestack = flags.DebugFlags.MayMoreStack
|
||||
ctxt.Debugpcln = flags.DebugFlags.PCTab
|
||||
ctxt.IsAsm = true
|
||||
ctxt.Pkgpath = *flags.Importpath
|
||||
switch *flags.Spectre {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
Buildid displays or updates the build ID stored in a Go package or binary.
|
||||
|
||||
Usage:
|
||||
|
||||
go tool buildid [-w] file
|
||||
|
||||
By default, buildid prints the build ID found in the named file.
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
|
||||
Cgo enables the creation of Go packages that call C code.
|
||||
|
||||
# Using cgo with the go command
|
||||
Using cgo with the go command
|
||||
|
||||
To use cgo write normal Go code that imports a pseudo-package "C".
|
||||
The Go code can then refer to types such as C.size_t, variables such
|
||||
@@ -90,11 +91,11 @@ file. This allows pre-compiled static libraries to be included in the package
|
||||
directory and linked properly.
|
||||
For example if package foo is in the directory /go/src/foo:
|
||||
|
||||
// #cgo LDFLAGS: -L${SRCDIR}/libs -lfoo
|
||||
// #cgo LDFLAGS: -L${SRCDIR}/libs -lfoo
|
||||
|
||||
Will be expanded to:
|
||||
|
||||
// #cgo LDFLAGS: -L/go/src/foo/libs -lfoo
|
||||
// #cgo LDFLAGS: -L/go/src/foo/libs -lfoo
|
||||
|
||||
When the Go tool sees that one or more Go files use the special import
|
||||
"C", it will look for other non-Go files in the directory and compile
|
||||
@@ -138,7 +139,7 @@ or you can set the CC environment variable any time you run the go tool.
|
||||
The CXX_FOR_TARGET, CXX_FOR_${GOOS}_${GOARCH}, and CXX
|
||||
environment variables work in a similar way for C++ code.
|
||||
|
||||
# Go references to C
|
||||
Go references to C
|
||||
|
||||
Within the Go file, C's struct field names that are keywords in Go
|
||||
can be accessed by prefixing them with an underscore: if x points at a C
|
||||
@@ -290,7 +291,7 @@ the helper function crashes the program, like when Go itself runs out
|
||||
of memory. Because C.malloc cannot fail, it has no two-result form
|
||||
that returns errno.
|
||||
|
||||
# C references to Go
|
||||
C references to Go
|
||||
|
||||
Go functions can be exported for use by C code in the following way:
|
||||
|
||||
@@ -326,7 +327,7 @@ definitions and declarations, then the two output files will produce
|
||||
duplicate symbols and the linker will fail. To avoid this, definitions
|
||||
must be placed in preambles in other files, or in C source files.
|
||||
|
||||
# Passing pointers
|
||||
Passing pointers
|
||||
|
||||
Go is a garbage collected language, and the garbage collector needs to
|
||||
know the location of every pointer to Go memory. Because of this,
|
||||
@@ -397,7 +398,7 @@ passing uninitialized C memory to Go code if the Go code is going to
|
||||
store pointer values in it. Zero out the memory in C before passing it
|
||||
to Go.
|
||||
|
||||
# Special cases
|
||||
Special cases
|
||||
|
||||
A few special C types which would normally be represented by a pointer
|
||||
type in Go are instead represented by a uintptr. Those include:
|
||||
@@ -448,10 +449,9 @@ to auto-update code from Go 1.14 and earlier:
|
||||
|
||||
go tool fix -r eglconf <pkg>
|
||||
|
||||
# Using cgo directly
|
||||
Using cgo directly
|
||||
|
||||
Usage:
|
||||
|
||||
go tool cgo [cgo options] [-- compiler options] gofiles...
|
||||
|
||||
Cgo transforms the specified input Go source files into several output
|
||||
|
||||
@@ -114,11 +114,12 @@ func (p *Package) addToFlag(flag string, args []string) {
|
||||
//
|
||||
// For example, the following string:
|
||||
//
|
||||
// `a b:"c d" 'e''f' "g\""`
|
||||
// `a b:"c d" 'e''f' "g\""`
|
||||
//
|
||||
// Would be parsed as:
|
||||
//
|
||||
// []string{"a", "b:c d", "ef", `g"`}
|
||||
// []string{"a", "b:c d", "ef", `g"`}
|
||||
//
|
||||
func splitQuoted(s string) (r []string, err error) {
|
||||
var args []string
|
||||
arg := make([]rune, len(s))
|
||||
@@ -1137,19 +1138,13 @@ func (p *Package) mangle(f *File, arg *ast.Expr, addPosition bool) (ast.Expr, bo
|
||||
|
||||
// checkIndex checks whether arg has the form &a[i], possibly inside
|
||||
// type conversions. If so, then in the general case it writes
|
||||
//
|
||||
// _cgoIndexNN := a
|
||||
// _cgoNN := &cgoIndexNN[i] // with type conversions, if any
|
||||
//
|
||||
// _cgoIndexNN := a
|
||||
// _cgoNN := &cgoIndexNN[i] // with type conversions, if any
|
||||
// to sb, and writes
|
||||
//
|
||||
// _cgoCheckPointer(_cgoNN, _cgoIndexNN)
|
||||
//
|
||||
// _cgoCheckPointer(_cgoNN, _cgoIndexNN)
|
||||
// to sbCheck, and returns true. If a is a simple variable or field reference,
|
||||
// it writes
|
||||
//
|
||||
// _cgoIndexNN := &a
|
||||
//
|
||||
// _cgoIndexNN := &a
|
||||
// and dereferences the uses of _cgoIndexNN. Taking the address avoids
|
||||
// making a copy of an array.
|
||||
//
|
||||
@@ -1197,14 +1192,10 @@ func (p *Package) checkIndex(sb, sbCheck *bytes.Buffer, arg ast.Expr, i int) boo
|
||||
|
||||
// checkAddr checks whether arg has the form &x, possibly inside type
|
||||
// conversions. If so, it writes
|
||||
//
|
||||
// _cgoBaseNN := &x
|
||||
// _cgoNN := _cgoBaseNN // with type conversions, if any
|
||||
//
|
||||
// _cgoBaseNN := &x
|
||||
// _cgoNN := _cgoBaseNN // with type conversions, if any
|
||||
// to sb, and writes
|
||||
//
|
||||
// _cgoCheckPointer(_cgoBaseNN, true)
|
||||
//
|
||||
// _cgoCheckPointer(_cgoBaseNN, true)
|
||||
// to sbCheck, and returns true. This tells _cgoCheckPointer to check
|
||||
// just the contents of the pointer being passed, not any other part
|
||||
// of the memory allocation. This is run after checkIndex, which looks
|
||||
|
||||
@@ -16,11 +16,11 @@ import (
|
||||
)
|
||||
|
||||
// godefs returns the output for -godefs mode.
|
||||
func (p *Package) godefs(f *File, args []string) string {
|
||||
func (p *Package) godefs(f *File) string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
fmt.Fprintf(&buf, "// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n")
|
||||
fmt.Fprintf(&buf, "// %s %s\n", filepath.Base(args[0]), strings.Join(args[1:], " "))
|
||||
fmt.Fprintf(&buf, "// %s %s\n", filepath.Base(os.Args[0]), strings.Join(os.Args[1:], " "))
|
||||
fmt.Fprintf(&buf, "\n")
|
||||
|
||||
override := make(map[string]string)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
@@ -27,7 +28,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"cmd/internal/edit"
|
||||
"cmd/internal/notsha256"
|
||||
"cmd/internal/objabi"
|
||||
)
|
||||
|
||||
@@ -291,10 +291,6 @@ func main() {
|
||||
usage()
|
||||
}
|
||||
|
||||
// Save original command line arguments for the godefs generated comment. Relative file
|
||||
// paths in os.Args will be rewritten to absolute file paths in the loop below.
|
||||
osArgs := make([]string, len(os.Args))
|
||||
copy(osArgs, os.Args[:])
|
||||
goFiles := args[i:]
|
||||
|
||||
for _, arg := range args[:i] {
|
||||
@@ -329,8 +325,8 @@ func main() {
|
||||
// we use to coordinate between gcc and ourselves.
|
||||
// We already put _cgo_ at the beginning, so the main
|
||||
// concern is other cgo wrappers for the same functions.
|
||||
// Use the beginning of the notsha256 of the input to disambiguate.
|
||||
h := notsha256.New()
|
||||
// Use the beginning of the md5 of the input to disambiguate.
|
||||
h := md5.New()
|
||||
io.WriteString(h, *importPath)
|
||||
fs := make([]*File, len(goFiles))
|
||||
for i, input := range goFiles {
|
||||
@@ -394,7 +390,7 @@ func main() {
|
||||
p.PackagePath = f.Package
|
||||
p.Record(f)
|
||||
if *godefs {
|
||||
os.Stdout.WriteString(p.godefs(f, osArgs))
|
||||
os.Stdout.WriteString(p.godefs(f))
|
||||
} else {
|
||||
p.writeOutput(f, input)
|
||||
}
|
||||
|
||||
@@ -57,19 +57,18 @@ func (p *Package) writeDefs() {
|
||||
fflg.Close()
|
||||
|
||||
// Write C main file for using gcc to resolve imports.
|
||||
fmt.Fprintf(fm, "#include <stddef.h>\n") // For size_t below.
|
||||
fmt.Fprintf(fm, "int main() { return 0; }\n")
|
||||
if *importRuntimeCgo {
|
||||
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*) __attribute__((unused)), void *a __attribute__((unused)), int c __attribute__((unused)), size_t ctxt __attribute__((unused))) { }\n")
|
||||
fmt.Fprintf(fm, "size_t _cgo_wait_runtime_init_done(void) { return 0; }\n")
|
||||
fmt.Fprintf(fm, "void _cgo_release_context(size_t ctxt __attribute__((unused))) { }\n")
|
||||
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*) __attribute__((unused)), void *a __attribute__((unused)), int c __attribute__((unused)), __SIZE_TYPE__ ctxt __attribute__((unused))) { }\n")
|
||||
fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done(void) { return 0; }\n")
|
||||
fmt.Fprintf(fm, "void _cgo_release_context(__SIZE_TYPE__ ctxt __attribute__((unused))) { }\n")
|
||||
fmt.Fprintf(fm, "char* _cgo_topofstack(void) { return (char*)0; }\n")
|
||||
} else {
|
||||
// If we're not importing runtime/cgo, we *are* runtime/cgo,
|
||||
// which provides these functions. We just need a prototype.
|
||||
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*), void *a, int c, size_t ctxt);\n")
|
||||
fmt.Fprintf(fm, "size_t _cgo_wait_runtime_init_done(void);\n")
|
||||
fmt.Fprintf(fm, "void _cgo_release_context(size_t);\n")
|
||||
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*), void *a, int c, __SIZE_TYPE__ ctxt);\n")
|
||||
fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
|
||||
fmt.Fprintf(fm, "void _cgo_release_context(__SIZE_TYPE__);\n")
|
||||
}
|
||||
fmt.Fprintf(fm, "void _cgo_allocate(void *a __attribute__((unused)), int c __attribute__((unused))) { }\n")
|
||||
fmt.Fprintf(fm, "void _cgo_panic(void *a __attribute__((unused)), int c __attribute__((unused))) { }\n")
|
||||
@@ -887,9 +886,9 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
|
||||
fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wpragmas\"\n")
|
||||
fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Waddress-of-packed-member\"\n")
|
||||
|
||||
fmt.Fprintf(fgcc, "extern void crosscall2(void (*fn)(void *), void *, int, size_t);\n")
|
||||
fmt.Fprintf(fgcc, "extern size_t _cgo_wait_runtime_init_done(void);\n")
|
||||
fmt.Fprintf(fgcc, "extern void _cgo_release_context(size_t);\n\n")
|
||||
fmt.Fprintf(fgcc, "extern void crosscall2(void (*fn)(void *), void *, int, __SIZE_TYPE__);\n")
|
||||
fmt.Fprintf(fgcc, "extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
|
||||
fmt.Fprintf(fgcc, "extern void _cgo_release_context(__SIZE_TYPE__);\n\n")
|
||||
fmt.Fprintf(fgcc, "extern char* _cgo_topofstack(void);")
|
||||
fmt.Fprintf(fgcc, "%s\n", tsanProlog)
|
||||
fmt.Fprintf(fgcc, "%s\n", msanProlog)
|
||||
@@ -993,7 +992,7 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
|
||||
fmt.Fprintf(fgcc, "\nCGO_NO_SANITIZE_THREAD")
|
||||
fmt.Fprintf(fgcc, "\n%s\n", s)
|
||||
fmt.Fprintf(fgcc, "{\n")
|
||||
fmt.Fprintf(fgcc, "\tsize_t _cgo_ctxt = _cgo_wait_runtime_init_done();\n")
|
||||
fmt.Fprintf(fgcc, "\t__SIZE_TYPE__ _cgo_ctxt = _cgo_wait_runtime_init_done();\n")
|
||||
// The results part of the argument structure must be
|
||||
// initialized to 0 so the write barriers generated by
|
||||
// the assignments to these fields in Go are safe.
|
||||
@@ -1399,19 +1398,6 @@ func (p *Package) cgoType(e ast.Expr) *Type {
|
||||
case *ast.ChanType:
|
||||
return &Type{Size: p.PtrSize, Align: p.PtrSize, C: c("GoChan")}
|
||||
case *ast.Ident:
|
||||
goTypesFixup := func(r *Type) *Type {
|
||||
if r.Size == 0 { // int or uint
|
||||
rr := new(Type)
|
||||
*rr = *r
|
||||
rr.Size = p.IntSize
|
||||
rr.Align = p.IntSize
|
||||
r = rr
|
||||
}
|
||||
if r.Align > p.PtrSize {
|
||||
r.Align = p.PtrSize
|
||||
}
|
||||
return r
|
||||
}
|
||||
// Look up the type in the top level declarations.
|
||||
// TODO: Handle types defined within a function.
|
||||
for _, d := range p.Decl {
|
||||
@@ -1430,17 +1416,6 @@ func (p *Package) cgoType(e ast.Expr) *Type {
|
||||
}
|
||||
}
|
||||
if def := typedef[t.Name]; def != nil {
|
||||
if defgo, ok := def.Go.(*ast.Ident); ok {
|
||||
switch defgo.Name {
|
||||
case "complex64", "complex128":
|
||||
// MSVC does not support the _Complex keyword
|
||||
// nor the complex macro.
|
||||
// Use GoComplex64 and GoComplex128 instead,
|
||||
// which are typedef-ed to a compatible type.
|
||||
// See go.dev/issues/36233.
|
||||
return goTypesFixup(goTypes[defgo.Name])
|
||||
}
|
||||
}
|
||||
return def
|
||||
}
|
||||
if t.Name == "uintptr" {
|
||||
@@ -1454,7 +1429,17 @@ func (p *Package) cgoType(e ast.Expr) *Type {
|
||||
return &Type{Size: 2 * p.PtrSize, Align: p.PtrSize, C: c("GoInterface")}
|
||||
}
|
||||
if r, ok := goTypes[t.Name]; ok {
|
||||
return goTypesFixup(r)
|
||||
if r.Size == 0 { // int or uint
|
||||
rr := new(Type)
|
||||
*rr = *r
|
||||
rr.Size = p.IntSize
|
||||
rr.Align = p.IntSize
|
||||
r = rr
|
||||
}
|
||||
if r.Align > p.PtrSize {
|
||||
r.Align = p.PtrSize
|
||||
}
|
||||
return r
|
||||
}
|
||||
error_(e.Pos(), "unrecognized Go type %s", t.Name)
|
||||
return &Type{Size: 4, Align: 4, C: c("int")}
|
||||
@@ -1576,7 +1561,7 @@ var msanProlog = noMsanProlog
|
||||
|
||||
const builtinProlog = `
|
||||
#line 1 "cgo-builtin-prolog"
|
||||
#include <stddef.h>
|
||||
#include <stddef.h> /* for ptrdiff_t and size_t below */
|
||||
|
||||
/* Define intgo when compiling with GCC. */
|
||||
typedef ptrdiff_t intgo;
|
||||
@@ -1619,7 +1604,6 @@ const goStringDef = `
|
||||
//go:linkname _cgo_runtime_gostring runtime.gostring
|
||||
func _cgo_runtime_gostring(*_Ctype_char) string
|
||||
|
||||
// GoString converts the C string p into a Go string.
|
||||
func _Cfunc_GoString(p *_Ctype_char) string {
|
||||
return _cgo_runtime_gostring(p)
|
||||
}
|
||||
@@ -1629,7 +1613,6 @@ const goStringNDef = `
|
||||
//go:linkname _cgo_runtime_gostringn runtime.gostringn
|
||||
func _cgo_runtime_gostringn(*_Ctype_char, int) string
|
||||
|
||||
// GoStringN converts the C data p with explicit length l to a Go string.
|
||||
func _Cfunc_GoStringN(p *_Ctype_char, l _Ctype_int) string {
|
||||
return _cgo_runtime_gostringn(p, int(l))
|
||||
}
|
||||
@@ -1639,19 +1622,12 @@ const goBytesDef = `
|
||||
//go:linkname _cgo_runtime_gobytes runtime.gobytes
|
||||
func _cgo_runtime_gobytes(unsafe.Pointer, int) []byte
|
||||
|
||||
// GoBytes converts the C data p with explicit length l to a Go []byte.
|
||||
func _Cfunc_GoBytes(p unsafe.Pointer, l _Ctype_int) []byte {
|
||||
return _cgo_runtime_gobytes(p, int(l))
|
||||
}
|
||||
`
|
||||
|
||||
const cStringDef = `
|
||||
// CString converts the Go string s to a C string.
|
||||
//
|
||||
// The C string is allocated in the C heap using malloc.
|
||||
// It is the caller's responsibility to arrange for it to be
|
||||
// freed, such as by calling C.free (be sure to include stdlib.h
|
||||
// if C.free is needed).
|
||||
func _Cfunc_CString(s string) *_Ctype_char {
|
||||
p := _cgo_cmalloc(uint64(len(s)+1))
|
||||
pp := (*[1<<30]byte)(p)
|
||||
@@ -1662,12 +1638,6 @@ func _Cfunc_CString(s string) *_Ctype_char {
|
||||
`
|
||||
|
||||
const cBytesDef = `
|
||||
// CBytes converts the Go []byte slice b to a C array.
|
||||
//
|
||||
// The C array is allocated in the C heap using malloc.
|
||||
// It is the caller's responsibility to arrange for it to be
|
||||
// freed, such as by calling C.free (be sure to include stdlib.h
|
||||
// if C.free is needed).
|
||||
func _Cfunc_CBytes(b []byte) unsafe.Pointer {
|
||||
p := _cgo_cmalloc(uint64(len(b)))
|
||||
pp := (*[1<<30]byte)(p)
|
||||
@@ -1860,7 +1830,7 @@ void localCgoCheckResult(Eface val) {
|
||||
const builtinExportProlog = `
|
||||
#line 1 "cgo-builtin-export-prolog"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stddef.h> /* for ptrdiff_t below */
|
||||
|
||||
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
||||
#define GO_CGO_EXPORT_PROLOGUE_H
|
||||
@@ -1906,17 +1876,11 @@ typedef long long GoInt64;
|
||||
typedef unsigned long long GoUint64;
|
||||
typedef GoIntGOINTBITS GoInt;
|
||||
typedef GoUintGOINTBITS GoUint;
|
||||
typedef size_t GoUintptr;
|
||||
typedef __SIZE_TYPE__ GoUintptr;
|
||||
typedef float GoFloat32;
|
||||
typedef double GoFloat64;
|
||||
#ifdef _MSC_VER
|
||||
#include <complex.h>
|
||||
typedef _Fcomplex GoComplex64;
|
||||
typedef _Dcomplex GoComplex128;
|
||||
#else
|
||||
typedef float _Complex GoComplex64;
|
||||
typedef double _Complex GoComplex128;
|
||||
#endif
|
||||
|
||||
/*
|
||||
static assertion to make sure the file is being used on architecture
|
||||
@@ -1962,5 +1926,5 @@ static void GoInit(void) {
|
||||
runtime_iscgo = 1;
|
||||
}
|
||||
|
||||
extern size_t _cgo_wait_runtime_init_done(void) __attribute__ ((weak));
|
||||
extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void) __attribute__ ((weak));
|
||||
`
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Go internal ABI specification
|
||||
|
||||
Self-link: [go.dev/s/regabi](https://go.dev/s/regabi)
|
||||
|
||||
This document describes Go’s internal application binary interface
|
||||
(ABI), known as ABIInternal.
|
||||
Go's ABI defines the layout of data in memory and the conventions for
|
||||
@@ -32,19 +30,19 @@ specification](/doc/go_spec.html#Size_and_alignment_guarantees).
|
||||
Those that aren't guaranteed may change in future versions of Go (for
|
||||
example, we've considered changing the alignment of int64 on 32-bit).
|
||||
|
||||
| Type | 64-bit | | 32-bit | |
|
||||
|-----------------------------|--------|-------|--------|-------|
|
||||
| | Size | Align | Size | Align |
|
||||
| bool, uint8, int8 | 1 | 1 | 1 | 1 |
|
||||
| uint16, int16 | 2 | 2 | 2 | 2 |
|
||||
| uint32, int32 | 4 | 4 | 4 | 4 |
|
||||
| uint64, int64 | 8 | 8 | 8 | 4 |
|
||||
| int, uint | 8 | 8 | 4 | 4 |
|
||||
| float32 | 4 | 4 | 4 | 4 |
|
||||
| float64 | 8 | 8 | 8 | 4 |
|
||||
| complex64 | 8 | 4 | 8 | 4 |
|
||||
| complex128 | 16 | 8 | 16 | 4 |
|
||||
| uintptr, *T, unsafe.Pointer | 8 | 8 | 4 | 4 |
|
||||
| Type | 64-bit | | 32-bit | |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| | Size | Align | Size | Align |
|
||||
| bool, uint8, int8 | 1 | 1 | 1 | 1 |
|
||||
| uint16, int16 | 2 | 2 | 2 | 2 |
|
||||
| uint32, int32 | 4 | 4 | 4 | 4 |
|
||||
| uint64, int64 | 8 | 8 | 8 | 4 |
|
||||
| int, uint | 8 | 8 | 4 | 4 |
|
||||
| float32 | 4 | 4 | 4 | 4 |
|
||||
| float64 | 8 | 8 | 8 | 4 |
|
||||
| complex64 | 8 | 4 | 8 | 4 |
|
||||
| complex128 | 16 | 8 | 16 | 4 |
|
||||
| uintptr, *T, unsafe.Pointer | 8 | 8 | 4 | 4 |
|
||||
|
||||
The types `byte` and `rune` are aliases for `uint8` and `int32`,
|
||||
respectively, and hence have the same size and alignment as these
|
||||
@@ -732,57 +730,6 @@ The floating point status and control register (FPSCR) is initialized
|
||||
to 0 by the kernel at startup of the Go program and not changed by
|
||||
the Go generated code.
|
||||
|
||||
### riscv64 architecture
|
||||
|
||||
The riscv64 architecture uses X10 – X17, X8, X9, X18 – X23 for integer arguments
|
||||
and results.
|
||||
|
||||
It uses F10 – F17, F8, F9, F18 – F23 for floating-point arguments and results.
|
||||
|
||||
Special-purpose registers used within Go generated code and Go
|
||||
assembly code are as follows:
|
||||
|
||||
| Register | Call meaning | Return meaning | Body meaning |
|
||||
| --- | --- | --- | --- |
|
||||
| X0 | Zero value | Same | Same |
|
||||
| X1 | Link register | Link register | Scratch |
|
||||
| X2 | Stack pointer | Same | Same |
|
||||
| X3 | Global pointer | Same | Used by dynamic linker |
|
||||
| X4 | TLS (thread pointer) | TLS | Scratch |
|
||||
| X24,X25 | Scratch | Scratch | Used by duffcopy, duffzero |
|
||||
| X26 | Closure context pointer | Scratch | Scratch |
|
||||
| X27 | Current goroutine | Same | Same |
|
||||
| X31 | Scratch | Scratch | Scratch |
|
||||
|
||||
*Rationale*: These register meanings are compatible with Go’s
|
||||
stack-based calling convention. Context register X20 will change to X26,
|
||||
duffcopy, duffzero register will change to X24, X25 before this register ABI been adopted.
|
||||
X10 – X17, X8, X9, X18 – X23, is the same order as A0 – A7, S0 – S7 in platform ABI.
|
||||
F10 – F17, F8, F9, F18 – F23, is the same order as FA0 – FA7, FS0 – FS7 in platform ABI.
|
||||
X8 – X23, F8 – F15 are used for compressed instruction (RVC) which will benefit code size in the future.
|
||||
|
||||
#### Stack layout
|
||||
|
||||
The stack pointer, X2, grows down and is aligned to 8 bytes.
|
||||
|
||||
A function's stack frame, after the frame is created, is laid out as
|
||||
follows:
|
||||
|
||||
+------------------------------+
|
||||
| ... locals ... |
|
||||
| ... outgoing arguments ... |
|
||||
| return PC | ← X2 points to
|
||||
+------------------------------+ ↓ lower addresses
|
||||
|
||||
The "return PC" is loaded to the link register, X1, as part of the
|
||||
riscv64 `CALL` operation.
|
||||
|
||||
#### Flags
|
||||
|
||||
The riscv64 has Zicsr extension for control and status register (CSR) and
|
||||
treated as scratch register.
|
||||
All bits in CSR are system flags and are not modified by Go.
|
||||
|
||||
## Future directions
|
||||
|
||||
### Spill path improvements
|
||||
|
||||
@@ -219,13 +219,11 @@ calling the function.
|
||||
//go:uintptrescapes
|
||||
|
||||
The //go:uintptrescapes directive must be followed by a function declaration.
|
||||
It specifies that the function's uintptr arguments may be pointer values that
|
||||
have been converted to uintptr and must be on the heap and kept alive for the
|
||||
duration of the call, even though from the types alone it would appear that the
|
||||
object is no longer needed during the call. The conversion from pointer to
|
||||
uintptr must appear in the argument list of any call to this function. This
|
||||
directive is necessary for some low-level system call implementations and
|
||||
should be avoided otherwise.
|
||||
It specifies that the function's uintptr arguments may be pointer values
|
||||
that have been converted to uintptr and must be treated as such by the
|
||||
garbage collector. The conversion from pointer to uintptr must appear in
|
||||
the argument list of any call to this function. This directive is necessary
|
||||
for some low-level system call implementations and should be avoided otherwise.
|
||||
|
||||
//go:noinline
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user