]> Cypherpunks repositories - gostls13.git/commit
runtime: initialize more fields of stack spans
authorAustin Clements <austin@google.com>
Thu, 16 Mar 2017 18:55:10 +0000 (14:55 -0400)
committerAustin Clements <austin@google.com>
Wed, 5 Apr 2017 19:17:41 +0000 (19:17 +0000)
commit9741f0275c79786e16bdbe7b8ddfeecda421181f
treee8bf67e3a0bc304226ee1899bf54b238a11982c6
parent92cf05daf3c96c854f8e2a32d6734a91ef7bb865
runtime: initialize more fields of stack spans

Stack spans don't internally use many of the fields of the mspan,
which means things like the size class and element size get left over
from whatever last used the mspan. This can lead to confusing crashes
and debugging.

Zero these fields or initialize them to something reasonable. This
also lets us simplify some code that currently has to distinguish
between heap and stack spans.

Change-Id: I9bd114e76c147bb32de497045b932f8bf1988bbf
Reviewed-on: https://go-review.googlesource.com/38573
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mheap.go
src/runtime/stack.go