1
0
mirror of https://github.com/golang/go synced 2024-11-18 06:14:46 -07:00

cmd/pprof/internal/profile: ignore comments when parsing heap profiles

Fixes #10659.

Change-Id: I22dc306ce6f398dd40010ac430928a718d67d466
Reviewed-on: https://go-review.googlesource.com/9623
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Daniel Morsing 2015-05-02 13:08:12 +01:00
parent 6f7b4e8938
commit 19354b9dc8

View File

@ -554,9 +554,10 @@ func parseHeap(b []byte) (p *Profile, err error) {
}
}
if l = strings.TrimSpace(l); l == "" {
if isSpaceOrComment(l) {
continue
}
l = strings.TrimSpace(l)
if sectionTrigger(l) != unrecognizedSection {
break