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/asm: cannot happen: slice col #12654

Closed
dvyukov opened this issue Sep 17, 2015 · 1 comment
Closed

cmd/asm: cannot happen: slice col #12654

dvyukov opened this issue Sep 17, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 17, 2015

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

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Sep 17, 2015
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Sep 22, 2016
@rsc rsc unassigned robpike 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