diff options
| author | Filippo Valsorda <filippo@golang.org> | 2021-05-12 19:23:21 +0200 |
|---|---|---|
| committer | Filippo Valsorda <filippo@golang.org> | 2021-05-13 12:59:22 -0400 |
| commit | ed1f812cefc3ece4b21241ba4cba0272cd2484ed (patch) | |
| tree | 2e336c94eb9797488234c0cb86b123c1c5f2932b /src/runtime/mpagealloc.go | |
| parent | ad1b6f3ee00ce2592503efec7a9793c4786f6274 (diff) | |
| parent | 9d0819b27ca248f9949e7cf6bf7cb9fe7cf574e8 (diff) | |
| download | go-ed1f812cefc3ece4b21241ba4cba0272cd2484ed.tar.xz | |
[dev.boringcrypto] all: merge commit 9d0819b27c (CL 314609) into dev.boringcrypto
There used to be two BoringCrypto-specific behaviors related to cipher
suites in crypto/tls:
1. in FIPS-only mode, only a restricted set of AES ciphers is allowed
2. NOT in FIPS-only mode, AES would be prioritized over ChaCha20 even if
AES hardware was not available
The motivation of (2) is unclear, and BoringSSL doesn't have equivalent
logic. This merge drops (2), and keeps (1). Note that the list of
FIPS-only ciphers does not have priority semantics anymore, but the
default logic still sorts them the same way as they used to be.
Change-Id: I50544011085cfa2b087f323aebf5338c0bd2dd33
Diffstat (limited to 'src/runtime/mpagealloc.go')
| -rw-r--r-- | src/runtime/mpagealloc.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/mpagealloc.go b/src/runtime/mpagealloc.go index dac1f39969..071f1fc274 100644 --- a/src/runtime/mpagealloc.go +++ b/src/runtime/mpagealloc.go @@ -395,6 +395,9 @@ func (p *pageAlloc) grow(base, size uintptr) { // Store it atomically to avoid races with readers which // don't acquire the heap lock. r := sysAlloc(unsafe.Sizeof(*p.chunks[0]), p.sysStat) + if r == nil { + throw("pageAlloc: out of memory") + } atomic.StorepNoWB(unsafe.Pointer(&p.chunks[c.l1()]), r) } p.chunkOf(c).scavenged.setRange(0, pallocChunkPages) |
