From 96e142ba2bfe5fe483f5364df91222c19ac13c49 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Wed, 3 Dec 2025 23:22:18 +0000 Subject: runtime: skip TestArenaCollision if we run out of hints This seems failure mode seems to have become more common on Windows. I suspect the randomized heap base address has something to do with it, but I'm not 100% sure. What's definitely certain is that we're running out of hints, since we're seeing failures that mheap_.arenaHints is nil and GetNextArenaHint doesn't actually check that. At the very least we can check that and skip. We know that in this case there's not that much we can do. Fixes #76566. Change-Id: I8ccc8994806b6c95e3157eb296b09705637564b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/726527 Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI --- src/runtime/export_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/runtime/export_test.go') diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 26341c4300..4f6ef9a3f2 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -551,8 +551,11 @@ func MapNextArenaHint() (start, end uintptr, ok bool) { return } -func GetNextArenaHint() uintptr { - return mheap_.arenaHints.addr +func NextArenaHint() (uintptr, bool) { + if mheap_.arenaHints == nil { + return 0, false + } + return mheap_.arenaHints.addr, true } type G = g -- cgit v1.3