golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/asm: index out of range (2)

dvyukov opened this issue · comments

cmd/asm crashes on the following program:

XCHGL(
panic: runtime error: index out of range

goroutine 1 [running]:
cmd/asm/internal/asm.(*Parser).have(0xc82007de70, 0xfffffffc, 0x6069d0)
    src/cmd/asm/internal/asm/parse.go:975 +0x64
cmd/asm/internal/asm.(*Parser).operand(0xc82007de70, 0xc82007d7c8, 0x1)
    src/cmd/asm/internal/asm/parse.go:351 +0xb97
cmd/asm/internal/asm.(*Parser).address(0xc82007de70, 0xc8200163c0, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    src/cmd/asm/internal/asm/parse.go:240 +0xb8
cmd/asm/internal/asm.(*Parser).instruction(0xc82007de70, 0x30f1, 0xc820010720, 0x5, 0x0, 0x0, 0xc82007db28, 0x1, 0x3)
    src/cmd/asm/internal/asm/parse.go:201 +0x143
cmd/asm/internal/asm.(*Parser).line(0xc82007de70, 0xc82000a4c0)
    src/cmd/asm/internal/asm/parse.go:190 +0xa76
cmd/asm/internal/asm.(*Parser).Parse(0xc82007de70, 0xc82000a4c0, 0xc820018780)
    src/cmd/asm/internal/asm/parse.go:86 +0x21
main.main()
    src/cmd/asm/main.go:59 +0xb85

go version devel +499c827 Thu Sep 3 03:02:17 2015 +0000 linux/amd64

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