• Austin Clements's avatar
    runtime: add deletion barriers on gobuf.ctxt · 70c107c6
    Austin Clements authored
    gobuf.ctxt is set to nil from many places in assembly code and these
    assignments require write barriers with the hybrid barrier.
    
    Conveniently, in most of these places ctxt should already be nil, in
    which case we don't need the barrier. This commit changes these places
    to assert that ctxt is already nil.
    
    gogo is more complicated, since ctxt may not already be nil. For gogo,
    we manually perform the write barrier if ctxt is not nil.
    
    Updates #17503.
    
    Change-Id: I9d75e27c75a1b7f8b715ad112fc5d45ffa856d30
    Reviewed-on: https://go-review.googlesource.com/31764Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
    70c107c6
asm_amd64p32.s 21.8 KB