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.21 backport] #67944

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.21 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.21.12 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/592477 mentions this issue: [release-branch.go1.21 cmd/link: put runtime.end in the last section of data segment

@gopherbot
Copy link
Contributor Author

Closed by merging dfb0067 to release-branch.go1.21.

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 #67944.

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/+/592477
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.
3 participants