Closed
Description
strconv.Atoi
has different behavior:
$ GOARCH=386 go run test-int.go
2147483647 (0x80bee40,0x8c8e000)
$ GOARCH=amd64 go run test-int.go
4294967295 (0x0,0x0)
$ cat test-int.go
package main
import "strconv"
func main() {
println(strconv.Atoi("4294967295"))
}
For example, in XORM:
A user has reported that Gitea 1.17 failed with error:
...
2022/06/28 11:47:32 routers/common/db.go:34:InitDBEngine() [I] Backing off for 3 seconds
2022/06/28 11:47:35 routers/common/db.go:27:InitDBEngine() [I] ORM engine initialization attempt #9/10...
2022/06/28 11:47:35 routers/common/db.go:33:InitDBEngine() [E] ORM engine initialization attempt #9/10 failed. Error: sync database struct error: strconv.Atoi: parsing "4294967295": value out of range
2022/06/28 11:47:35 routers/common/db.go:34:InitDBEngine() [I] Backing off for 3 seconds
2022/06/28 11:47:38 routers/common/db.go:27:InitDBEngine() [I] ORM engine initialization attempt #10/10...
2022/06/28 11:47:38 routers/init.go:68:mustInitCtx() [F] code.gitea.io/gitea/routers/common.InitDBEngine(ctx) failed: sync database struct error: strconv.Atoi: parsing "4294967295": value out of range