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

x/tools/cmd/goyacc: endless loop on unterminated comment at EOF #16484

Open
rillig opened this issue Jul 24, 2016 · 3 comments
Open

x/tools/cmd/goyacc: endless loop on unterminated comment at EOF #16484

rillig opened this issue Jul 24, 2016 · 3 comments
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@rillig
Copy link
Contributor

rillig commented Jul 24, 2016

  1. What version of Go are you using (go version)?

go version go1.6.2 windows/amd64
go version devel +10538a8 Fri Jul 22 22:23:14 2016 +0000 windows/amd64

  1. What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\rillig\go
set GORACE=
set GOROOT=C:\Users\rillig\gomaster
set GOTOOLDIR=C:\Users\rillig\gomaster\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Program Files\cygwin\tmp\go-build959343002=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1

  1. What did you do?

printf '%%\nstart : /* empty * {}\n%%\n' > endless.y
go tool yacc endless.y

  1. What did you expect to see?

endless.y:3: unterminated comment at EOF

  1. What did you see instead?

No output, and the process apparently hangs in an endless loop.

@rillig
Copy link
Contributor Author

rillig commented Jul 24, 2016

See https://go-review.googlesource.com/#/c/25171/

Since yacc seems to be untested currently, I didn’t know how and where to add a test for this case.

@bradfitz
Copy link
Contributor

Related: #11229 (let's fix this after it moves out of the main Go tree)

@bradfitz bradfitz added this to the Unreleased milestone Jul 24, 2016
@gopherbot
Copy link
Contributor

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

@agnivade agnivade changed the title cmd/yacc: endless loop on unterminated comment at EOF x/tools/cmd/goyacc: endless loop on unterminated comment at EOF Jun 29, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants