Gopher Robot submitted the change![Open in Gerrit]()
Change information
Commit message:
runtime: fix memclrNoHeapPointersPreemptible
memclrNoHeapPointersChunked was originally written for
clearing fresh allocations. It converts to uintptr early and thus
doesn't handle the case where the pointer points to the stack.
At the preemption point, the buffer being pointed to might be
on the stack and copied to a new location. Then we'd end up
zeroing random heap memory when we return from preemption.
Fix it to keep the pointer to the allocation in an unsafe.Pointer,
so it gets updated correctly on a stack copy.
Update #78081
(Fixes?)
Change-Id: Id25c7faf45f201929cb8c8bbcc7c8bd4f67c31ac
Change size: S
Delta: 1 file changed, 14 insertions(+), 9 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Keith Randall, +2 by Michael Pratt
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Id25c7faf45f201929cb8c8bbcc7c8bd4f67c31ac
Gerrit-Change-Number: 756122
Gerrit-PatchSet: 6