Commit 19354b9d authored by Daniel Morsing's avatar Daniel Morsing

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

Fixes #10659.

Change-Id: I22dc306ce6f398dd40010ac430928a718d67d466
Reviewed-on: https://go-review.googlesource.com/9623Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 6f7b4e89
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment