aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-10-18 17:29:37 -0400
committerAustin Clements <austin@google.com>2016-10-28 18:20:13 +0000
commitf4dcc9b29b052b99b97d0e445cda589f08bfc798 (patch)
tree1972b14266d11a91ed468880efb7a41ca84aac9f /src/runtime/string.go
parentaa581f51570b1c35dc2648226fd8de861de526d4 (diff)
downloadgo-f4dcc9b29b052b99b97d0e445cda589f08bfc798.tar.xz
runtime: make _MSpanDead be the zero state
Currently the zero value of an mspan is in the "in use" state. This seems like a bad idea in general. But it's going to wreak havoc when we make fixalloc zero allocations: even "freed" mspan objects are still on the allspans list and still get looked at by the garbage collector. Hence, if we leave the mspan states the way they are, allocating a span that reuses old memory will temporarily pass that span (which is visible to GC!) through the "in use" state, which can cause "unswept span" panics. Fix all of this by making the zero state "dead". Updates #17503. Change-Id: I77c7ac06e297af4b9e6258bc091c37abe102acc3 Reviewed-on: https://go-review.googlesource.com/31367 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/string.go')
0 files changed, 0 insertions, 0 deletions