runtime error: invalid memory address or nil pointer dereference
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
v1.7.7
2022/06/30 09:36:28 http: panic serving 127.0.0.1:35814: runtime error: invalid memory address or nil pointer dereference
goroutine 2786 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1802 +0xb9
panic({0x7faa80, 0xba68b0})
runtime/panic.go:1047 +0x266
github.com/jpillora/chisel/server.(*Server).handleWebsocket(0xc0000a8320, {0x8fff80, 0xc00019c460}, 0xc00010ae00)
github.com/jpillora/chisel/server/server_handler.go:94 +0x463
github.com/jpillora/chisel/server.(*Server).handleClientHandler(0xc0000a8320, {0x8fff80, 0xc00019c460}, 0xc00010ae00)
github.com/jpillora/chisel/server/server_handler.go:24 +0x129
net/http.HandlerFunc.ServeHTTP(0x0, {0x8fff80, 0xc00019c460}, 0x46204e)
net/http/server.go:2047 +0x2f
net/http.serverHandler.ServeHTTP({0xc00037f860}, {0x8fff80, 0xc00019c460}, 0xc00010ae00)
net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc00007c280, {0x9021a0, 0xc0000720c0})
net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
net/http/server.go:3034 +0x4e8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading server/server_handler.go, especially Server.handleWebsocket at line 94, using the supplied stack trace as the entry point. Reproduce the panic if possible and determine which request path triggers it. Done means the same request no longer causes a nil pointer panic and the relevant behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100