]> Cypherpunks repositories - gostls13.git/commit
runtime: detect and print corrupted free lists
authorAustin Clements <austin@google.com>
Thu, 4 Jun 2015 22:14:57 +0000 (18:14 -0400)
committerAustin Clements <austin@google.com>
Tue, 16 Jun 2015 21:17:47 +0000 (21:17 +0000)
commit5250279eb9a167cffbb667efed970067b47f71ac
treebcc1bd77e16470050f49dd257212a39afcfabfb8
parent142e434006e371440c8be4494d27d1774fe161e5
runtime: detect and print corrupted free lists

Issues #10240, #10541, #10941, #11023, #11027 and possibly others are
indicating memory corruption in the runtime. One of the easiest places
to both get corruption and detect it is in the allocator's free lists
since they appear throughout memory and follow strict invariants. This
commit adds a check when sweeping a span that its free list is sane
and, if not, it prints the corrupted free list and panics. Hopefully
this will help us collect more information on these failures.

Change-Id: I6d417bcaeedf654943a5e068bd76b58bb02d4a64
Reviewed-on: https://go-review.googlesource.com/10713
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
src/runtime/mgcsweep.go