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
Milestone

Comments

@dvyukov
Copy link
Member

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 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

@ianlancetaylor ianlancetaylor changed the title x/tools/go/types: compiling hangs go/types: compiling hangs Jul 11, 2015
@rsc rsc modified the milestones: Go1.6, Go1.5Maybe Jul 20, 2015
@0xmohit
Copy link
Contributor

0xmohit commented Nov 18, 2015

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

@rsc
Copy link
Contributor

rsc commented Nov 30, 2015

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

@griesemer
Copy link
Contributor

Started.

@griesemer
Copy link
Contributor

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

@gopherbot
Copy link

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

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

5 participants