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: using -fuzz with test that links with cgo on darwin causes linker failure [1.22 backport] #67945

Closed
gopherbot opened this issue Jun 12, 2024 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@gopherbot
Copy link
Contributor

@cherrymui requested issue #65169 to be considered for backport to the next 1.22 minor release.

@gopherbot please backport this to previous releases. This causes build failure when using fuzzing with cgo. (There is a workaround, by specifying the old Apple linker, but that is not great.)

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jun 12, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jun 12, 2024
@gopherbot gopherbot added this to the Go1.22.5 milestone Jun 12, 2024
@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Jun 12, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jun 12, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/592478 mentions this issue: [release-branch.go1.22] cmd/link: put runtime.end in the last section of data segment

gopherbot pushed a commit that referenced this issue Jun 24, 2024
… of data segment

Currently the runtime.end symbol is put into the noptrbss section,
which is usually the last section, except that when fuzzing is
enabled, the last section is actually .go.fuzzcntrs. The
runtime.end symbol has the value pointing to the end of the data
segment, so if it is not in the last section, the value will not
actually be in the range of the section. This causes an assertion
failure in the new Apple linker. This CL fixes this by putting it
in the last section.

Updates #65169.
Fixes #67945.

Change-Id: I5c991c46a0483a96e5f6e0255a3b444953676026
Reviewed-on: https://go-review.googlesource.com/c/go/+/592095
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit b589478)
Reviewed-on: https://go-review.googlesource.com/c/go/+/592478
@gopherbot
Copy link
Contributor Author

Closed by merging 4c97e88 to release-branch.go1.22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

3 participants