]> Cypherpunks repositories - gostls13.git/commit
runtime: use one more address bit for tagged pointers
authorKeith Randall <khr@golang.org>
Tue, 2 Sep 2025 22:46:11 +0000 (15:46 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 2 Sep 2025 23:27:43 +0000 (16:27 -0700)
commit2a7f1d47b0650c92b47f0cd5bc3536d438e4bbbe
treef6c60373ac225efb13b4fe780c485cd9e5710445
parentb09068041a20ed3cd44685a1d7f4dccbabfc2e94
runtime: use one more address bit for tagged pointers

We use one extra bit to placate systems which simulate amd64 binaries on
an arm64 host. Allocated arm64 addresses could be as high as 1<<48-1,
which would be invalid if we assumed 48-bit sign-extended addresses.

(Note that this does not help the other way around, simluating arm64
on amd64, but we don't have that problem at the moment.)

Fixes #69255

Change-Id: Iace17a5d41a65e34abf201d03d8b0ff6f7bf1150
Reviewed-on: https://go-review.googlesource.com/c/go/+/700515
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/tagptr_64bit.go