Skip to content

Parsing float64 to uint64 yields different results on GOARCH="arm64" #52217

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

Closed
andrewmumm-wk opened this issue Apr 7, 2022 · 1 comment
Closed

Comments

@andrewmumm-wk
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.17.3 darwin/arm64

Tested with `go1.17.8 darwin/arm64` and `go1.18 darwin/arm64` as well.

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/andrewmumm/Library/Caches/go-build"
GOENV="/Users/andrewmumm/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/andrewmumm/dev/go_workspace/pkg/mod"
GONOPROXY="github.com/Workiva"
GONOSUMDB="github.com/Workiva"
GOOS="darwin"
GOPATH="/Users/andrewmumm/dev/go_workspace"
GOPRIVATE="github.com/Workiva"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/andrewmumm/.asdf/installs/golang/1.17.3/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/andrewmumm/.asdf/installs/golang/1.17.3/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.17.3"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rx/mnn8f88d4ll4dtk545kk785c0000gs/T/go-build3364574298=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.17.3 darwin/arm64
GOROOT/bin/go tool compile -V: compile version go1.17.3
uname -v: Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
ProductName:	macOS
ProductVersion:	12.3
BuildVersion:	21E230
lldb --version: lldb-1316.0.9.41
Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)

What did you do?

I ran this program on an M1 Max Macbook Pro

What did you expect to see?

INTEL
FLOAT:  -1.000000e+000  to UINT64:  18446744073709551615

What did you see instead?

M1
FLOAT:  -1.000000e+000  to UINT64:  0
@seankhliao
Copy link
Member

Duplicate of #47387

@seankhliao seankhliao marked this as a duplicate of #47387 Apr 7, 2022
@golang golang locked and limited conversation to collaborators Apr 7, 2023
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

3 participants