Skip to content

[release/10.0] Publish GCHandle assignments with release semantics#130224

Open
github-actions[bot] wants to merge 1 commit into
release/10.0from
backport/pr-130213-to-release/10.0
Open

[release/10.0] Publish GCHandle assignments with release semantics#130224
github-actions[bot] wants to merge 1 commit into
release/10.0from
backport/pr-130213-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Backport of #130213 to release/10.0

/cc @jkotas @BradBarnich

Customer Impact

  • Customer reported
  • Found internally

Stress failure found on Arm64 caused by weak memory model

Regression

  • Yes
  • No

Testing

Customer validated the fix in the affected workload

Risk

Low.

GC handles can be observed by other threads after assignment. On weakly ordered ARM64 systems, a plain store to the handle slot can publish the object reference before prior object initialization writes are visible to the observing thread.

Use VolatileStore when assigning handle slots in HndAssignHandle and HndAssignHandleGC so the handle publication is a release store. This matches the runtime's volatile publication pattern and prevents weak-reference readers from seeing partially initialized objects.
@jkotas jkotas requested a review from a team July 5, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants