• Keith Randall's avatar
    cgo: adjust return value location to account for stack copies. · 1b6807bb
    Keith Randall authored
    During a cgo call, the stack can be copied.  This copy invalidates
    the pointer that cgo has into the return value area.  To fix this
    problem, pass the address of the location containing the stack
    top value (which is in the G struct).  For cgo functions which
    return values, read the stktop before and after the cgo call to
    compute the adjustment necessary to write the return value.
    
    Fixes #8771
    
    LGTM=iant, rsc
    R=iant, rsc, khr
    CC=golang-codereviews
    https://golang.org/cl/144130043
    1b6807bb
Name
Last commit
Last update
..
errors Loading commit data...
gmp Loading commit data...
life Loading commit data...
nocgo Loading commit data...
stdio Loading commit data...
test Loading commit data...
testasan Loading commit data...
testcdefs Loading commit data...
testgodefs Loading commit data...
testso Loading commit data...
testtls Loading commit data...