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

go/types: compiling hangs #11327

Closed
dvyukov opened this issue Jun 22, 2015 · 6 comments
Closed

go/types: compiling hangs #11327

dvyukov opened this issue Jun 22, 2015 · 6 comments
Assignees
Milestone

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Jun 22, 2015

The following program takes 1+ hours to compile, aborted after that:

package a
var g = 1e81391777742999

Package should either analyze it in a reasonable amount of time (seconds) or give an error if it cannot chew it. Compiling a single line of code for hours does not make sense.

on commit af81789

@dvyukov
Copy link
Member Author

@dvyukov dvyukov commented Jun 29, 2015

I propose that gc/types employ exactly the same logic as gc compiler:
https://go-review.googlesource.com/#/c/11673/1/src/cmd/compile/internal/gc/mparith3.go

Loading

@ianlancetaylor ianlancetaylor changed the title x/tools/go/types: compiling hangs go/types: compiling hangs Jul 11, 2015
@rsc rsc added this to the Go1.6 milestone Jul 20, 2015
@rsc rsc removed this from the Go1.5Maybe milestone Jul 20, 2015
@0xmohit
Copy link
Contributor

@0xmohit 0xmohit commented Nov 18, 2015

Both go tool vet and the command vet hang in this case.

Loading

@rsc
Copy link
Contributor

@rsc rsc commented Nov 30, 2015

This one is important. @griesemer, can you take a look? Thanks.

Loading

@griesemer
Copy link
Contributor

@griesemer griesemer commented Nov 30, 2015

Started.

Loading

@griesemer
Copy link
Contributor

@griesemer griesemer commented Dec 1, 2015

The largest decimal exponent that needs to be accepted is 646456992 (approx. 2**MaxInt32). See also issue #11326.

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 9, 2015

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

Loading

@griesemer griesemer closed this in d0c1746 Dec 14, 2015
@golang golang locked and limited conversation to collaborators Dec 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants