• Austin Clements's avatar
    runtime: avoid write barriers to uninitialized finalizer frame memory · db56a635
    Austin Clements authored
    runfinq allocates a stack frame on the heap for constructing the
    finalizer function calls and reuses it for each call. However, because
    the type of this frame is constantly shifting, it tells mallocgc there
    are no pointers in it and it acts essentially like uninitialized
    memory between uses. But runfinq uses pointer writes with write
    barriers to "initialize" this memory, which is not going to be safe
    with the hybrid barrier, since the hybrid barrier may see a stale
    pointer left in the "uninitialized" frame.
    
    Fix this by zero-initializing the argument values in the frame before
    writing the argument pointers.
    
    Updates #17503.
    
    Change-Id: I951c0a2be427eb9082a32d65c4410e6fdef041be
    Reviewed-on: https://go-review.googlesource.com/31453Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    db56a635
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...