Commit 1b41fcbc authored by Michael Anthony Knyszek's avatar Michael Anthony Knyszek Committed by Ian Lance Taylor
Browse files

[release-branch.go1.14] runtime: ensure allocToCache updates searchAddr in a valid way

Currently allocToCache assumes it can move the search address past the
block it allocated the cache from, which violates the property that
searchAddr should always point to mapped memory (i.e. memory represented
by pageAlloc.inUse).

This bug was already fixed once for pageAlloc.alloc in the Go 1.14
release via CL 216697, but that changed failed to take into account
allocToCache.

For #38605.
Fixes #38606.

Change-Id: Id08180aa10d19dc0f9f551a1d9e327a295560dff
Reviewed-on: https://go-review.googlesource.com/c/go/+/229577


Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
(cherry picked from commit 287d1ec9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/230377


Reviewed-by: default avatarAustin Clements <austin@google.com>
Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
parent c4b92691
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment