]> Cypherpunks repositories - gostls13.git/commit
runtime: avoid read overrun in heapdump
authorRuss Cox <rsc@golang.org>
Tue, 9 Sep 2014 19:38:55 +0000 (15:38 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 9 Sep 2014 19:38:55 +0000 (15:38 -0400)
commit16c59acb9790b0d1d17ed45256b95fa60c2e55f1
tree9cdea4f7f4e700fde1d191ac9fb804053991d411
parentd33ee0c5e52cbdc66066f54b9b2e2c930268784a
runtime: avoid read overrun in heapdump

Start the stack a few words below the actual top, so that
if something tries to read goexit's caller PC from the stack,
it won't fault on a bad memory address.
Today, heapdump does that.
Maybe tomorrow, traceback or something else will do that.
Make it not a bug.

TBR=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/136450043
src/runtime/proc.c