• Russ Cox's avatar
    cmd/dist: zero output variables on entry to goc2c functions · f94bff79
    Russ Cox authored
    Zeroing the outputs makes sure that during function calls
    in those functions we do not let the garbage collector
    treat uninitialized values as pointers.
    
    The garbage collector may still see uninitialized values
    if a preemption occurs during the function prologue,
    before the zeroing has had a chance to run.
    
    This reduces the number of 'bad pointer' messages when
    that runtime check is enabled, but it doesn't fix all of them,
    so the check is still disabled.
    
    It will also avoid leaks, although I doubt any of these were
    particularly serious.
    
    LGTM=iant, khr
    R=iant, khr
    CC=golang-codereviews
    https://golang.org/cl/80850044
    f94bff79
Name
Last commit
Last update
..
README Loading commit data...
a.h Loading commit data...
arg.h Loading commit data...
arm.c Loading commit data...
buf.c Loading commit data...
build.c Loading commit data...
buildgc.c Loading commit data...
buildgo.c Loading commit data...
buildruntime.c Loading commit data...
goc2c.c Loading commit data...
main.c Loading commit data...
plan9.c Loading commit data...
unix.c Loading commit data...
windows.c Loading commit data...