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: hang #11764

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

cmd/asm: hang #11764

dvyukov opened this issue Jul 17, 2015 · 2 comments

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 17, 2015

cmd/asm hangs on the following program:

XCHGL [R0

go version devel +9b04852 Sat Jul 11 00:08:50 2015 +0000 linux/amd64

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

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

@robpike robpike modified the milestones: Go1.5.1, Go1.6 Aug 26, 2015
@gopherbot
Copy link

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

adg pushed a commit that referenced this issue Sep 8, 2015
For ARM machines, the assembler supports list of registers
operands such as [R1,R2].

A list missing a ']' results in the parser issuing many errors
and consuming all the tokens. At EOF (i.e. end of the line),
it still loops.

Normally, a counter is maintained to make sure the parser
stops after 10 errors. However, multiple errors occuring on the
same line are simply ignored. Only the first one is reported.
At most one error per line is accounted.

Missing ']' in a register list therefore results in an
infinite loop.

Fixed the parser by explicitly checking for ']' to interrupt
this loops

In the operand tests, also fixed a wrong entry which I think was
not set on purpose (but still led to a successful result).

Fixes #11764

Change-Id: Ie87773388ee0d21b3a2a4cb941d4d911d0230ba4
Reviewed-on: https://go-review.googlesource.com/13920
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-on: https://go-review.googlesource.com/14225
@golang golang locked and limited conversation to collaborators Sep 4, 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