Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

freelist tests fails for 32 bits ARCH #316

Closed
poffe opened this issue Feb 27, 2015 · 8 comments · Fixed by #317
Closed

freelist tests fails for 32 bits ARCH #316

poffe opened this issue Feb 27, 2015 · 8 comments · Fixed by #317

Comments

@poffe
Copy link

poffe commented Feb 27, 2015

GOARCH=386 go test -run 'TestFreelist.*'

gives me:

# github.com/boltdb/bolt
./freelist.go:164: type [2147483647]pgid larger than address space
./freelist.go:164: type [2147483647]pgid too large
./freelist.go:168: type [2147483647]pgid larger than address space
./freelist.go:168: type [2147483647]pgid too large
./freelist.go:193: type [2147483647]pgid larger than address space
./freelist.go:193: type [2147483647]pgid too large
./freelist.go:196: type [2147483647]pgid larger than address space
./freelist.go:196: type [2147483647]pgid too large
./freelist.go:197: type [2147483647]pgid larger than address space
./freelist.go:197: type [2147483647]pgid too large
./freelist.go:197: too many errors
FAIL    github.com/boltdb/bolt [build failed]
@poffe
Copy link
Author

poffe commented Feb 27, 2015

Seems like lowering the constant maxAllocSize in page.go from 0x7FFFFFFF to 0x9FFFFFF makes the tests pass but I have no clue what impact this would have.

@benbjohnson
Copy link
Member

Thanks for reporting. I reverted the maxAllocSize for the 386 architecture only in this PR: #317

Can you test that out and verify that it fixes the issue?

@poffe
Copy link
Author

poffe commented Feb 27, 2015

Yes, I can confirm that PR #317 fixes the issue. Thanks for the quick turnaround.

@benbjohnson
Copy link
Member

👍 merging

@poffe
Copy link
Author

poffe commented Feb 27, 2015

Sorry, but I forgot to test it in my ARM architecture (which is 32-bits as well) before confirming the pull request. I guess the maxAllocSize constant is needed in bolt_arm.go as well?
I'm getting this as go test result on my ARM:

# github.com/boltdb/bolt
./freelist.go:164: undefined: maxAllocSize
./freelist.go:164: invalid array bound maxAllocSize
./freelist.go:168: undefined: maxAllocSize
./freelist.go:168: invalid array bound maxAllocSize
./freelist.go:193: undefined: maxAllocSize
./freelist.go:193: invalid array bound maxAllocSize
./freelist.go:196: undefined: maxAllocSize
./freelist.go:196: invalid array bound maxAllocSize
./freelist.go:197: undefined: maxAllocSize
./freelist.go:197: invalid array bound maxAllocSize
./freelist.go:197: too many errors
FAIL    github.com/boltdb/bolt [build failed]

@Oliv4945
Copy link

Oliv4945 commented Mar 1, 2015

I added "maxAllocSize" in bolt_arm.go to be able to compile it on arm, but maybe we should open another issue ?

@poffe
Copy link
Author

poffe commented Mar 1, 2015

Great! And yes, I guess we should but I can't do it right now due to personal reasons.

@Oliv4945
Copy link

Oliv4945 commented Mar 1, 2015

Done #320 ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants