mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/pprof: fix profile parser in test
Fixes #6417. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/13843043
This commit is contained in:
parent
bc2c3388f4
commit
05ff4d7a1a
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue