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

runtime: document that SetCgoTraceback silently does nothing on non-linux/amd64 #24518

Closed
benesch opened this issue Mar 24, 2018 · 3 comments
Closed
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@benesch
Copy link
Contributor

benesch commented Mar 24, 2018

Based on my read of the source code, runtime.SetCgoTraceback is only supported on linux/amd64. Ideally it would fail loudly if called on an unsupported platform, but just documenting the limitation would be a step forward. (At least, I don't see this documented anywhere.)

/cc @ianlancetaylor

@ianlancetaylor
Copy link
Member

SetCgoTraceback should be effective on any platform, in that it can permit stack tracebacks to show C code when that C code calls Go code and the Go code asks for a stack trace. What is only implemented on linux/amd64, linux/ppc64le, and (for 1.11) freebsd/amd64 is collecting a C stack traceback from a signal handler.

@benesch
Copy link
Contributor Author

benesch commented Mar 24, 2018

SetCgoTraceback should be effective on any platform, in that it can permit stack tracebacks to show C code when that C code calls Go code and the Go code asks for a stack trace. What is only implemented on linux/amd64, linux/ppc64le, and (for 1.11) freebsd/amd64 is collecting a C stack traceback from a signal handler.

Ah, I see. Regardless, I think my point stands: that seems like something worth documenting!

@andybons andybons changed the title runtime: SetCgoTraceback silently does nothing on non-linux/amd64 runtime: document that SetCgoTraceback silently does nothing on non-linux/amd64 Mar 26, 2018
@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 26, 2018
@andybons andybons added this to the Go1.11 milestone Mar 26, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/121917 mentions this issue: runtime: document when cgo traceback function is called

@golang golang locked and limited conversation to collaborators Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants