commit | cc96b6e0d3d9f32c0e0c79aa458a6b356f9a2627 | [log] [tgz] |
---|---|---|
author | Michael Pratt <mpratt@google.com> | Tue Dec 17 23:01:57 2024 +0000 |
committer | Michael Pratt <mpratt@google.com> | Thu Dec 19 16:30:58 2024 -0800 |
tree | 2fd550f0753b817420509e68a949021809210e9e | |
parent | 773b2e3c155612e58987b7c441b705b94355437f [diff] |
internal/crashmonitor: adjust trap frames Typically all frames in the middle of a stack trace are calls, and report the "return PC". That is, the instruction following the CALL where the callee will eventually return to. runtime.CallersFrames is aware of this property and will decrement each PC by 1 to "back up" to the location of the CALL, which is the actual line number the user expects. This does not work for traps (such as a SIGSEGV), as a trap is not a call, so the reported PC is not the return PC, but the actual PC of the trap. runtime.Callers is aware of this and will intentionally increment trap PCs in order to correct for the decrement performed by runtime.CallersFrames. See runtime.tracebackPCs and runtume.(*unwinder).symPC. We must emulate the same behavior, otherwise we will report the location of the instruction immediately prior to the trap, which may be on a different line, or even a different inlined functions. Fixes golang/go#70637. Change-Id: I7cd6ffe783a81aa91dcdca313d910341c0bb0440 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/637755 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This repository holds the Go Telemetry server code and libraries, used for hosting telemetry.go.dev and instrumenting Go toolchain programs with opt-in telemetry.
Warning: this repository is intended for use only in tools maintained by the Go team, including tools in the Go distribution and auxiliary tools like gopls or govulncheck. There are no compatibility guarantees for any of the packages here: public APIs will change in breaking ways as the telemetry integration is refined.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/telemetry.
The main issue tracker for the telemetry repository is located at https://go.dev/issues. Prefix your issue with “x/telemetry:” in the subject line, so it is easy to find.
This repository uses eslint to format TS files, stylelint to format CSS files, and prettier to format TS, CSS, Markdown, and YAML files.
See the style guides:
It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI.
./npm install
./npm run all