• Russ Cox's avatar
    cmd/gc, runtime: treat slices and strings like pointers in garbage collection · 613383c7
    Russ Cox authored
    Before, a slice with cap=0 or a string with len=0 might have its
    base pointer pointing beyond the actual slice/string data into
    the next block. The collector had to ignore slices and strings with
    cap=0 in order to avoid misinterpreting the base pointer.
    
    Now, a slice with cap=0 or a string with len=0 still has a base
    pointer pointing into the actual slice/string data, no matter what.
    The collector can now always scan the pointer, which means
    strings and slices are no longer special.
    
    Fixes #8404.
    
    LGTM=khr, josharian
    R=josharian, khr, dvyukov
    CC=golang-codereviews
    https://golang.org/cl/112570044
    613383c7
Name
Last commit
Last update
..
Makefile Loading commit data...
cgen.c Loading commit data...
cgen64.c Loading commit data...
doc.go Loading commit data...
galign.c Loading commit data...
gg.h Loading commit data...
ggen.c Loading commit data...
gobj.c Loading commit data...
gsubr.c Loading commit data...
opt.h Loading commit data...
peep.c Loading commit data...
prog.c Loading commit data...
reg.c Loading commit data...