diff --git a/src/runtime/mbarrier.go b/src/runtime/mbarrier.go index 637d9b886a..bf75934ed6 100644 --- a/src/runtime/mbarrier.go +++ b/src/runtime/mbarrier.go @@ -145,7 +145,7 @@ func writebarrierptr(dst *uintptr, src uintptr) { if !writeBarrier.needed { return } - if src != 0 && (src < sys.PhysPageSize || src == poisonStack) { + if src != 0 && src < sys.PhysPageSize { systemstack(func() { print("runtime: writebarrierptr *", dst, " = ", hex(src), "\n") throw("bad pointer in write barrier") @@ -164,7 +164,7 @@ func writebarrierptr_nostore(dst *uintptr, src uintptr) { if !writeBarrier.needed { return } - if src != 0 && (src < sys.PhysPageSize || src == poisonStack) { + if src != 0 && src < sys.PhysPageSize { systemstack(func() { throw("bad pointer in write barrier") }) } writebarrierptr_nostore1(dst, src) diff --git a/src/runtime/stack.go b/src/runtime/stack.go index ee2797e144..b14b4005d8 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -127,7 +127,6 @@ const ( const ( uintptrMask = 1<<(8*sys.PtrSize) - 1 - poisonStack = uintptrMask & 0x6868686868686868 // Goroutine preemption request. // Stored into g->stackguard0 to cause split stack check failure. @@ -594,7 +593,7 @@ func adjustpointers(scanp unsafe.Pointer, cbv *bitvector, adjinfo *adjustinfo, f pp := (*uintptr)(add(scanp, i*sys.PtrSize)) retry: p := *pp - if f != nil && 0 < p && p < _PageSize && debug.invalidptr != 0 || p == poisonStack { + if f != nil && 0 < p && p < _PageSize && debug.invalidptr != 0 { // Looks like a junk value in a pointer slot. // Live analysis wrong? getg().m.traceback = 2