]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: fix some fuzz bugs
authorRob Pike <r@golang.org>
Thu, 10 Sep 2015 22:48:23 +0000 (15:48 -0700)
committerRob Pike <r@golang.org>
Fri, 11 Sep 2015 00:52:21 +0000 (00:52 +0000)
commit5e89acb580dcb09e41c56b638753d7a9467d8614
treeed1b9a45a3d155b37890ac512154fbd2ddcb32a3
parent2b50e6b4583ee72254ca61a689ae63f9189543f7
cmd/asm: fix some fuzz bugs

One (12466) was an actual logic error, backing up when there was
nothing there. The others were due to continuing to process an
instruction when it cannot work.

Methodically stop assembling an instruction when it's not going to
succeed.

Fixes #12466.
Fixes #12467.
Fixes #12468.

Change-Id: I88c568f2b9c1a8408043b2ac5a78f5e2ffd62abd
Reviewed-on: https://go-review.googlesource.com/14498
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/operand_test.go
src/cmd/asm/internal/asm/parse.go
src/cmd/asm/internal/asm/pseudo_test.go