• Austin Clements's avatar
    runtime: record extra information in throwOnGCWork crashes · 3c255e8b
    Austin Clements authored
    Currently we only know the slot address and the value being written in
    the throwOnGCWork crash tracebacks, and we have to infer the old value
    from what's dumped by gcWork.checkPut. Sometimes these old values
    don't make sense, like when we see a write of a nil pointer to a
    freshly-allocated object, yet we observe marking a value (where did
    that pointer come from?).
    
    This CL adds the old value of the slot and the first two pointers in
    the buffer to the traceback.
    
    For #27993.
    
    Change-Id: Ib70eead1afb9c06e8099e520172c3a2acaa45f80
    Reviewed-on: https://go-review.googlesource.com/c/154597
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMichael Knyszek <mknyszek@google.com>
    3c255e8b
mwbbuf.go 9.79 KB