aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_test.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-12-03 23:22:18 +0000
committerMichael Knyszek <mknyszek@google.com>2025-12-05 11:37:02 -0800
commit96e142ba2bfe5fe483f5364df91222c19ac13c49 (patch)
treea1fd5bce240065ab3d823907cf263e5f3c169595 /src/runtime/export_test.go
parentfe4952f1165c43dcd195ab8b024f79ac5beced8a (diff)
downloadgo-96e142ba2bfe5fe483f5364df91222c19ac13c49.tar.xz
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 <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/export_test.go')
-rw-r--r--src/runtime/export_test.go7
1 files changed, 5 insertions, 2 deletions
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