-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/constant, math/big: panic while constructing constant "1i/1E-612198397" #20227
Comments
A variant, which only affects go/types (go/constant): var g = 6e886451608i/2 cmd/compile:
go/types:
|
The problem is that we do complex div like this:
We check Precondition to We can probably fix this by making |
Or maybe we can change Douglas M. Priest. 2004. Efficient scaling for complex division. ACM Trans. Math. Softw. 30, 4 (December 2004), 389-401. DOI=http://dx.doi.org/10.1145/1039813.1039814 |
CL https://golang.org/cl/42650 mentions this issue. |
Updates #20227 Change-Id: Idadc3137490181a5d380367660cee21e8313cf3b Reviewed-on: https://go-review.googlesource.com/42650 Run-TryBot: Alberto Donizetti <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
CL 42650 (merged) turned the panic into an error message in the compiler. The problem is still there for |
CL https://golang.org/cl/44590 mentions this issue. |
Found by go-fuzz.
https://play.golang.org/p/YaALingKEW
cmd/compile panics:
go/types panics:
The real issues appear to be in go/constant and math/big.
Here's a standalone test case for go/constant:
I haven't made a standalone test case for math/big yet.
cc @griesemer
The text was updated successfully, but these errors were encountered: