diff --git a/src/runtime/gc_blocks.go b/src/runtime/gc_blocks.go index 4c7896e0..b3185b6e 100644 --- a/src/runtime/gc_blocks.go +++ b/src/runtime/gc_blocks.go @@ -168,6 +168,9 @@ func (b gcBlock) markFree() { if gcAsserts && b.state() != blockStateFree { runtimePanic("gc: markFree() was not successful") } + if gcAsserts { + *(*[wordsPerBlock]uintptr)(unsafe.Pointer(b.address())) = [wordsPerBlock]uintptr{} + } } // unmark changes the state of the block from mark to head. It must be marked