• Russ Cox's avatar
    runtime: crash if we see an invalid pointer into GC arena · 11e53e46
    Russ Cox authored
    This will help find bugs during the release freeze.
    It's not clear it should be kept for the release itself.
    That's issue 8861.
    
    The most likely thing that would trigger this is stale
    pointers that previously were ignored or caused memory
    leaks. These were allowed due to the use of conservative
    collection. Now that everything is precise, we should not
    see them anymore.
    
    The small number check reinforces what the stack copier
    is already doing, catching the storage of integers in pointers.
    It caught issue 8864.
    
    The check is disabled if _cgo_allocate is linked into the binary,
    which is to say if the binary is using SWIG to allocate untyped
    Go memory. In that case, there are invalid pointers and there's
    nothing we can do about it.
    
    LGTM=rlh
    R=golang-codereviews, dvyukov, rlh
    CC=golang-codereviews, iant, khr, r
    https://golang.org/cl/148470043
    11e53e46
Name
Last commit
Last update
..
Makefile Loading commit data...
acid.c Loading commit data...
bits.c Loading commit data...
cc.h Loading commit data...
cc.y Loading commit data...
com.c Loading commit data...
com64.c Loading commit data...
dcl.c Loading commit data...
doc.go Loading commit data...
dpchk.c Loading commit data...
funct.c Loading commit data...
godefs.c Loading commit data...
lex.c Loading commit data...
lexbody Loading commit data...
mac.c Loading commit data...
macbody Loading commit data...
omachcap.c Loading commit data...
pgen.c Loading commit data...
pswt.c Loading commit data...
scon.c Loading commit data...
sub.c Loading commit data...
y.tab.c Loading commit data...
y.tab.h Loading commit data...