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

gccgo: accepts invalid UTF-8 #11527

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

gccgo: accepts invalid UTF-8 #11527

dvyukov opened this issue Jul 2, 2015 · 4 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 2, 2015

gcc compiles the following program, while gc and go/types reject it:

package G
//line \FF:8

(that \FF needs to be converted to actual FF byte)
gc and go/types say:

go.go:2:8: illegal UTF-8 encoding
go.go:2: illegal UTF-8 sequence ff 3a

Compilers should agree on validity of this program.

gcc version 6.0.0 2015070 (experimental) (GCC)

@dvyukov
Copy link
Member Author

dvyukov commented Jul 2, 2015

@paranoiacblack

@ianlancetaylor ianlancetaylor added this to the Gccgo milestone Jul 10, 2015
@paranoiacblack
Copy link
Contributor

Is this still a problem? gc and go/types also accept the above program so it seems all compilers agree on the validity of the program.

@dvyukov
Copy link
Member Author

dvyukov commented Jul 31, 2015

replace \ff with actual 0xff byte

@gopherbot
Copy link

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

paranoiacblack pushed a commit to golang/gofrontend that referenced this issue Sep 1, 2015
Fixes golang/go#11527.

Change-Id: I94fd08ae67393c3422858bc6d1d1311d590c842f
Reviewed-on: https://go-review.googlesource.com/13905
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators Sep 4, 2016
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