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

Overflow on 32 bits platforms. #1

Closed
kevina opened this issue Oct 4, 2018 · 2 comments · Fixed by #2
Closed

Overflow on 32 bits platforms. #1

kevina opened this issue Oct 4, 2018 · 2 comments · Fixed by #2

Comments

@kevina
Copy link
Contributor

kevina commented Oct 4, 2018

I am not sure why this wasn't a problem before but this constant:

const MaxLength = 1 << 32

should probably change to

const MaxLength = math.MaxInt32

Otherwise we will get these errors:

[go-ipfs] Running shell script
+ go build -i -ldflags=-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=pr-5553-5 -o cmd/ipfs/ipfs github.com/ipfs/go-ipfs/cmd/ipfs
# gx/ipfs/QmUQy76yspPa3fRyY3GzXFTg9n8JVwFru6ue3KFRt4MeTw/go-buffer-pool
../../../gx/ipfs/QmUQy76yspPa3fRyY3GzXFTg9n8JVwFru6ue3KFRt4MeTw/go-buffer-pool/pool.go:55:12: constant 4294967296 overflows int
../../../gx/ipfs/QmUQy76yspPa3fRyY3GzXFTg9n8JVwFru6ue3KFRt4MeTw/go-buffer-pool/pool.go:68:31: constant 4294967296 overflows int
script returned exit code 2
@bonedaddy
Copy link

Running into this issue trying to build for linux/arm and linux/386 https://travis-ci.com/RTradeLtd/Temporal/builds/95589849

@anacrolix
Copy link

@postables You have vendored 0.1.1. This fix was included in 0.1.2.

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