• Keith Randall's avatar
    cmd/compile: fix mapassign_fast* routines for pointer keys · 48e207d5
    Keith Randall authored
    The signature of the mapassign_fast* routines need to distinguish
    the pointerness of their key argument.  If the affected routines
    suspend part way through, the object pointed to by the key might
    get garbage collected because the key is typed as a uint{32,64}.
    
    This is not a problem for mapaccess or mapdelete because the key
    in those situations do not live beyond the call involved.  If the
    object referenced by the key is garbage collected prematurely, the
    code still works fine.  Even if that object is subsequently reallocated,
    it can't be written to the map in time to affect the lookup/delete.
    
    Fixes #22781
    
    Change-Id: I0bbbc5e9883d5ce702faf4e655348be1191ee439
    Reviewed-on: https://go-review.googlesource.com/79018
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    Reviewed-by: 's avatarMartin Möhrmann <moehrmann@google.com>
    48e207d5
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
buildid Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
test2json Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...