• Russ Cox's avatar
    cmd/ld: clear unused ctxt before morestack · c2dd33a4
    Russ Cox authored
    For non-closure functions, the context register is uninitialized
    on entry and will not be used, but morestack saves it and then the
    garbage collector treats it as live. This can be a source of memory
    leaks if the context register points at otherwise dead memory.
    Avoid this by introducing a parallel set of morestack functions
    that clear the context register, and use those for the non-closure functions.
    
    I hope this will help with some of the finalizer flakiness, but it probably won't.
    
    Fixes #7244.
    
    LGTM=dvyukov
    R=khr, dvyukov
    CC=golang-codereviews
    https://golang.org/cl/71030044
    c2dd33a4
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...