aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/pprof/pprof.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go
index b6253b1aa5..21ea25ce36 100644
--- a/src/runtime/pprof/pprof.go
+++ b/src/runtime/pprof/pprof.go
@@ -401,7 +401,11 @@ func printCountProfile(w io.Writer, debug int, name string, p countProfile) erro
for _, addr := range p.Stack(index[k]) {
// For count profiles, all stack addresses are
// return PCs, which is what locForPC expects.
- locs = append(locs, b.locForPC(addr))
+ l := b.locForPC(addr)
+ if l == 0 { // runtime.goexit
+ continue
+ }
+ locs = append(locs, l)
}
b.pbSample(values, locs, nil)
}