Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: deeply nested struct initialized with non-zero values [1.16 backport] #46657

gopherbot opened this issue Jun 9, 2021 · 3 comments
CherryPickApproved FrozenDueToAge


Copy link

@gopherbot gopherbot commented Jun 9, 2021

@thanm requested issue #46653 to be considered for backport to the next 1.16 minor release.

@gopherbot please consider this for backport to 1.15 and 1.16

@gopherbot gopherbot added the CherryPickCandidate label Jun 9, 2021
@gopherbot gopherbot added this to the Go1.16.6 milestone Jun 9, 2021
Copy link

@gopherbot gopherbot commented Jun 9, 2021

Change mentions this issue: [release-branch.go1.16] [release-branch.go1.10] cmd/compile: make symbol content-addressable

@heschi heschi added CherryPickApproved and removed CherryPickCandidate labels Jun 10, 2021
Copy link

@heschi heschi commented Jun 10, 2021


Copy link

@gopherbot gopherbot commented Jun 29, 2021

Closed by merging d4ee025 to release-branch.go1.16.

gopherbot pushed a commit that referenced this issue Jun 29, 2021

The compiler machinery that generates "" symbols marks them as
RODATA and DUPOK, which is problematic when a given application has
multiple map zero symbols (from different packages) with varying
sizes: the dupok path in the loader assumes that if two symbols have
the same name, it is safe to pick any of the versions. In the case of, the link needs to select the largest symbol, not an
arbitrary sym.

To fix this problem, mark symbols as content-addressable,
since the loader's content addressability processing path already
supports selection of the larger symbol in cases where there are dups.

Fixes #46657.

Change-Id: Iabd2feef01d448670ba795c7eaddc48c191ea276
Trust: Than McIntosh <>
Run-TryBot: Than McIntosh <>
TryBot-Result: Go Bot <>
Reviewed-by: Cherry Mui <>
(cherry picked from commit aa5540c)
Run-TryBot: Cherry Mui <>
@golang golang locked and limited conversation to collaborators Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
CherryPickApproved FrozenDueToAge
None yet

No branches or pull requests

2 participants