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

go/types: go vet INTERNAL PANIC #5568

Closed
alberts opened this issue May 27, 2013 · 3 comments
Closed

go/types: go vet INTERNAL PANIC #5568

alberts opened this issue May 27, 2013 · 3 comments

Comments

@alberts
Copy link
Contributor

alberts commented May 27, 2013

What is the expected output?

go tool vet panics on some of our internal code.

Reducing it is quite a big job. If there isn't enough info here, let me know and I'll go
for it.

INTERNAL PANIC: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x4eb475]

goroutine 1 [running]:
code.google.com/p/go.tools/go/types.func·003()
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/check.go:447 +0x175
code.google.com/p/go.tools/go/types.identicalMethods(0xc2001e53e0, 0x1, 0x1,
0xc2001c9d90, 0x1, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/predicates.go:219 +0xe5
code.google.com/p/go.tools/go/types.IsIdentical(0xc20008db00, 0xc2001e2d80,
0xc20008db00, 0xc2001c6760, 0xc2000cd700, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/predicates.go:165 +0x8de
code.google.com/p/go.tools/go/types.(*operand).isAssignable(0xc2001b7ac0, 0xc2000cd980,
0xc20008db40, 0xc20020d420, 0xc20016d000, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/operand.go:144 +0x172
code.google.com/p/go.tools/go/types.(*checker).assignment(0xc2000af160, 0xc2001b7ac0,
0xc20008db40, 0xc20020d420, 0xc20008db40, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:36 +0x1dd
code.google.com/p/go.tools/go/types.(*checker).argument(0xc2000af160, 0xc2001c6f60, 0x0,
0xc2000cd680, 0xc20006dbc0, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:984 +0x23a
code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc2000af160, 0xc2001b7ac0,
0xc2000cd700, 0xc2000cd800, 0x0, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:1577 +0x353a
code.google.com/p/go.tools/go/types.(*checker).expr(0xc2000af160, 0xc2001b7ac0,
0xc2000cd700, 0xc2000cd800, 0x0, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:1727 +0x88
code.google.com/p/go.tools/go/types.(*checker).assignNtoM(0xc2000af160, 0xc20006db40,
0x2, 0x2, 0xc2000aaa70, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:188 +0x1b4
code.google.com/p/go.tools/go/types.(*checker).stmt(0xc2000af160, 0xc2000cd7c0,
0xc2000cd840)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:375 +0x3846
code.google.com/p/go.tools/go/types.(*checker).stmtList(0xc2000af160, 0xc20006dbe0, 0x2,
0x2)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:247 +0x68
code.google.com/p/go.tools/go/types.check(0xc2000cd980, 0x6060a0, 0x1, 0xc2000cd440,
0xc200000268, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/check.go:485 +0x4cf
code.google.com/p/go.tools/go/types.(*Context).Check(0xc2000cd980, 0x6060a0, 0x1,
0xc2000cd440, 0xc200000268, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/api.go:112 +0x6c
main.(*Package).check(0xc2000cd8c0, 0xc2000cd440, 0xc200000268, 0x1, 0x1, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/types.go:32 +0x168
main.doPackage(0x6060a0, 0x1, 0xc20006d010, 0x1, 0x1, ...)
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/main.go:226 +0x8f5
main.main()
    /home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/main.go:144 +0x665

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

tip
@remyoudompheng
Copy link
Contributor

Comment 1:

The crash location looks similar to issue #5512.
Do you see a similar pattern in your program?

@alberts
Copy link
Contributor Author

alberts commented May 28, 2013

Comment 2:

Yes, I think so. I reduced it down to two types (from other packages though) that
interact with each other through a function along the lines of a.foo(b).
I think we can close this as a duplicate for now.

@davecheney
Copy link
Contributor

Comment 3:

Marking as duplicate as per #2

Status changed to Duplicate.

Merged into issue #5512.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants