go: math/big: arm64 assembly code for shlVU is incorrect
The TestFloat64SpecialCases test in math/big (ratconv_test.go) is currently broken on the android/arm64 builder, with log:
https://build.golang.org/log/fbc581637a0375532f0d819ae67bc9b9abbe8ba9
Breakage started at e4ba400 (math/big: accept non-decimal floats with Rat.SetString).
cc @griesemer
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 36 (31 by maintainers)
Commits related to this issue
- math/big: temporarily disable buggy shlVU assembly for arm64 This addresses the failures we have seen in #31084. The correct fix is to find the actual bug in the assembly code. Updates #31084. Chan... — committed to golang/go by griesemer 5 years ago
- math/big: optimize amd64 shlVU for shift 0 case DO NOT MAIL TODO: shrVU too TODO: benchmarks TODO: fuzz for confidence TODO: better commit message When shift == 0, shlVU and shrVU reduce to a memco... — committed to josharian/go by josharian 5 years ago
- [release-branch.go1.12] math/big: fix the bug in assembly implementation of shlVU on arm64 For the case where the addresses of parameter z and x of the function shlVU overlap and the address of z is ... — committed to golang/go by erifan 5 years ago
- build: Use Go 1.12.9 This is a minor release of Go that does not include any changes that affect Terraform's behavior. This does include a fix for golang/go#31084 that could potentially affect HCL a... — committed to hashicorp/terraform by apparentlymart 5 years ago
- build: Use Go 1.12.9 This is a minor release of Go that does not include any changes that affect Terraform's behavior. This does include a fix for golang/go#31084 that could potentially affect HCL a... — committed to hashicorp/terraform by apparentlymart 5 years ago
@bradfitz I can’t imagine this doesn’t fail on all arm64 CPUs, yet I see no arm64 builders on build.golang.org apart from the mobiles. Are they gone or am I blind? With generic arm64 builders, gri wouldn’t have to go through that painful debugging session.
@dmitshur In Go, the breakage started from commit https://github.com/golang/go/commit/e4ba40030f9ba4b61bb28dbf78bb41a7b14e6788, but for user code, the affected version may be earlier than 1.12, and there is currently no release version that fixes this issue. The user of Project https://github.com/shopspring/decimal complained to me about this issue. Since it is a library function, users will use it frequently, so I think this is a security issue. If possible, please port it to Go1.12.7, thank you.
The problem is that the loop in the assembler code goes forward through the arrays. It has to go backward. Otherwise the output overwrites the input.
The same is true of
shrVU.