• Keith Randall's avatar
    runtime: handle holes in the heap · 6d1ebeb5
    Keith Randall authored
    We need to distinguish pointers to free spans, which indicate bugs in
    our pointer analysis, from pointers to never-in-the-heap spans, which
    can legitimately arise from sysAlloc/mmap/etc.  This normally isn't a
    problem because the heap is contiguous, but in some situations (32
    bit, particularly) the heap must grow around an already allocated
    region.
    
    The bad pointer test is disabled so this fix doesn't actually do
    anything, but it removes one barrier from reenabling it.
    
    Fixes #9872.
    
    Change-Id: I0a92db4d43b642c58d2b40af69c906a8d9777f88
    Reviewed-on: https://go-review.googlesource.com/5780Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
    6d1ebeb5
mheap.go 28.2 KB