Descriptioncmd/dist: zero output variables on entry to goc2c functions
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.
Patch Set 1 #Patch Set 2 : diff -r 0a3722aa9092 https://code.google.com/p/go/ #Patch Set 3 : diff -r 0a3722aa9092 https://code.google.com/p/go/ #Patch Set 4 : diff -r 411981469cba https://code.google.com/p/go/ #MessagesTotal messages: 4
|