bolt
bolt copied to clipboard
Build failure on 32-bits
Hi,
As reported in Debian bug #849663, BoltDB fails to build tests due to a constant overflow:
src/github.com/boltdb/bolt/db_test.go:534: constant 2147483648 overflows int
I guess using a slightly smaller constant would fix this and make the test work both in 64 and 32 bits architectures, but I am not sure why you used such a big constant in the first place. Could anybody give some insight on this?
Full log: https://tests.reproducible-builds.org/debian/rbuild/unstable/i386/golang-github-boltdb-bolt_1.2.1-2.rbuild.log
Thanks!
From a quick glance, looks like 1 << 30 could be used instead. Want to see whether all tests pass with that change? But using bolt on a 32 bit system might not be a good idea anyway; see the readme.
The readme says it might be "problematic" with large amounts of data. That implies that it's supported.
After changing db_test.go:534 to 1 << 30, there are still some failures:
- TestBucket_Put_ValueTooLarge panics because it can't allocate 2GB (putting DRONE=true in the environment works around this)
- TestOpen_Size_Large consistently panics with an "unexpected fault address" after writing about 1GB. I'm not sure why.
I was able to make the tests pass by using 1 << 29