]> Cypherpunks repositories - gostls13.git/commit
runtime: handle holes in the heap
authorKeith Randall <khr@golang.org>
Tue, 24 Feb 2015 17:25:09 +0000 (09:25 -0800)
committerKeith Randall <khr@golang.org>
Wed, 25 Feb 2015 21:07:10 +0000 (21:07 +0000)
commit6d1ebeb5271a06cd55f55a84e95709e2f4805bcc
treef1944b3f48500bc3f5cdae2b69c57f56f229c860
parent29421cbb5bc892124c965ead9e4d2e14d963254c
runtime: handle holes in the heap

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/5780
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/runtime/mbitmap.go
src/runtime/mheap.go