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

cmd/compile: panic: runtime error: invalid memory address or nil pointer dereference #11101

Closed
sokoow opened this issue Jun 6, 2015 · 7 comments

Comments

@sokoow
Copy link

sokoow commented Jun 6, 2015

Got this when compiling openshift on exynos5/arm with go version devel +5ee5528 Thu May 28 12:04:35 2015 +0000 linux/arm:

hack/build-go.sh
++ Building go targets for linux/arm: cmd/openshift

github.com/GoogleCloudPlatform/kubernetes/third_party/forked/reflect

naddr [0x10c85740]
. OROR u(100) l(159) tc(1) bool
. . NAME-reflect.autotmp_0092 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) bool
. . EQ-init
. . . VARKILL l(159) tc(1)
. . . . NAME-reflect.autotmp_0092 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) bool

. . . AS u(100) l(159) tc(1)
. . . . NAME-reflect.autotmp_0093 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) int
. . . . CALLMETH u(100) l(159) tc(1) int
. . . . . DOTMETH u(2) l(159) tc(1) FUNC-method(reflect.Value) func() int
. . . . . . NAME-reflect.Value.Len u(1) a(true) l(159) x(0+0) class(PFUNC) FUNC-method(reflect.Value) func() int
. . . . CALLMETH-list
. . . . . AS u(1) l(159) tc(1)
. . . . . . INDREG-R13 a(true) l(159) x(4+0) tc(1) reflect.v·2 G0 reflect.Value
. . . . . . NAME-reflect.v1 u(1) a(true) g(3) l(103) x(4+0) class(PPARAM) f(1) esc(s) ld(1) tc(1) used(true) reflect.Value
. . EQ u(100) l(159) tc(1) bool
. . . NAME-reflect.autotmp_0093 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) int
. . . LITERAL-0 u(1) a(true) l(159) tc(1) int
Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/third_party/forked/reflect/deep_equal.go:159: internal compiler error: naddr: bad ||
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x1cc960]

goroutine 1 [running]:
cmd/compile/internal/gc.hcrash()
/root/go/src/cmd/compile/internal/gc/subr.go:105 +0x60
cmd/compile/internal/gc.Fatal(0x3cb348, 0x10, 0x10cd78f0, 0x2, 0x2)
/root/go/src/cmd/compile/internal/gc/subr.go:198 +0x258
cmd/compile/internal/gc.Naddr(0x10fbd0e8, 0x10c85740)
/root/go/src/cmd/compile/internal/gc/gsubr.go:385 +0x1458
cmd/compile/internal/arm.gins(0x201d, 0x10c85740, 0x10c85e00, 0x0)
/root/go/src/cmd/compile/internal/arm/gsubr.go:665 +0xe4
cmd/compile/internal/gc.bgenx(0x10c85ec0, 0x0, 0x1, 0x0, 0x10fb5b00)
/root/go/src/cmd/compile/internal/gc/cgen.go:1872 +0x15cc
cmd/compile/internal/gc.Bgen(0x10c85ec0, 0x10fb5c00, 0x0, 0x10fb5b00)
/root/go/src/cmd/compile/internal/gc/cgen.go:1739 +0x44
cmd/compile/internal/gc.gen(0x10c88000)
/root/go/src/cmd/compile/internal/gc/gen.go:901 +0xc24
cmd/compile/internal/gc.Genlist(0x10ef84e0)
/root/go/src/cmd/compile/internal/gc/gen.go:219 +0x38
cmd/compile/internal/gc.gen(0x10c83800)
/root/go/src/cmd/compile/internal/gc/gen.go:901 +0x1178
cmd/compile/internal/gc.Genlist(0x10f08320)
/root/go/src/cmd/compile/internal/gc/gen.go:219 +0x38
cmd/compile/internal/gc.compile(0x10c7ca80)
/root/go/src/cmd/compile/internal/gc/pgen.go:463 +0xb48
cmd/compile/internal/gc.funccompile(0x10c7ca80)
/root/go/src/cmd/compile/internal/gc/dcl.go:1475 +0x1e0
cmd/compile/internal/gc.Main()
/root/go/src/cmd/compile/internal/gc/lex.go:221 +0x21bc
cmd/compile/internal/arm.Main()
/root/go/src/cmd/compile/internal/arm/galign.go:92 +0x540
main.main()
/root/go/src/cmd/compile/main.go:28 +0x100

