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 #163

Closed
eclipseo opened this issue Jun 25, 2019 · 3 comments · Fixed by #231
Closed

Int overflow on 32 bits arches #163

eclipseo opened this issue Jun 25, 2019 · 3 comments · Fixed by #231

Comments

@eclipseo
Copy link

Golang 1.12.6 on i686 and armv7:

Testing    in: /builddir/build/BUILD/zerolog-1.14.3/_build/src
         PATH: /builddir/build/BUILD/zerolog-1.14.3/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/zerolog-1.14.3/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X github.com/rs/zerolog/version=1.14.3 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: github.com/rs/zerolog
github.com/rs/zerolog
PASS
ok  	github.com/rs/zerolog	0.033s
github.com/rs/zerolog/hlog
PASS
ok  	github.com/rs/zerolog/hlog	0.024s
github.com/rs/zerolog/internal/cbor
FAIL	github.com/rs/zerolog/internal/cbor [build failed]
BUILDSTDERR: # github.com/rs/zerolog/internal/cbor [github.com/rs/zerolog/internal/cbor.test]
BUILDSTDERR: ./types_test.go:91:3: constant 4294967294 overflows int
BUILDSTDERR: ./types_test.go:94:3: constant 3022355601293312 overflows int
BUILDSTDERR: ./types_test.go:95:3: constant 1000000000000 overflows int
BUILDSTDERR: ./types_test.go:119:3: constant -4294967294 overflows int
BUILDSTDERR: ./types_test.go:122:3: constant -3022355601293313 overflows int
BUILDSTDERR: ./types_test.go:123:3: constant -1000000000001 overflows int
@toravir
Copy link
Contributor

toravir commented Sep 18, 2019

@eclipseo how do i recreate this ? i don't have an armv7 or i686 machine.. can u provide steps to create a 32-bit env pls ?

@jsdidierlaurent
Copy link
Contributor

You can reproduce this issue with:
GOARCH=386 go test ./...

@toravir
Copy link
Contributor

toravir commented May 11, 2020

Thanks @jsdidierlaurent - am able to recreate it - will looking into it and get back in a few days..

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

Successfully merging a pull request may close this issue.

3 participants