cmd/asm: cannot happen: slice col
dvyukov opened this issue · comments
Dmitry Vyukov commented
cmd/asm crashes on the following program:
#define C#define A
C
panic: cannot happen: slice col
goroutine 1 [running]:
cmd/asm/internal/lex.(*Slice).Col(0xc820012480, 0x8)
src/cmd/asm/internal/lex/slice.go:48 +0x65
cmd/asm/internal/lex.(*Stack).Col(0xc82011c000, 0xc800000000)
src/cmd/asm/internal/lex/stack.go:45 +0x66
cmd/asm/internal/lex.(*Input).macroDefinition(0xc82011c000, 0xc820010300, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
src/cmd/asm/internal/lex/input.go:205 +0x72
cmd/asm/internal/lex.(*Input).define(0xc82011c000)
src/cmd/asm/internal/lex/input.go:185 +0x5f
cmd/asm/internal/lex.(*Input).hash(0xc82011c000, 0xc800000023)
src/cmd/asm/internal/lex/input.go:150 +0x74c
cmd/asm/internal/lex.(*Input).Next(0xc82011c000, 0x4)
src/cmd/asm/internal/lex/input.go:103 +0x464
cmd/asm/internal/asm.(*Parser).line(0xc82007de70, 0xc82000a3a0)
src/cmd/asm/internal/asm/parse.go:99 +0x63
cmd/asm/internal/asm.(*Parser).Parse(0xc82007de70, 0xc82000a3a0, 0xc8200182a0)
src/cmd/asm/internal/asm/parse.go:85 +0x21
main.main()
src/cmd/asm/main.go:59 +0xb93
go version devel +5512ac2 Wed Sep 16 17:56:14 2015 +0000 linux/amd64
GopherBot commented
CL https://golang.org/cl/14777 mentions this issue.