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

x/vgo: incorrect go.mod causes panic #24181

FrankReh opened this issue Feb 28, 2018 · 2 comments

x/vgo: incorrect go.mod causes panic #24181

FrankReh opened this issue Feb 28, 2018 · 2 comments


Copy link

@FrankReh FrankReh commented Feb 28, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

$ vgo version
go version go1.10 darwin/amd64 vgo:2018-02-20.1

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?


What did you do?

In a new directory, created a malformed go.mod, all it contains is a comment line, ran vgo build.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on is best.

mkdir n
cd n
echo '//' > go.mod
vgo build

What did you expect to see?

Expected to see an error about a malformed go.mod file or message that the module path cannot be determined, as when there is no go.mod, the go.mod is empty, or the go.mod has something other than just a comment line.

What did you see instead?

$ vgo build
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13721a0]

goroutine 1 [running]:
/Users/frank/x/go/src/ +0x370, 0x0, 0x0, 0xc4201fa390, 0x1, 0x1)
/Users/frank/x/go/src/ +0x38, 0x0, 0x0, 0x1012359, 0x10452cf, 0x43)
/Users/frank/x/go/src/ +0x4f, 0x0, 0x0, 0xc4201d9aa0, 0x103469b, 0x43)
/Users/frank/x/go/src/ +0xac, 0x0, 0x0, 0x10, 0x10, 0x14b5e80)
/Users/frank/x/go/src/ +0x5d, 0xc4200b6010, 0x0, 0x0)
/Users/frank/x/go/src/ +0x85
/Users/frank/x/go/src/ +0x82e
/Users/frank/x/go/src/ +0x25

@gopherbot gopherbot added this to the vgo milestone Feb 28, 2018
@rsc rsc added the NeedsFix label Mar 30, 2018

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Apr 13, 2018

Change mentions this issue: x/vgo: fix incorrect go.mod panic


This comment has been minimized.

Copy link

@oiooj oiooj commented Apr 13, 2018

I'm working on it.

@golang golang locked and limited conversation to collaborators Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.