]> Cypherpunks repositories - gostls13.git/commit
reflect, runtime: adjust user-created GCData on AIX
authorIan Lance Taylor <iant@golang.org>
Sat, 31 Jan 2026 02:42:27 +0000 (18:42 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 4 Feb 2026 19:28:03 +0000 (11:28 -0800)
commitbd1b41eb8131a503a1a8d2fc41d3e79bce159468
tree480aa30270d7c4a6de57a2d91e2c72446db70f46
parent01299a31c26b730785ac497da2ef7c593947d5d7
reflect, runtime: adjust user-created GCData on AIX

On AIX the runtime adjusts the GCData field in getGCMaskOnDemand
to account for the AIX dynamic loader moving the data section.
That works fine for statically generated types,
but it breaks user generated types. The user generated type
will have a normal, correct, pointer, and adjusting the pointer
will make it point elsewhere.

This all happens to work OK when doing an external link,
because in that case we do have dynamic relocs and there is no adjustment.
But it fails with an internal link.

This CL fixes the problem by applying a reverse adjustment to
user generated types, so that the adjustment winds up with the
original pointer value.

Change-Id: Ibf3199b9ffb36e79af134fbed41db2853297de74
Reviewed-on: https://go-review.googlesource.com/c/go/+/740800
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/reflect/type.go
src/runtime/runtime1.go