]> Cypherpunks repositories - gostls13.git/commit
runtime: fix CheckScavengedBitsCleared with randomized heap base
authorRoland Shoemaker <bracewell@google.com>
Wed, 17 Sep 2025 21:04:56 +0000 (21:04 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 18 Sep 2025 00:10:11 +0000 (17:10 -0700)
commit465b85eb760bfdb114f6b6ebccf374aba3977929
tree36d90513d2c3e4f8033094a414b9790538d950f5
parent909704b85e64b156f81e78bcfd1fbd9b032c089a
runtime: fix CheckScavengedBitsCleared with randomized heap base

We cannot easily determine the base address of the arena we added the
random padding pages to, which can cause confusing
TestScavengedBitsCleared failures when the arena we padded does not have
the lowest address of all of the arenas.

Instead of attempting to determine the correct arena to ignore when
checking the scav and alloc bits, switch to just tolerating _one_ arena
having mismatches, which is expected when randomizedHeapBase64 is
enabled. Any other number of arenas having mismatches is likely a real
error.

Fixes #75502

Change-Id: Iacc445b2905824f9f71970c7abd33f187793cf39
Reviewed-on: https://go-review.googlesource.com/c/go/+/704855
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/export_test.go