Commit 05ff4d7a authored by Russ Cox's avatar Russ Cox

runtime/pprof: fix profile parser in test

Fixes #6417.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13843043
parent bc2c3388
......@@ -58,7 +58,8 @@ func parseProfile(t *testing.T, bytes []byte, f func(uintptr, []uintptr)) {
val := *(*[]uintptr)(unsafe.Pointer(&bytes))
val = val[:l]
if l < 13 {
// 5 for the header, 2 for the per-sample header on at least one sample, 3 for the trailer.
if l < 5+2+3 {
t.Logf("profile too short: %#x", val)
if badOS[runtime.GOOS] {
t.Skipf("ignoring failure on %s; see golang.org/issue/6047", runtime.GOOS)
......
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