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: nil pointer dereference (2) #11666

Closed
dvyukov opened this issue Jul 11, 2015 · 2 comments
Closed

cmd/compile: nil pointer dereference (2) #11666

dvyukov opened this issue Jul 11, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 11, 2015

on dev.ssa branch
go version devel +9b04852 Sat Jul 11 00:08:50 2015 +0000 linux/amd64

compile crashes on the following program:

package a

func f_ssa() {
    return
    for {
        return
    }
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x5d3617]

goroutine 1 [running]:
cmd/compile/internal/gc.buildssa.func1(0xc82011b4b0)
    src/cmd/compile/internal/gc/ssa.go:46 +0x4d
cmd/compile/internal/gc.(*state).stmt(0xc8200ad778, 0xc82018a6c0)
    src/cmd/compile/internal/gc/ssa.go:390 +0x577
cmd/compile/internal/gc.(*state).stmtList(0xc8200ad778, 0xc82015b860)
    src/cmd/compile/internal/gc/ssa.go:281 +0x3a
cmd/compile/internal/gc.buildssa(0xc82018a510, 0x0, 0xc82018b500)
    src/cmd/compile/internal/gc/ssa.go:95 +0x944
cmd/compile/internal/gc.compile(0xc82018a510)
    src/cmd/compile/internal/gc/pgen.go:412 +0x608
cmd/compile/internal/gc.funccompile(0xc82018a510)
    src/cmd/compile/internal/gc/dcl.go:1480 +0x1c9
cmd/compile/internal/gc.Main()
    src/cmd/compile/internal/gc/lex.go:473 +0x1f08
cmd/compile/internal/amd64.Main()
    src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
    src/cmd/compile/main.go:26 +0x189
@dvyukov
Copy link
Member Author

dvyukov commented Jul 11, 2015

@josharian @DanielMorsing

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jul 11, 2015
@josharian josharian assigned josharian and unassigned randall77 Jul 11, 2015
@josharian
Copy link
Contributor

Fixed by CL 12445.

@mikioh mikioh modified the milestones: Go1.5, Go1.6 Jul 23, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 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

6 participants