-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: poor error message for Goexit on C-created thread #68275
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
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
cc @golang/runtime |
qiulaidongfeng
added a commit
to qiulaidongfeng/go
that referenced
this issue
Aug 29, 2024
For golang#68275 Change-Id: Ic213a4e59aa24f125895946bf0001b82e55567bd
Change https://go.dev/cl/609296 mentions this issue: |
Reopening. Change is being reverted. |
Change https://go.dev/cl/612335 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Go version
tip
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Note that this error was improved a bit recently in https://go.dev/cl/583675. In 1.22, the error is
What did you expect to see?
A more clear description of the problem.
The problem here is that it is not valid to call
runtime.Goexit
in a cgo callback from C to Go on a C-created thread. I think that restriction is fine (it is unclear what Goexit should do if we were to allow it), but the error message here should be more clear.I think with an additional
mp.isextra
check ingdestroy
we could be more explicit about what the user did wrong.We should also update the
runtime.Goexit
docs to mention this case.The text was updated successfully, but these errors were encountered: