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/compile: crypto/elliptic build error under -linkshared mode [1.20 backport] #59236

Closed
gopherbot opened this issue Mar 25, 2023 · 6 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@cuonglm requested issue #58966 to be considered for backport to the next 1.20 minor release.

@gopherbot please backport this issue to go1.20

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 25, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 25, 2023
@gopherbot gopherbot added this to the Go1.20.3 milestone Mar 25, 2023
@cuonglm
Copy link
Member

cuonglm commented Mar 25, 2023

The issue affects projects built with -linkshared, and can be seen in real world projects.

cc @cherrymui @mdempsky

@gopherbot
Copy link
Author

Change https://go.dev/cl/479355 mentions this issue: [release-branch.go1.20] cmd/compile: re-compile instantiated generic methods in linkshared mode

@cuonglm
Copy link
Member

cuonglm commented Mar 29, 2023

cc @heschi

@heschi
Copy link
Contributor

heschi commented Mar 29, 2023

Even though this affects generics, the fix seems safe, since it only applies to linkshared. Approved.

@heschi heschi added the CherryPickApproved Used during the release process for point releases label Mar 29, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 29, 2023
gopherbot pushed a commit that referenced this issue Mar 29, 2023
…methods in linkshared mode

For G[T] that was seen and compiled in imported package, it is not added
to typecheck.Target.Decls, prevent wasting compile time re-creating
DUPOKS symbols. However, the linker do not support a type symbol
referencing a method symbol across DSO boundary. That causes unreachable
sym error when building under -linkshared mode.

To fix it, always re-compile generic methods in linkshared mode.

Fixes #59236

Change-Id: I894b417cfe8234ae1fe809cc975889345df22cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/477375
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/479355
@mdempsky
Copy link
Member

Even though this affects generics

FWIW, the compiler team's concerns with generics backports was largely specific to the Go 1.18 release. Especially since Go 1.20, I think we can treat generics issues the same as any other compiler/language issue.

@gopherbot
Copy link
Author

Closed by merging 94c02a3 to release-branch.go1.20.

@golang golang locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants