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

Most upvoted comments

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