internal/gocore: don't panic if backtrace fails

Backtracing a thread in the core file may fail for various reasons: it
might have C functions, which we don't know how to deal with, or its
stack could be corrupted. Don't crash if that happens, just give up on
backtracing the current thread.

Fixes golang/go#27323

Change-Id: I271032cef1a9a54ef929b602a9846addfd145296
Reviewed-on: https://go-review.googlesource.com/132055
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rhys Hiltner <rhys@justin.tv>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2 files changed
tree: 306affa1c8a131ce01c2a653f65977a0716f8651
  1. cmd/
  2. internal/
  3. AUTHORS
  4. codereview.cfg
  5. CONTRIBUTING.md
  6. CONTRIBUTORS
  7. LICENSE
  8. README.md
README.md

Go Debug

This repository holds utilities and libraries for debugging Go programs.

WARNING! Please expect breaking changes and unstable APIs. Most of them are currently are at an early, experimental stage.

Report Issues & Send Changes