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

cmd/link: go 1.16 plugin does not initialize global variables correctly when not used directly [1.16 backport] #45030

gopherbot opened this issue Mar 15, 2021 · 3 comments


Copy link

@gopherbot gopherbot commented Mar 15, 2021

@cherrymui requested issue #44956 to be considered for backport to the next 1.16 minor release.

@gopherbot please backport this to Go 1.16. This is a mis-compilation bug in Go 1.16. Thanks.

Copy link

@gopherbot gopherbot commented Mar 16, 2021

Change mentions this issue: [release-branch.go1.16] cmd/compile, cmd/link: dynamically export writable static tmps

Copy link

@toothrot toothrot commented Mar 18, 2021

Approved. This is a serious issue with no workaround.

Copy link

@gopherbot gopherbot commented Mar 25, 2021

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

@gopherbot gopherbot closed this Mar 25, 2021
gopherbot pushed a commit that referenced this issue Mar 25, 2021
…table static tmps

Static tmps are private to a package, but with plugins a package
can be shared among multiple DSOs. They need to have a consistent
view of the static tmps, especially for writable ones. So export
them. (Read-only static tmps have the same values anyway, so it
doesn't matter. Also Mach-O doesn't support dynamically exporting
read-only symbols anyway.)

Updates #44956.
Fixes #45030.

Change-Id: I921e25b7ab73cd5d5347800eccdb7931e3448779
Trust: Cherry Zhang <>
Run-TryBot: Cherry Zhang <>
TryBot-Result: Go Bot <>
Reviewed-by: Than McIntosh <>
(cherry picked from commit de012bc095359e1b552d4ea6fb6b2995f3ab04f5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants