-
Notifications
You must be signed in to change notification settings - Fork 78
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
Make amino build on 32bit architectures #242
Conversation
- explicitly type constant in time encoding - use math.MaxInt32 in int tests to seed the fuzzer
1e1ceba
to
2757cf3
Compare
d42209f
to
b653908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍇
Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but weren't there similar settings in decoder.go
? Seems that only encoder.go
was fixed.
Thanks for the review @greg-szabo. I think we were seeing errors in encoder.go because it was using that same variables defined in decoder.go. After #243 gets approved, I'll tag another release, which should make the arm/32bit builds work again. |
* add contribution guidelines - minimal changes to ensure proto3 compat. for unsigned ints (int, int32, int64) * Add changes to decode ints, too * Delete outdated tests (covered by new table driven test) * Add overflow checks for int & int32 * prep release: update changelog * Make amino build on 32bit architectures (#242) * fix int overflows that happen on 32bit systems - explicitly type constant in time encoding - use math.MaxInt32 in int tests to seed the fuzzer * Add --concrete-name option to aminoscan
Some constants in encoder.go are interpreted as
int
by default and they overflow ints on 32bit machines: encoder.goSimilarly some values that seed the fuzzer: here for instance.
The first makes tendermint builds fail on certain architectures. This PR is a quick-fix for this issue.
The changes made in this PR were tested (and fuzzed) with a i686 docker image (and locally for 64bit).