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

Comments

Projects
None yet
4 participants
@benesch
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

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.

@benesch

This comment has been minimized.

Copy link
Contributor Author

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 label Mar 26, 2018

@andybons andybons added this to the Go1.11 milestone Mar 26, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jul 2, 2018

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

@gopherbot gopherbot closed this in 0e0cd70 Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.