Skip to content

cmd/compile: nil pointer dereference #11588

Closed
@dvyukov

Description

on dev.ssa branch
go version devel +be2a3e2 Thu Jul 2 08:29:33 2015 +0000 linux/amd64

compile crashes on the following program:

package a
func f_ssa() {return;return}
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=0x8 pc=0x5d516f]

goroutine 1 [running]:
cmd/compile/internal/gc.buildssa.func1(0xc8201633f0)
    src/cmd/compile/internal/gc/ssa.go:46 +0x4d
cmd/compile/internal/gc.(*state).stmt(0xc8200f1778, 0xc8201cf320)
    src/cmd/compile/internal/gc/ssa.go:377 +0x213f
cmd/compile/internal/gc.(*state).stmtList(0xc8200f1778, 0xc8201a3560)
    src/cmd/compile/internal/gc/ssa.go:280 +0x3a
cmd/compile/internal/gc.buildssa(0xc8201ce510, 0x0, 0xc8201cf600)
    src/cmd/compile/internal/gc/ssa.go:95 +0x944
cmd/compile/internal/gc.compile(0xc8201ce510)
    src/cmd/compile/internal/gc/pgen.go:412 +0x608
cmd/compile/internal/gc.funccompile(0xc8201ce510)
    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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions