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: clarify error when returning unpinned pointers #62606
Conversation
This PR (HEAD: cab3242) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/527702. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Richard Wang: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
This PR (HEAD: d72ee02) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/527702. Important tips:
|
Message from Ian Lance Taylor: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
This PR (HEAD: 706facb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/527702. Important tips:
|
Message from Richard Wang: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Richard Wang: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Michael Knyszek: Patch Set 5: Auto-Submit+1 Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2023-11-08T06:16:36Z","revision":"8ffb117d1fdeda9ac0ce69b2bf1b1eff140b70a3"} Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Michael Knyszek: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Michael Knyszek: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 5: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results): FAILURE
error: failed to run "test golang.org/x/tools module": exit status 1 Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Michael Knyszek: Patch Set 6: Auto-Submit+1 Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 6: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2023-11-08T06:37:37Z","revision":"9e97cd9c4d4349f2398531893df5a15779e3ce8a"} Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Michael Knyszek: Patch Set 6: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 6: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
Message from Go LUCI: Patch Set 6: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/527702. |
With the introduction of runtime.Pinner, returning a pointer to a pinned struct that then points to an unpinned Go pointer is correctly caught. However, the error message remained as "cgo result has Go pointer", which should be updated to acknowledge that Go pointers to pinned memory are allowed. This also updates the comments for cgoCheckArg and cgoCheckResult to similarly clarify. Updates #46787 Change-Id: I147bb09e87dfb70a24d6d43e4cf84e8bcc2aff48 GitHub-Last-Rev: 706facb GitHub-Pull-Request: #62606 Reviewed-on: https://go-review.googlesource.com/c/go/+/527702 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
This PR is being closed because golang.org/cl/527702 has been merged. |
With the introduction of runtime.Pinner, returning a pointer to a pinned
struct that then points to an unpinned Go pointer is correctly caught.
However, the error message remained as "cgo result has Go pointer",
which should be updated to acknowledge that Go pointers to pinned
memory are allowed.
This also updates the comments for cgoCheckArg and cgoCheckResult
to similarly clarify.
Updates #46787