• Austin Clements's avatar
    runtime: initialize more fields of stack spans · 9741f027
    Austin Clements authored
    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: default avatarRick Hudson <rlh@golang.org>
    9741f027
stack.go 34.5 KB