Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read/parser.go fails on TagAllocSample sections #1

Open
jamwt opened this issue May 14, 2014 · 1 comment
Open

read/parser.go fails on TagAllocSample sections #1

jamwt opened this issue May 14, 2014 · 1 comment

Comments

@jamwt
Copy link

jamwt commented May 14, 2014

In a TagAllocSample section, eventually a uintvar of arbitrarily large value is read and then makeslice() fails with size out of range:

panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
runtime.panic(0x5444c0, 0x6f2880)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/randall77/hprof/read.readNBytes(0x7f170b026088, 0xc210036270, 0x7f868c0ea6d8, 0xa, 0x0, ...)
    /dev/go/src/github.com/randall77/hprof/read/parser.go:407 +0x40
github.com/randall77/hprof/read.readBytes(0x7f170b026088, 0xc210036270, 0x2, 0xa, 0x0)
    /dev/go/src/github.com/randall77/hprof/read/parser.go:417 +0x53
github.com/randall77/hprof/read.readString(0x7f170b026088, 0xc210036270, 0xc210000660, 0x2)
    /dev/go/src/github.com/randall77/hprof/read/parser.go:421 +0x3a
github.com/randall77/hprof/read.rawRead(0x7fff3baae7bd, 0x7, 0x42fec9)
    /dev/go/src/github.com/randall77/hprof/read/parser.go:713 +0x4242
github.com/randall77/hprof/read.Read(0x7fff3baae7bd, 0x7, 0x56c840, 0x0, 0xc21000a5a0)
    /dev/go/src/github.com/randall77/hprof/read/parser.go:1575 +0x31
main.main()
    /dev/go/src/github.com/randall77/hprof/dumptohprof/main.go:105 +0x8e
@jamwt
Copy link
Author

jamwt commented May 14, 2014

This is using go tip, rev a24b19322888 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant