profile
viewpoint

Ask questionsnet/http/pprof, cmd/internal/objfile: panic: runtime error: slice bounds out of range in disasm.go

https://github.com/golang/go/blob/574c286607015297e35b7c02c793038fd827e59b/src/cmd/internal/objfile/disasm.go#L271

panic in here

net/http.(*conn).serve.func1(0xc003f52000)
	/usr/local/go/src/net/http/server.go:1769 +0x139
panic(0x15200e0, 0x1a3d450)
	/usr/local/go/src/runtime/panic.go:522 +0x1b5
cmd/internal/objfile.(*Disasm).Decode(0xc000126600, 0x0, 0x1000fff, 0x0, 0x0, 0x0, 0xc0000e0f78)
	/usr/local/go/src/cmd/internal/objfile/disasm.go:271 +0x468
main.(*objTool).Disasm(0xc0000918d0, 0xc001a04cb0, 0xa, 0x0, 0x1000fff, 0x203001, 0xc0000e10b8, 0x10e5d56, 0xc003b61742, 0xc003c38210)
	/usr/local/go/src/cmd/pprof/pprof.go:180 +0xf2
cmd/vendor/github.com/google/pprof/driver.(*internalObjTool).Disasm(0xc0000918e0, 0xc001a04cb0, 0xa, 0x0, 0x1000fff, 0x200, 0xc000548000, 0x44, 0xc003b61720, 0xc003b616d0)
	/usr/local/go/src/cmd/vendor/github.com/google/pprof/driver/driver.go:280 +0x7f
cmd/vendor/github.com/google/pprof/internal/report.assemblyPerSourceLine(0xc000eaa000, 0x86b9, 0x9800, 0xc0004de000, 0x110, 0x200, 0xc0007b5a40, 0x26, 0x16ae4e0, 0xc0000918e0, ...)
	/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/source.go:251 +0xec
cmd/vendor/github.com/google/pprof/internal/report.PrintWebList(0x16aa400, 0xc0000952c0, 0xc001170b20, 0x16ae4e0, 0xc0000918e0, 0x32, 0x2, 0x0)
	/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/report/source.go:208 +0xaa3
cmd/vendor/github.com/google/pprof/internal/driver.(*webInterface).source(0xc0008855c0, 0x16b48e0, 0xc0012d4380, 0xc004963c00)
	/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go:386 +0x18c
net/http.HandlerFunc.ServeHTTP(0xc000636770, 0x16b48e0, 0xc0012d4380, 0xc004963c00)
	/usr/local/go/src/net/http/server.go:1995 +0x44
cmd/vendor/github.com/google/pprof/internal/driver.defaultWebServer.func1(0x16b48e0, 0xc0012d4380, 0xc004963c00)
	/usr/local/go/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go:173 +0x9c
net/http.HandlerFunc.ServeHTTP(0xc00009c500, 0x16b48e0, 0xc0012d4380, 0xc004963c00)
	/usr/local/go/src/net/http/server.go:1995 +0x44
net/http.StripPrefix.func1(0x16b48e0, 0xc0012d4380, 0xc003ffbb00)
	/usr/local/go/src/net/http/server.go:2034 +0x18d
net/http.HandlerFunc.ServeHTTP(0xc0008d4420, 0x16b48e0, 0xc0012d4380, 0xc003ffbb00)
	/usr/local/go/src/net/http/server.go:1995 +0x44
net/http.(*ServeMux).ServeHTTP(0xc0000a6680, 0x16b48e0, 0xc0012d4380, 0xc003ffbb00)
	/usr/local/go/src/net/http/server.go:2375 +0x1d6
net/http.serverHandler.ServeHTTP(0xc00090c000, 0x16b48e0, 0xc0012d4380, 0xc003ffbb00)
	/usr/local/go/src/net/http/server.go:2774 +0xa8
net/http.(*conn).serve(0xc003f52000, 0x16b5e60, 0xc001faa9c0)
	/usr/local/go/src/net/http/server.go:1878 +0x851
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2884 +0x2f4
2020/01/17 17:07:30 http: panic serving 127.0.0.1:57041: runtime error: slice bounds out of range
golang/go

Answer questions dr2chase

Might not be closed, was a gaffe in the commit wording.

useful!

Related questions

cmd/link: segmentation fault during mach-o linking
cmd/go: cannot find module providing package error stops `go get` processing hot 3
vendor/golang.org/x/xerrors/adaptor_go1_13.go:16:14: undefined: errors.Frame ... hot 2
cmd/vet: potential false positive in the "suspect or" check hot 2
cmd/go: needs a better error than "missing dot in first path element" when GOROOT is set incorrectly hot 2
x/xerrors: fails to compile on tip hot 1
cmd/go: `go clean <package>` downloads modules hot 1
cmd/cgo error: runtime: unknown pc 0x7fff5c805b86 hot 1
runtime: crash with "invalid pc-encoded table" hot 1
cmd/link: showing many ld warnings of "building for macOS, but linking in object file" hot 1
runtime: go program crach, it seems fall into infinite loop hot 1
cmd/go: major version without preceding tag must be v0, not v1 - breaks build of github.com/go-check hot 1
gollvm: Using External Go Packages with gollvm hot 1
runtime: macOS Sierra builders spinning hot 1
cmd/go: Problem using go modules hot 1
Github User Rank List