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: bad HMUL #11358

Closed
dvyukov opened this issue Jun 23, 2015 · 1 comment
Closed

cmd/compile: bad HMUL #11358

dvyukov opened this issue Jun 23, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jun 23, 2015

go tool compile crashes on the following program:

package a
var x = 1/"."[0]
naddr [0xc8201c6360]
.   HMUL u(2) a(true) l(2) tc(1) byte
/tmp/222.go:2: internal compiler error: naddr: bad HMUL 
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5cfd10]

goroutine 1 [running]:
cmd/compile/internal/gc.hcrash()
    src/cmd/compile/internal/gc/subr.go:105 +0x50
cmd/compile/internal/gc.Fatal(0x854a90, 0x10, 0xc8200e1db0, 0x2, 0x2)
    src/cmd/compile/internal/gc/subr.go:198 +0x2b1
cmd/compile/internal/gc.Naddr(0xc8201cc370, 0xc8201c6360)
    src/cmd/compile/internal/gc/gsubr.go:313 +0x1a5b
cmd/compile/internal/amd64.gins(0x307d, 0xc8201c6360, 0xc8201c74d0, 0x0)
    src/cmd/compile/internal/amd64/gsubr.go:629 +0x127
cmd/compile/internal/amd64.gmove(0xc8201c6360, 0xc8201c74d0)
    src/cmd/compile/internal/amd64/gsubr.go:532 +0x4e8
cmd/compile/internal/gc.cgen_wb(0xc8201c6360, 0xc8201c74d0, 0xc8201c7500)
    src/cmd/compile/internal/gc/cgen.go:252 +0x454a
cmd/compile/internal/gc.Cgen(0xc8201c6360, 0xc8201c74d0)
    src/cmd/compile/internal/gc/cgen.go:19 +0x30
cmd/compile/internal/gc.cgen_wb(0xc8201c6480, 0xc8201c73b0, 0xc8201c7400)
    src/cmd/compile/internal/gc/cgen.go:504 +0x31de
cmd/compile/internal/gc.Cgen(0xc8201c6480, 0xc8201c73b0)
    src/cmd/compile/internal/gc/cgen.go:19 +0x30
cmd/compile/internal/gc.cgen_wb(0xc8201c66c0, 0xc8201c7320, 0xc8201c7300)
    src/cmd/compile/internal/gc/cgen.go:758 +0x219e
cmd/compile/internal/gc.Cgen(0xc8201c66c0, 0xc8201c7320)
    src/cmd/compile/internal/gc/cgen.go:19 +0x30
cmd/compile/internal/amd64.cgen_shift(0x50, 0xc8201c6701, 0xc8201c66c0, 0xc8201c6750, 0xc8201c7200)
    src/cmd/compile/internal/amd64/ggen.go:383 +0xbc
cmd/compile/internal/gc.cgen_wb(0xc8201c67e0, 0xc8201c7200, 0xc8201c7200)
    src/cmd/compile/internal/gc/cgen.go:685 +0x3aa2
cmd/compile/internal/gc.Cgen(0xc8201c67e0, 0xc8201c7200)
    src/cmd/compile/internal/gc/cgen.go:19 +0x30
cmd/compile/internal/gc.cgen_wb(0xc8201c6870, 0xc8201b7dd0, 0x820f00)
    src/cmd/compile/internal/gc/cgen.go:504 +0x31de
cmd/compile/internal/gc.Cgen_as_wb(0xc8201b7dd0, 0xc8201c6870, 0x0)
    src/cmd/compile/internal/gc/gen.go:956 +0x166
cmd/compile/internal/gc.Cgen_as(0xc8201b7dd0, 0xc8201c6870)
    src/cmd/compile/internal/gc/gen.go:907 +0x30
cmd/compile/internal/gc.gen(0xc8201c6900)
    src/cmd/compile/internal/gc/gen.go:857 +0x185
cmd/compile/internal/gc.Genlist(0xc820193920)
    src/cmd/compile/internal/gc/gen.go:219 +0x30
cmd/compile/internal/gc.compile(0xc8201c3170)
    src/cmd/compile/internal/gc/pgen.go:471 +0xc13
cmd/compile/internal/gc.funccompile(0xc8201c3170)
    src/cmd/compile/internal/gc/dcl.go:1480 +0x1c9
cmd/compile/internal/gc.fninit(0xc8201936e0)
    src/cmd/compile/internal/gc/init.go:188 +0x8d4
cmd/compile/internal/gc.Main()
    src/cmd/compile/internal/gc/lex.go:477 +0x1f08
cmd/compile/internal/amd64.Main()
    src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
    src/cmd/compile/main.go:26 +0x189

go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/11400 mentions this issue.

@rsc rsc closed this as completed in 765c0f3 Jun 26, 2015
@mikioh mikioh added this to the Go1.5 milestone Jun 27, 2015
@golang golang locked and limited conversation to collaborators Jun 27, 2016
@rsc rsc removed their assignment Jun 23, 2022
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