Skip to content

Fix nil pointer dereference#155

Merged
moul merged 1 commit into
scaleway:masterfrom
ebfe:wait-panic
Sep 3, 2015
Merged

Fix nil pointer dereference#155
moul merged 1 commit into
scaleway:masterfrom
ebfe:wait-panic

Conversation

@ebfe
Copy link
Copy Markdown

@ebfe ebfe commented Sep 3, 2015

I triggered this with:

$ scw wait abcdef
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x52137e]

goroutine 1 [running]:
github.com/scaleway/scaleway-cli/pkg/api.WaitForServerState(0xc820086580, 0xc8203e4c90, 0x24, 0x8993b8, 0x7, 0x0, 0x0, 0x0)
        go/src/github.com/scaleway/scaleway-cli/pkg/api/helpers.go:392 +0x30e
github.com/scaleway/scaleway-cli/pkg/api.WaitForServerStopped(0xc820086580, 0xc8203e4c90, 0x24, 0xc8203e4c90, 0x0, 0x0)
        go/src/github.com/scaleway/scaleway-cli/pkg/api/helpers.go:468 +0x5a
github.com/scaleway/scaleway-cli/pkg/commands.RunWait(0x7f6afb1eb220, 0xc82002a008, 0x7f6afb1eb308, 0xc82002a010, 0x7f6afb1eb308, 0xc82002a018, 0xc82000cc80, 0x28, 0x28, 0xc82000a2f0, ...)
        go/src/github.com/scaleway/scaleway-cli/pkg/commands/wait.go:25 +0x122
github.com/scaleway/scaleway-cli/pkg/cli.runWait(0xab8220, 0xc82000a2f0, 0x1, 0x1, 0x0, 0x0)
        go/src/github.com/scaleway/scaleway-cli/pkg/cli/cmd_wait.go:35 +0x13c
github.com/scaleway/scaleway-cli/pkg/cli.Start(0xc82000a2e0, 0x2, 0x2, 0xc82000bc80, 0x0, 0x0, 0x0)
        go/src/github.com/scaleway/scaleway-cli/pkg/cli/main.go:113 +0xc76
main.main()
        go/src/github.com/scaleway/scaleway-cli/cmd/scw/main.go:16 +0x8e
...

But it's not easy to reproduce.

@QuentinPerez
Copy link
Copy Markdown

Good catch :) LGTM

@moul
Copy link
Copy Markdown

moul commented Sep 3, 2015

LGTM

moul added a commit that referenced this pull request Sep 3, 2015
Fix nil pointer dereference
@moul moul merged commit fd8910b into scaleway:master Sep 3, 2015
@moul moul self-assigned this Sep 3, 2015
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

Successfully merging this pull request may close these issues.

3 participants