github.com/elazarl/go-bindata-assetfs

Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/assetfs.go:74: AssetFile.Size is ambiguous
Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/assetfs.go:74: cannot use f (type _AssetFile) as type os.FileInfo in return argument:
*AssetFile does not implement os.FileInfo (missing Size method)
Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/assetfs.go:114: AssetDirectory.Size is ambiguous
Godeps/workspace/src/github.com/elazarl/go-bindata-assetfs/assetfs.go:114: cannot use f (type *AssetDirectory) as type os.FileInfo in return argument:
*AssetDirectory does not implement os.FileInfo (missing Size method)
make: *
* [all] Error 1

IMO this shouldn't be blowing up like that ;) Hope somebody will find this report useful

@ALTree
Copy link
Member

ALTree commented Jun 6, 2015

I think the first one is #10654

@mikioh mikioh changed the title cmd/openshift: internal compiler error: naddr: bad || panic: runtime error: invalid memory address or nil pointer dereference cmd/compile: panic: runtime error: invalid memory address or nil pointer dereference Jun 7, 2015
@adg
Copy link
Contributor

adg commented Jun 8, 2015

Try updating to a newer version of Go.

@adg adg closed this as completed Jun 8, 2015
@josharian
Copy link
Contributor

@adg I think that these are crashes with the tip toolchain.

@josharian josharian reopened this Jun 8, 2015
@adg
Copy link
Contributor

adg commented Jun 8, 2015

The quoted revision is 5ee5528.

@josharian
Copy link
Contributor

That's still recent enough that I'd like to confirm before closing. The first one is indeed a dup of #10654. @sokoow, can you check whether the second issue still occurs? Thanks.

@sokoow
Copy link
Author

sokoow commented Jun 9, 2015

Still same with +b39487b

Detected go version: go version devel +b39487b Tue Jun 9 09:56:10 2015 +0000 linux/arm.

hack/build-go.sh
++ Building go targets for linux/arm: cmd/openshift

github.com/GoogleCloudPlatform/kubernetes/third_party/forked/reflect

naddr [0x10c72cc0]
. OROR u(100) l(159) tc(1) bool
. . NAME-reflect.autotmp_0092 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) bool
. . EQ-init
. . . VARKILL l(159) tc(1)
. . . . NAME-reflect.autotmp_0092 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) bool

. . . AS u(100) l(159) tc(1)
. . . . NAME-reflect.autotmp_0093 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) int
. . . . CALLMETH u(100) l(159) tc(1) int
. . . . . DOTMETH u(2) l(159) tc(1) FUNC-method(reflect.Value) func() int
. . . . . . NAME-reflect.Value.Len u(1) a(true) l(159) x(0+0) class(PFUNC) FUNC-method(reflect.Value) func() int
. . . . CALLMETH-list
. . . . . AS u(1) l(159) tc(1)
. . . . . . INDREG-R13 a(true) l(159) x(4+0) tc(1) reflect.v·2 reflect.Value
. . . . . . NAME-reflect.v1 u(1) a(true) g(3) l(103) x(4+0) class(PPARAM) f(1) esc(s) tc(1) used(true) reflect.Value
. . EQ u(100) l(159) tc(1) bool
. . . NAME-reflect.autotmp_0093 u(1) a(true) l(159) x(0+0) class(PAUTO) esc(N) tc(1) assigned used(true) int
. . . LITERAL-0 u(1) a(true) l(159) tc(1) int
Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/third_party/forked/reflect/deep_equal.go:159: internal compiler error: naddr: bad ||
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x1d3274]

@josharian
Copy link
Contributor

Thanks, @sokoow. That crash is a dup of #10654, which has an outstanding CL for it. I've confirmed that the second compilation failure no longer occurs with tip.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
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

5 participants