[go/release-branch.go1.24] [release-branch.go1.24] runtime/race: set missing argument frame for ppc64x atomic And/Or wrappers

0 views
Skip to first unread message

Cherry Mui (Gerrit)

unread,
Dec 29, 2025, 3:53:24 PM (15 hours ago) Dec 29
to Jayanth Krishnamurthy, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Roland Shoemaker, Mark Freeman, Paul Murphy, Go LUCI, Gopher Robot, golang-co...@googlegroups.com

Cherry Mui submitted the change

Change information

Commit message:
[release-branch.go1.24] runtime/race: set missing argument frame for ppc64x atomic And/Or wrappers

The ppc64x TSAN wrappers for atomic And/Or did not initialize R6 with the Go argument frame before calling racecallatomic. Since racecallatomic expects R6 to point to the argument list and dereferences it unconditionally, this led to a nil-pointer dereference under -race.

Other atomic TSAN wrappers (Load/Store/Add/Swap/CAS) already set up R6 in the expected way. This change aligns the And/Or wrappers with the rest by adding the missing R6 initialisation.

This keeps the behavior consistent across all atomic operations on ppc64x.

Fixes #76796.
Change-Id: Iaf578449a6171a0c6f7c33ec6f64c1251297ae6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/718560
Reviewed-by: Mark Freeman <markf...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Paul Murphy <paum...@redhat.com>
(cherry picked from commit 44cb82449e7f24530fe0fe0bf8261ba9e0e4e7d8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/729420
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Files:
  • M src/runtime/race_ppc64le.s
Change size: XS
Delta: 1 file changed, 4 insertions(+), 0 deletions(-)
Branch: refs/heads/release-branch.go1.24
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +1 by Roland Shoemaker
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.24
Gerrit-Change-Id: Iaf578449a6171a0c6f7c33ec6f64c1251297ae6d
Gerrit-Change-Number: 729420
Gerrit-PatchSet: 3
Gerrit-Owner: Jayanth Krishnamurthy <jayanth.kr...@ibm.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Paul Murphy <paum...@redhat.com>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement

Cherry Mui (Gerrit)

unread,
Dec 29, 2025, 4:19:47 PM (14 hours ago) Dec 29
to Jayanth Krishnamurthy, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Go LUCI, Carlos Amedee, Dmitry Vyukov, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

Cherry Mui submitted the change

Change information

Commit message:
[release-branch.go1.25] runtime/race: set missing argument frame for ppc64x atomic And/Or wrappers


The ppc64x TSAN wrappers for atomic And/Or did not initialize R6 with the Go argument frame before calling racecallatomic. Since racecallatomic expects R6 to point to the argument list and dereferences it unconditionally, this led to a nil-pointer dereference under -race.

Other atomic TSAN wrappers (Load/Store/Add/Swap/CAS) already set up R6 in the expected way. This change aligns the And/Or wrappers with the rest by adding the missing R6 initialisation.

This keeps the behavior consistent across all atomic operations on ppc64x.

Updates #76776.

Change-Id: Iaf578449a6171a0c6f7c33ec6f64c1251297ae6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/718560
Reviewed-by: Mark Freeman <markf...@google.com>
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Reviewed-by: Paul Murphy <paum...@redhat.com>
(cherry picked from commit 44cb82449e7f24530fe0fe0bf8261ba9e0e4e7d8)
Files:
  • M src/runtime/race_ppc64le.s
Change size: XS
Delta: 1 file changed, 4 insertions(+), 0 deletions(-)
Branch: refs/heads/release-branch.go1.25
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +1 by David Chase
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.25
Gerrit-Change-Id: Iaf578449a6171a0c6f7c33ec6f64c1251297ae6d
Gerrit-Change-Number: 728900
Gerrit-PatchSet: 3
Gerrit-Owner: Jayanth Krishnamurthy <jayanth.kr...@ibm.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Dmitry Vyukov <dvy...@google.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Jayanth Krishnamurthy <jayanth.kr...@ibm.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages