Skip to content
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

Int overflow on 32 bits arches #1634

Closed
eclipseo opened this issue Jun 27, 2019 · 4 comments
Closed

Int overflow on 32 bits arches #1634

eclipseo opened this issue Jun 27, 2019 · 4 comments

Comments

@eclipseo
Copy link

eclipseo commented Jun 27, 2019

Golang 1.12.6 on i686 and armv7:

Testing    in: /builddir/build/BUILD/gophercloud-e0311c0920d47879e99ac9826142bc097eacd5b7/_build/src
         PATH: /builddir/build/BUILD/gophercloud-e0311c0920d47879e99ac9826142bc097eacd5b7/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/gophercloud-e0311c0920d47879e99ac9826142bc097eacd5b7/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X github.com/gophercloud/gophercloud/version.commit=e0311c0920d47879e99ac9826142bc097eacd5b7 -X github.com/gophercloud/gophercloud/version=0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: github.com/gophercloud/gophercloud
github.com/gophercloud/gophercloud/acceptance/openstack/loadbalancer/v2
PASS
ok  	github.com/gophercloud/gophercloud/acceptance/openstack/loadbalancer/v2	0.022s
github.com/gophercloud/gophercloud/internal/testing
PASS
ok  	github.com/gophercloud/gophercloud/internal/testing	0.013s
github.com/gophercloud/gophercloud/openstack/baremetal/v1/allocations/testing
PASS
ok  	github.com/gophercloud/gophercloud/openstack/baremetal/v1/allocations/testing	0.034s
github.com/gophercloud/gophercloud/openstack/baremetal/v1/drivers/testing
PASS
ok  	github.com/gophercloud/gophercloud/openstack/baremetal/v1/drivers/testing	0.036s
github.com/gophercloud/gophercloud/openstack/baremetal/v1/nodes/testing
PASS
ok  	github.com/gophercloud/gophercloud/openstack/baremetal/v1/nodes/testing	0.063s
github.com/gophercloud/gophercloud/openstack/baremetal/v1/ports/testing
PASS
ok  	github.com/gophercloud/gophercloud/openstack/baremetal/v1/ports/testing	0.038s
github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection/testing
FAIL	github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection/testing [build failed]
BUILDSTDERR: # github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection/testing [github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection/testing.test]
BUILDSTDERR: ./fixtures.go:232:16: constant 13958643712 overflows int
BUILDSTDERR: ./fixtures.go:268:18: constant 13958643712 overflows int
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.e9G8Kj (%check)
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.e9G8Kj (%check)
@jtopjian
Copy link
Contributor

@eclipseo Is there a way to reproduce this error without being on an arm platform?

@mwhudson
Copy link
Contributor

GOARCH=386 go test will probably reproduce this...

@mwhudson
Copy link
Contributor

mwhudson commented Jul 6, 2020

I don't know if it would be too much of an abi break, but github.com/gophercloud/gophercloud/openstack/baremetalintrospection/v1/introspection.RootDiskType being an "int" vs an "int64" definitely seems like a mistake. I'll propose a PR with this changed.

mwhudson added a commit to mwhudson/gophercloud that referenced this issue Jul 6, 2020
Fixes tests (and functionality I suspect!) on 32-bit systems.

Fixes gophercloud#1634
mwhudson added a commit to mwhudson/gophercloud that referenced this issue Jul 6, 2020
Fixes tests (and functionality I suspect!) on 32-bit systems.
mwhudson added a commit to mwhudson/gophercloud that referenced this issue Jul 6, 2020
Fixes tests (and functionality I suspect!) on 32-bit systems.
jtopjian pushed a commit that referenced this issue Jul 7, 2020
Fixes tests (and functionality I suspect!) on 32-bit systems.
@jtopjian
Copy link
Contributor

jtopjian commented Jul 7, 2020

This should be fixed in #1988

@jtopjian jtopjian closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants